Skip to content
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

3.0.3: pytest warnings #171

Open
kloczek opened this issue May 2, 2024 · 1 comment
Open

3.0.3: pytest warnings #171

kloczek opened this issue May 2, 2024 · 1 comment

Comments

@kloczek
Copy link

kloczek commented May 2, 2024

pytest 8.1.1

=============================== warnings summary ===============================
tests/common_test.py:4
  /home/tkloczko/rpmbuild/BUILD/swagger_spec_validator-3.0.3/tests/common_test.py:4: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_
    from pkg_resources import resource_filename

../../../../../usr/lib/python3.10/site-packages/pkg_resources/__init__.py:2832
  /usr/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#key
    declare_namespace(pkg)

swagger_spec_validator/validator12.py:18
swagger_spec_validator/validator12.py:18
  /home/tkloczko/rpmbuild/BUILD/swagger_spec_validator-3.0.3/swagger_spec_validator/validator12.py:18: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of th
    from jsonschema import RefResolver

swagger_spec_validator/ref_validators.py:14
  /home/tkloczko/rpmbuild/BUILD/swagger_spec_validator-3.0.3/swagger_spec_validator/ref_validators.py:14: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of
    from jsonschema.validators import RefResolver

swagger_spec_validator/validator20.py:18
  /home/tkloczko/rpmbuild/BUILD/swagger_spec_validator-3.0.3/swagger_spec_validator/validator20.py:18: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of th
    from jsonschema.validators import RefResolver

tests/validator20/deref_test.py:4
  /home/tkloczko/rpmbuild/BUILD/swagger_spec_validator-3.0.3/tests/validator20/deref_test.py:4: DeprecationWarning: jsonschema.exceptions.RefResolutionError is deprecated as of version 4.18
    from jsonschema.exceptions import RefResolutionError

tests/validator20/deref_test.py:5
  /home/tkloczko/rpmbuild/BUILD/swagger_spec_validator-3.0.3/tests/validator20/deref_test.py:5: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https
    from jsonschema.validators import RefResolver

tests/validator20/validate_spec_test.py:4
  /home/tkloczko/rpmbuild/BUILD/swagger_spec_validator-3.0.3/tests/validator20/validate_spec_test.py:4: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of t
    from jsonschema.validators import RefResolver

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================= 166 passed, 9 warnings in 14.68s =======================
@elisalle
Copy link

elisalle commented Oct 8, 2024

I'm receiving the same warnings; they appear to be caused by jsonschema.validators.RefResolver being deprecated in favour of referencing.Registry.
The migration guide with the solution is here: https://python-jsonschema.readthedocs.io/en/latest/referencing/#migrating-from-refresolver.

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

No branches or pull requests

2 participants