-
-
Notifications
You must be signed in to change notification settings - Fork 594
Comparing changes
Open a pull request
base repository: python-jsonschema/jsonschema
base: v4.25.0
head repository: python-jsonschema/jsonschema
compare: v4.25.1
- 20 commits
- 9 files changed
- 4 contributors
Commits on Jul 21, 2025
-
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.3 → v0.12.4](astral-sh/ruff-pre-commit@v0.12.3...v0.12.4)
Configuration menu - View commit details
-
Copy full SHA for 03bd950 - Browse repository at this point
Copy the full SHA 03bd950View commit details
Commits on Jul 22, 2025
-
Merge pull request #1391 from python-jsonschema/pre-commit-ci-update-…
…config [pre-commit.ci] pre-commit autoupdate
Configuration menu - View commit details
-
Copy full SHA for 6f6b371 - Browse repository at this point
Copy the full SHA 6f6b371View commit details
Commits on Jul 28, 2025
-
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.4 → v0.12.5](astral-sh/ruff-pre-commit@v0.12.4...v0.12.5)
Configuration menu - View commit details
-
Copy full SHA for c959d96 - Browse repository at this point
Copy the full SHA c959d96View commit details
Commits on Jul 30, 2025
-
Merge pull request #1393 from python-jsonschema/pre-commit-ci-update-…
…config [pre-commit.ci] pre-commit autoupdate
Configuration menu - View commit details
-
Copy full SHA for 5ab4eb9 - Browse repository at this point
Copy the full SHA 5ab4eb9View commit details
Commits on Aug 4, 2025
-
Bump astral-sh/setup-uv from 6.3.1 to 6.4.3
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 6.3.1 to 6.4.3. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](astral-sh/setup-uv@bd01e18...e92bafb) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 6.4.3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 57b3b4d - Browse repository at this point
Copy the full SHA 57b3b4dView commit details -
Merge pull request #1394 from python-jsonschema/dependabot/github_act…
…ions/astral-sh/setup-uv-6.4.3 Bump astral-sh/setup-uv from 6.3.1 to 6.4.3
Configuration menu - View commit details
-
Copy full SHA for eb3d2a4 - Browse repository at this point
Copy the full SHA eb3d2a4View commit details -
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.5 → v0.12.7](astral-sh/ruff-pre-commit@v0.12.5...v0.12.7)
Configuration menu - View commit details
-
Copy full SHA for 2e91ceb - Browse repository at this point
Copy the full SHA 2e91cebView commit details -
Merge pull request #1395 from python-jsonschema/pre-commit-ci-update-…
…config [pre-commit.ci] pre-commit autoupdate
Configuration menu - View commit details
-
Copy full SHA for 980e09c - Browse repository at this point
Copy the full SHA 980e09cView commit details
Commits on Aug 11, 2025
-
[pre-commit.ci] pre-commit autoupdate
updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.12.7 → v0.12.8](astral-sh/ruff-pre-commit@v0.12.7...v0.12.8)
Configuration menu - View commit details
-
Copy full SHA for 4be1093 - Browse repository at this point
Copy the full SHA 4be1093View commit details
Commits on Aug 12, 2025
-
Configuration menu - View commit details
-
Copy full SHA for 7c808cb - Browse repository at this point
Copy the full SHA 7c808cbView commit details -
Merge pull request #1397 from python-jsonschema/pre-commit-ci-update-…
…config [pre-commit.ci] pre-commit autoupdate
Configuration menu - View commit details
-
Copy full SHA for de60f18 - Browse repository at this point
Copy the full SHA de60f18View commit details -
Fix
Validator
protocol init to match runtimeThe runtime init signature of a validator can be seen with `inspect`: ```pycon >>> import inspect, jsonschema >>> inspect.signature(jsonschema.validators.Draft7Validator.__init__) <Signature (self, schema: 'referencing.jsonschema.Schema', resolver=None, format_checker: '_format.FormatChecker | None' = None, *, registry: 'referencing.jsonschema.SchemaRegistry' = <Registry (20 resources)>, _resolver=None) -> None> ``` This aligns the protocol's declared signature with that behavior more exactly with the following changes: `registry` is now keyword-only, not keyword-or-positional, and has a default. `resolver` is added to the declared signature, so users who are using it won't see typing-time discrepancies with the runtime. It is marked as `Any` and commented inline as deprecated, since it's unclear what else we could do to indicate its status. This means that code passing a resolver will continue to type check (previously it would not). `resolver` is the second keyword-or-positional and `format_checker` is the third, meaning that a positional-only caller who passes, for example: `Draft202012Validator(foo, None, bar)` will have `foo` slotted as the schema and `bar` as the `format_checker` This would primarily impact callers with positional-args calling conventions, but is more reflective of what they'll see at runtime. In order to remove `resolver` from the protocol signature, but match the runtime signatures well, some kind of placeholder is needed to indicate `format_checker` as positional-or-keyword. Or else, a large number of overloads for `__init__` could be declared to try to simulate its removal.
Configuration menu - View commit details
-
Copy full SHA for a916d8f - Browse repository at this point
Copy the full SHA a916d8fView commit details
Commits on Aug 18, 2025
-
Bump astral-sh/setup-uv from 6.4.3 to 6.5.0
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 6.4.3 to 6.5.0. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](astral-sh/setup-uv@e92bafb...d9e0f98) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-version: 6.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bf603d5 - Browse repository at this point
Copy the full SHA bf603d5View commit details -
Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6c25741 - Browse repository at this point
Copy the full SHA 6c25741View commit details -
Add a typing test for the Validator protocol
The typing tests are a new subdirectory of `jsonschema/tests/` which are checked under a more stringent mypy configuration (`--warn-unused-ignores`) in order to allow certain kinds of negative tests against the declared types. [^1] The first new test confirms that each validator matches the Validator protocol, and furthermore that this is not vacuously true by way of `Any`. The test failed at first, as the return type of `create()` was not annotated, and therefore under the declared types in `jsonschema`, all of the validators were of type `Any`. To resolve, the return type of `create` is now annotated as `type[Validator]`. [^1]: Technically, the new nox configuration checks these files twice, but only the second check, with `--warn-unused-ignores`, is doing all of the necessary work.
Configuration menu - View commit details
-
Copy full SHA for 64bc217 - Browse repository at this point
Copy the full SHA 64bc217View commit details -
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Configuration menu - View commit details
-
Copy full SHA for 1e58409 - Browse repository at this point
Copy the full SHA 1e58409View commit details -
Merge pull request #1396 from sirosen/improve-protocol-init-signature
Fix `Validator` protocol init to match runtime
Configuration menu - View commit details
-
Copy full SHA for 460f4fa - Browse repository at this point
Copy the full SHA 460f4faView commit details -
Merge pull request #1399 from python-jsonschema/dependabot/github_act…
…ions/actions/checkout-5 Bump actions/checkout from 4 to 5
Configuration menu - View commit details
-
Copy full SHA for 8e7d594 - Browse repository at this point
Copy the full SHA 8e7d594View commit details -
Merge pull request #1398 from python-jsonschema/dependabot/github_act…
…ions/astral-sh/setup-uv-6.5.0 Bump astral-sh/setup-uv from 6.4.3 to 6.5.0
Configuration menu - View commit details
-
Copy full SHA for c1ec0a6 - Browse repository at this point
Copy the full SHA c1ec0a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 331c384 - Browse repository at this point
Copy the full SHA 331c384View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v4.25.0...v4.25.1