NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2721 most downloaded on PyPI
Generate test data from JSON schemata with Hypothesis
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 2 weeks to 1.1 years
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
61 releases · first in 2018
Fix not respecting allow_x00 and codec arguments for values in some schemas
allow_x00 and codec arguments for values in some schemasRequire hypothesis 6.84+ and jsonschema 4.18+, to support new features and avoid deprecations.
allow_x00= and codec= arguments to from_schema(), so that you can
control generated strings more precisely.One column per quarter.
Cache JSON Schema validators by their schema's JSON representation
never generate trailing newlines for regex patterns ending in $ (allowed by Python, but not by JSON Schema)
$
(allowed by Python, but not by JSON Schema)reduced filtering for object keys
jsonschema >= 4.0.0 (#89);
though support for Draft 2019-09 and 2020-12 will take longerimproved handling for fractional multipleOf values
multipleOf valuesAllow custom_formats for known string formats
custom_formats for known string formats (#83)Fix support date and time formats
date and time formats (#79)- PyPy support
Generate empty lists when maxItems > 0 but no elements are allowed
maxItems > 0 but no elements are allowed (#75)Remove internal caching due to hash collisions
Canonicalise anyOf special cases when all subschemas have only the type keyword
anyOf special cases when all subschemas have only the type keywordPerformance improvements from careful caching
fixed string schemas with different format keywords
format keywords (#63)improved handling of overlapping items keywords
items keywords (#58)improved handling of overlapping dependencies keywords
dependencies keywords (#57)fixed an internal bug where results incorrectly depended on iteration order
Adds a custom_formats keyword argument to from_schema(), so that you can specify a strategy to generate strings for custom formats like credit card nu
custom_formats keyword argument to from_schema(), so that you can
specify a strategy to generate strings for custom formats like credit card numbers.
Thanks to Dmitry Dygalo, whose sponsorship
motivated me to add the feature!Substantial performance gains for some schemas, via improved handling of the contains, not, anyOf, and if/then/else keywords
contains, not, anyOf, and if/then/else keywordsPerformance improvement for object schemas with additionalProperties: false (issue #55)
object schemas with additionalProperties: false (issue #55)Performance improvement for schemas with non-validation keys (such as description)
description)multipleOf keysSignificantly improved efficiency of certain patternProperties schemas.
patternProperties schemas.Fixed several bugs related to interactions between properties, patternProperties, and additionalProperties. As a result some strategies will be more e
properties, patternProperties,
and additionalProperties. As a result some strategies will be more efficient than
before and others less; and further gains seem likely.Improved strategy for json-pointer and relative-json-pointer string formats
json-pointer and relative-json-pointer string formatscontains constraintsallOf schemasPerformance improvement in calculating schema intersections
Improved canonicalisation of uniqueItems: false case
uniqueItems: false casejsonschema validators during canonicalisation (performance improvement)Added a strategy for the "color" format
"color" formatFixed error in resolution of certain $ref\ s
$ref\ sanyOf and contains keysRequires Hypothesis >= 5.3.0, for improved IP address strategies
This is the largest feature in a while, and for some schemata it is a breaking change. It's also a fundamental part of the spec, so I'm OK with that!
$ref keyword.This is the largest feature in a while, and for some schemata it is a breaking change. It's also a fundamental part of the spec, so I'm OK with that!
Note that hypothesis-jsonschema will raise an explicit error rather than fetching
a remote resource via URI. If think your tests really should hit the network,
get in touch and we can discuss adding an off-by-default option for this.
Improved canonicalisation of conflicting minProperties and maxProperties
minProperties and maxPropertiesfrom_schemaenum schema now shrink to a minimal example rather than the first value listed. This also makes the internals more efficient in certain rare cases.
enum schema now shrink to a minimal example rather than the first value listed.
This also makes the internals more efficient in certain rare cases.Improved handling of non-integer numeric schemas with multipleOf
multipleOfnot in many common casesdependencies on required keyspropertyNames bans a required keyImproved handling of numeric schemas, especially integer schemas with multipleOf.
multipleOf.0.9.12.items, additionalItems: false,
and a maxItems larger than the number of allowed items would resolve to an
invalid strategy.Improved internal handling of schemas for arrays which must always be length-zero.
Fixed RFC 3339 strings generation. Thanks to Dmitry Dygalo for the patch!
Fixed a bug where objects which could have either zero or one properties would always be generated with zero.
Updated project metadata and development tooling
Correct handling of {"items": [...], "uniqueItems": true"} schemas
{"items": [...], "uniqueItems": true"} schemasCorrected handling of the "format" keyword with unknown values - custom values are allowed by the spec and should be treated as annotations (i.e. igno
"format" keyword with unknown values - custom values
are allowed by the spec and should be treated as annotations (i.e. ignored).Improved canonicalisation, especially for deeply nested schemas.
A performance optimisation for null and boolean schema, which relies on a bugfix in jsonschema >= 3.0.2.
jsonschema >= 3.0.2.Improved handling of the contains keyword for arrays
contains keyword for arraysImproved canonicalisation and merging for a wide range of schemas, which as usual unlocks significant optimisations and performance improvements for c
Future-proofed canonicalisation of type key.
type key.Better internal canonicalization, which makes current and future optimisations more widely applicable.
enum with elements disallowed by base schema,
handling of if-then-else with a base schema, and handling of regex
patterns that are invalid in Python.Fix the fix for numeric schemas with multipleOf and exclusive bounds.
multipleOf and exclusive bounds.Supports merging schemas for overlapping patternProperties, a significant performance improvement in most cases.
patternProperties,
a significant performance improvement in most cases."type" key is missing, it is now inferred from other keys
rather than always defaulting to "object".Improve performance for object schemas where the min and max size can be further constrained from properties and propertyNames attributes.
properties and propertyNames attributes.Supports draft-04 schemata with the latest version of jsonschema
jsonschemaFurther improved support for allOf, oneOf, and anyOf with base schemata
allOf, oneOf, and anyOf with base schematadependenciespatternPropertiesImproved support for allOf, oneOf, and propertyNames
jsonschema >= 3.0allOf, oneOf, and propertyNames"type": [an array of types]Fix continuous delivery configuration (*before* the latent bug manifested)
Support for conditional subschemata, i.e. the if, then, else keywords, and the anyOf, allOf, oneOf, and not keywords.
if, then, else keywords,
and the anyOf, allOf, oneOf, and not keywords.Works with jsonschema 3.0 pre-release
jsonschema 3.0 pre-releaseDropped dependency on canonicaljson
canonicaljsonRelicensed under the more permissive Mozilla Public License, like Hypothesis
maxItems and contains keywordsSupports string formats (email, datetime, etc) and simple use of the "contains" keyword for arrays.
Supports string formats (email, datetime, etc) and simple use of the
"contains" keyword for arrays.
Good support for all basic types. MVP.
Good support for all basic types. MVP.
Inference for null, boolean, string, and numeric types.
Inference for null, boolean, string, and numeric types.
Your coding agent can read these notes before it upgrades. Set up the MCP server →