Skip to content

SchemaValidator per-resolver cache clarification#1191

Merged
p1c2u merged 1 commit into
masterfrom
feature/schema-validator-per-resolver-clarification
May 29, 2026
Merged

SchemaValidator per-resolver cache clarification#1191
p1c2u merged 1 commit into
masterfrom
feature/schema-validator-per-resolver-clarification

Conversation

@p1c2u
Copy link
Copy Markdown
Collaborator

@p1c2u p1c2u commented May 29, 2026

jsonschema-path 0.5 (which pulls pathable 0.6.0) changed the identity model:

  • SchemaPath is now an AccessorPath, and its identity key is (parts, accessor) — not parts alone.
  • SchemaAccessor.__eq__/__hash__ discriminate by id(self._node) and id(self._path_resolver), i.e. per-spec/per-resolver reference identity.

So the cache key is already effectively per-resolver.

Even two specs with identical content don't collide, because the accessor is keyed on object identity (is), not content.

@p1c2u p1c2u force-pushed the feature/schema-validator-per-resolver-clarification branch from 404b1c7 to 72abf0e Compare May 29, 2026 15:15
@p1c2u p1c2u changed the title SchemaValidator per-resolver clarification SchemaValidator per-resolver cache clarification May 29, 2026
@p1c2u p1c2u merged commit 9e11aa0 into master May 29, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant