Repository navigation
[Python] Release 0.61.0
·
19 commits
to master
since this release
Fixed
.inpatternandpatternPropertiesmatched\r, U+2028 and U+2029 (it should reject every line terminator).evaluate()reported a missing singlerequiredname besideadditionalProperties: falseat/additionalProperties(it should be/required).- Numeric keywords misjudging whole floats past 2^53. #1825
- Building a validator with an explicit draft retrieving the schema's
$schemaURI. format: "date-time","date"and"time"accepting+,,,-,.or/where RFC 3339 requires a digit. #1829- Numeric keywords misjudging instances against whole floats past 2^53 in the schema. #1825
$refpointers through a numeric object key (#/responses/200) skipping the references under their target.oneOf/anyOfrejecting valid instances when a$refinside a branch sits under an$id.unevaluatedItemstreated every element as evaluated beside a non-schemaitemsvalue (it should evaluate none).
Performance
- Building validators up to 15% faster on schemas that repeat the same
$ref, from resolving each reference once. Evaluation.list()up to 4x andEvaluation.hierarchical()up to 6x faster, from building output units directly as Python objects.- Building registries up to 30% faster and validators up to 3% faster, from a cheaper walk over schema documents.
- Building validators up to 25% faster on schemas that declare a base URI, from building absolute keyword locations on first use.
- Building validators up to 3% faster, from cheaper compilation cache keys.
- Validation errors on large values up to 40% faster, from returning the validated object as
ValidationError.instanceinstead of a copy. oneOf/anyOfup to 7x faster when branches fix a property withconstorenum.oneOf/anyOfskip branches that exclude the instance's value withnotoverenumorconst.propertiesup to 40% faster on objects with a few more keys than it declares.minLength/maxLengthskip counting code points when the byte length decides.patternstarting with lookaheads (^(?=...)(?=...)...) up to 2x faster.propertiesandadditionalPropertiesup to 13% faster on schemas declaring 15 or more properties.propertiesup to 12% faster on objects with keys it does not declare.unevaluatedPropertiesup to 10% faster on schemas that combine it withpatternPropertiesor applicators.requiredup to 40% faster when it lists every property of an object closed byadditionalProperties: false.properties,anyOfand other applicators faster on subschemas that only check a non-numerictype, directly or through$ref.evaluate()up to 20% faster on instances with many errors, from fewer allocations per error.evaluate()up to 20% faster, from rendering instance locations only when the output reads them.is_valid()andvalidate()up to 14% faster on small instances, from a cheaper per-call validation context.