lincolnloop / python-qrcode

Python QR Code image generator
https://pypi.python.org/pypi/qrcode
Other
4.25k stars 660 forks source link

7.4.2: pytest `DeprecationWarning` warnings #326

Open kloczek opened 1 year ago

kloczek commented 1 year ago

pkg_resources should be no longer used.

+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.16, pytest-7.3.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/python-qrcode-7.4.2
configfile: setup.cfg
plugins: remotedata-0.4.0
collected 78 items

qrcode/tests/test_example.py .                                                                                                                                                        [  1%]
qrcode/tests/test_qrcode.py ......................................................                                                                                                    [ 70%]
qrcode/tests/test_qrcode_svg.py ......                                                                                                                                                [ 78%]
qrcode/tests/test_release.py ....                                                                                                                                                     [ 83%]
qrcode/tests/test_script.py ............                                                                                                                                              [ 98%]
qrcode/tests/test_util.py .                                                                                                                                                           [100%]

===================================================================================== warnings summary ======================================================================================
qrcode/tests/test_script.py::ScriptTest::test_bad_factory
  /usr/lib/python3.8/site-packages/pkg_resources/__init__.py:121: DeprecationWarning: pkg_resources is deprecated as an API
    warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)

qrcode/tests/test_script.py::ScriptTest::test_bad_factory
  /usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2870: 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#keyword-namespace-packages
    declare_namespace(pkg)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================== 78 passed, 2 warnings in 6.50s ===============================================================================