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:
Klaas van Schelven
2024-11-28 11:42:16 +01:00
parent cd3818a7ba
commit 95c9dfa7a1
3 changed files with 722 additions and 31794 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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

View File

@@ -13,5 +13,5 @@ whitenoise
requests
monofy==1.1.*
user_agents
fastjsonschema
fastjsonschema>=2.21.0
verbose_csrf_middleware