pypi / jsonschema
jsonschema
What changed in jsonschema 4, from its official release notes, upgrade guides and advisories. Also covers types-jsonschema. Sources checked 2026-10-23.
3 breaking5 deprecations4 new APIs and options2 behavior and defaults2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initjsonschema 416 changes
Breaking changes 3
DEFAULT_TYPES and the legacy validator type-specification mechanism were removed; customize Python types with TypeChecker.
False and 0 are now properly considered non-equal, including recursively within a container.
Support for Python 2 was dropped, and python_requires was properly set.
Deprecations 5
jsonschema.__version__ was deprecated.
jsonschema.RefResolver.in_scope was deprecated.
jsonschema.validators.meta_schemas was deprecated.
jsonschema.validators.validators was deprecated.
Passing a second-argument schema to Validator.iter_errors was deprecated.
New APIs and options 4
Partial support was added for Draft 2020-12, as well as 2019-09.
Validation errors now expose a json_path attribute describing their location in JSON path format.
The CLI option controls output format, accepting plain (the default) or pretty.
Validators should use TypeChecker to customize the set of Python types corresponding to JSON Schema types.
Behavior and default changes 2
Validators no longer import urllib.request at import time, avoiding that import-time side effect for developers importing the package.
Validation may be slower in some cases following the equality change.
Fixes and other changes 2
Support for IP address and domain name formats was improved.
When sufficiently large numbers cause overflow, validation now falls back to fraction division.