-
-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace deprecated jsonschema.RefResolver
with referencing.Registry
#2023
base: main
Are you sure you want to change the base?
Replace deprecated jsonschema.RefResolver
with referencing.Registry
#2023
Conversation
Thanks for this, I'm a little tired of seeing those warnings every time I run tox. I hope someone can explain why the code test pipeline/workflow didn't run automatically on this PR, only the read-the-docs check? |
@@ -13,9 +14,11 @@ | |||
|
|||
import requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the imports are grouped (1) python standard, (2) third party and (3) connexion. FWIW maybe it's worth sorting within categories (1) and (2) here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a sorting within categories: At first normal imports
sorted alphabetically, then from
imports sorted alphabetically.
If I change the order isort
will complain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for explaining, I didn't spot that pattern, never mind!
|
||
|
||
def retrieve(uri: str) -> Resource: | ||
parsed = urllib.parse.urlsplit(uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you please consider adding pydoc for this new function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
The python-jsonschema/referencing#178 Did you notice any slowdown here? |
ee04d60
to
5ba75c9
Compare
I did not notice any slowdown in the tests. I did not try with larger schemas. |
The workflow requires approval from a maintainer according to https://github.com/spec-first/connexion/actions |
5ba75c9
to
2d70dde
Compare
Fixes #1786 (which was closed prematurely as pointed out in #1786 (comment))
Fixes the following deprecation warnings:
See also https://python-jsonschema.readthedocs.io/en/latest/referencing/#migrating-from-refresolver