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

4.3: argparse-manpage uses deprecated pkg_resources module #98

Closed
kloczek opened this issue Jul 4, 2023 · 1 comment
Closed

4.3: argparse-manpage uses deprecated pkg_resources module #98

kloczek opened this issue Jul 4, 2023 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Jul 4, 2023

pytest already shows

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-argparse-manpage-4.3-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-argparse-manpage-4.3-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/argparse-manpage-4.3
configfile: pytest.ini
collected 21 items

tests/test_basic.py ...                                                                                                                                                               [ 14%]
tests/test_examples.py ..s.s.s.s.s.s.                                                                                                                                                 [ 80%]
tests/test_script.py ....                                                                                                                                                             [100%]

===================================================================================== warnings summary ======================================================================================
tests/argparse_testlib.py:7
  /home/tkloczko/rpmbuild/BUILD/argparse-manpage-4.3/tests/argparse_testlib.py:7: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import parse_version

../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871
  /usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2871: 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
================================================================================== short test summary info ==================================================================================
SKIPPED [6] tests/argparse_testlib.py:26: Too old Python version for testing PIP installation (Python 3.10 required, have 3.8.17)
========================================================================= 15 passed, 6 skipped, 6 warnings in 3.03s =========================================================================
[tkloczko@pers-jacek argparse-manpage-4.3]$ grep -r pkg_resources
examples/copr/copr_cli/main.py:import pkg_resources
examples/copr/copr_cli/main.py:        # pkg_resources magic doesn't work during 'setup.py build', but it
examples/copr/copr_cli/main.py:    return pkg_resources.require('copr-cli')[0].version
tests/argparse_testlib.py:from pkg_resources import parse_version
@praiskup
Copy link
Owner

Thank you very much for the report, this is being tracked in #86.

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