Skip to content

Incompatible with jsonschema 4.12.1 #162

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

Closed
nhc-motosumo opened this issue Aug 23, 2022 · 0 comments · Fixed by #163
Closed

Incompatible with jsonschema 4.12.1 #162

nhc-motosumo opened this issue Aug 23, 2022 · 0 comments · Fixed by #163

Comments

@nhc-motosumo
Copy link

Thanks for providing this package!

Our CI tests failed with the below error. The short-term fix was to add and pin jsonschema (which we are not using directly) to 4.10.2. The issue appeared when our build server picked up a more recent version; certainly the error appears for 4.12.1.

Python is 3.8 and we use pip. This package is added in this requirements.txt line:

openapi-core==0.13.8 # Not used directly but pyramid-openapi3==0.14 is incompatible with the latest openapi-core

It would be great to not have to pin and update jsonschema in our own application.

   self.config.include("pyramid_openapi3")
../venv3.8/lib/python3.8/site-packages/pyramid/config/__init__.py:632: in include
    c = self.maybe_dotted(callable)
../venv3.8/lib/python3.8/site-packages/pyramid/config/__init__.py:740: in maybe_dotted
    return self.name_resolver.maybe_resolve(dotted)
../venv3.8/lib/python3.8/site-packages/pyramid/path.py:327: in maybe_resolve
    return self._resolve(dotted, package)
../venv3.8/lib/python3.8/site-packages/pyramid/path.py:334: in _resolve
    return self._zope_dottedname_style(dotted, package)
../venv3.8/lib/python3.8/site-packages/pyramid/path.py:383: in _zope_dottedname_style
    found = __import__(used)
../venv3.8/lib/python3.8/site-packages/pyramid_openapi3/__init__.py:3: in <module>
    from .exceptions import extract_errors
../venv3.8/lib/python3.8/site-packages/pyramid_openapi3/exceptions.py:3: in <module>
    from openapi_core.schema.exceptions import OpenAPIError
../venv3.8/lib/python3.8/site-packages/openapi_core/schema/exceptions.py:2: in <module>
    from openapi_core.exceptions import OpenAPIError
../venv3.8/lib/python3.8/site-packages/openapi_core/__init__.py:3: in <module>
    from openapi_core.shortcuts import (
../venv3.8/lib/python3.8/site-packages/openapi_core/shortcuts.py:3: in <module>
    from openapi_core.schema.shortcuts import create_spec
../venv3.8/lib/python3.8/site-packages/openapi_core/schema/shortcuts.py:3: in <module>
    from openapi_spec_validator import (
../venv3.8/lib/python3.8/site-packages/openapi_spec_validator/__init__.py:7: in <module>
    from openapi_spec_validator.factories import JSONSpecValidatorFactory
../venv3.8/lib/python3.8/site-packages/openapi_spec_validator/factories.py:10: in <module>
    class Draft4ExtendedValidatorFactory(Draft4Validator):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'openapi_spec_validator.factories.Draft4ExtendedValidatorFactory'>

    def __init_subclass__(cls):
>       warnings.warn(
            (
                "Subclassing validator classes is not intended to "
                "be part of their public API. A future version "
                "will make doing so an error, as the behavior of "
                "subclasses isn't guaranteed to stay the same "
                "between releases of jsonschema. Instead, prefer "
                "composition of validators, wrapping them in an object "
                "owned entirely by the downstream library."
            ),
            DeprecationWarning,
            stacklevel=2,
        )
E       DeprecationWarning: Subclassing validator classes is not intended to be part of their public API. A future version will make doing so an error, as the behavior of subclasses isn't guaranteed to stay the same between releases of jsonschema. Instead, prefer composition of validators, wrapping them in an object owned entirely by the downstream library.

../venv3.8/lib/python3.8/site-packages/jsonschema/validators.py:195: DeprecationWarning
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 a pull request may close this issue.

1 participant