Skip to content

Add jsonschema.protocols to library stubs#6614

Merged
srittau merged 3 commits intopython:masterfrom
sirosen:jsonschema-validator-protocol
Dec 17, 2021
Merged

Add jsonschema.protocols to library stubs#6614
srittau merged 3 commits intopython:masterfrom
sirosen:jsonschema-validator-protocol

Conversation

@sirosen
Copy link
Contributor

@sirosen sirosen commented Dec 16, 2021

closes #6564

I'm not sure if the import from typing_extensions import Protocol was the correct way to write this for typeshed. Please inform me if I was mistaken, and I'll correct it right away.


jsonschema.protocols.Validator was introduced in jsonschema v4.3.0 It's also available under the name jsonschema.Validator.

This protocol definition is a near-verbatim copy of the implementation in jsonschema.

@sirosen sirosen force-pushed the jsonschema-validator-protocol branch from b75ee79 to 5725540 Compare December 16, 2021 21:04
`jsonschema.protocols.Validator` was introduced in `jsonschema` v4.3.0
It's also available under the name `jsonschema.Validator`.

This protocol definition is a near-verbatim copy of the implementation
in `jsonschema`.
@sirosen sirosen force-pushed the jsonschema-validator-protocol branch from 5725540 to 7d8de25 Compare December 16, 2021 21:11
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit 806a5bc into python:master Dec 17, 2021
@sirosen sirosen deleted the jsonschema-validator-protocol branch December 17, 2021 15:31
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.

How should jsonschema.protocols.Validator be introduced?

3 participants