You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am trying to generate models from openapi3 schema using BaseParser class.
It imports jsonschema's RefResolutionError, which is now showing deprecation warning.
I am using prance==23.6.21.0 and jsonschema==4.19.0
def _validate_openapi_spec_validator(
self, spec_version: Version
): # pragma: nocover
from openapi_spec_validator import validate_spec
from jsonschema.exceptions import ValidationError as JSEValidationError
from jsonschema.exceptions import RefResolutionError
Actual Behaviour
../../../../../.virtualenvs/my_proj/lib/python3.8/site-packages/prance/__init__.py:118: in __init__
self.parse()
../../../../../.virtualenvs/my_proj/lib/python3.8/site-packages/prance/__init__.py:148: in parse
self._validate()
../../../../../.virtualenvs/my_proj/lib/python3.8/site-packages/prance/__init__.py:187: in _validate
validator(parsed)
../../../../../.virtualenvs/my_proj/lib/python3.8/site-packages/prance/__init__.py:234: in _validate_openapi_spec_validator
from jsonschema.exceptions import RefResolutionError
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
name = 'RefResolutionError'
def __getattr__(name):
if name == "RefResolutionError":
> warnings.warn(
_RefResolutionError._DEPRECATION_MESSAGE,
DeprecationWarning,
stacklevel=2,
)
E DeprecationWarning: jsonschema.exceptions.RefResolutionError is deprecated as of version 4.18.0. If you wish to catch potential reference resolution errors, directly catch referencing.exceptions.Unresolvable.
Thanks in advance.
Environment
OS: macOS 11.7.8
Python version: 3.8.7
Swagger/OpenAPI version used: 3.0.2
Backend: openapi-spec-validator
The text was updated successfully, but these errors were encountered:
dzen90
changed the title
Import in __init__ causes jsonschema deprecation warning
Import in BaseParser causes jsonschema deprecation warning
Aug 29, 2023
Hi, I am trying to generate models from openapi3 schema using BaseParser class.
It imports jsonschema's RefResolutionError, which is now showing deprecation warning.
I am using prance==23.6.21.0 and jsonschema==4.19.0
Actual Behaviour
Thanks in advance.
Environment
The text was updated successfully, but these errors were encountered: