mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
Use fastjsonschema's detailed_exceptions=False
We don't use fastjsonschema's exception info, falling back to jsonschema for that. Not using the info is faster. Possible because https://github.com/horejsek/python-fastjsonschema/issues/187 was completed. I did not at present do any speed/memory checks, but the diff is quite promising :-)
This commit is contained in:
32512
bugsink/event_schema.py
32512
bugsink/event_schema.py
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@ The source of this file is: %s
|
||||
|
||||
# use_formats=False for "uint64", see https://github.com/horejsek/python-fastjsonschema/issues/108
|
||||
# use_default=False to avoid fastjsonschema adding default values to the data it validates (bwegh)
|
||||
code = fastjsonschema.compile_to_code(schema, use_formats=False, use_default=False)
|
||||
code = fastjsonschema.compile_to_code(schema, use_formats=False, use_default=False, detailed_exceptions=False)
|
||||
|
||||
with open(settings.BASE_DIR / "bugsink/event_schema.py", "w") as f:
|
||||
f.write("""# This file is generated by fetch_event_schema_json.py
|
||||
|
||||
@@ -13,5 +13,5 @@ whitenoise
|
||||
requests
|
||||
monofy==1.1.*
|
||||
user_agents
|
||||
fastjsonschema
|
||||
fastjsonschema>=2.21.0
|
||||
verbose_csrf_middleware
|
||||
|
||||
Reference in New Issue
Block a user