Yelp / swagger_spec_validator

Other
104 stars 71 forks source link

3.0.3: pytest warnings #171

Open kloczek opened 5 months ago

kloczek commented 5 months ago

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 commented 3 days ago

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.