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

fix: address warnings in test_checkers #4686

Open
terriko opened this issue Jan 10, 2025 · 0 comments
Open

fix: address warnings in test_checkers #4686

terriko opened this issue Jan 10, 2025 · 0 comments
Labels
good first issue Good for newcomers

Comments

@terriko
Copy link
Contributor

terriko commented Jan 10, 2025

Description

It looks like we're still using some deprecated stuff from pkg_resources, which is understandable because cve-bin-tool is older than the current preferred way for handling certain things. But it's time to refactor and bring ourselves into the future! Here's the warnings:

=============================== warnings summary ===============================
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[apache-httpd-expected_results0]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[vim-vim-enhanced-expected_results53]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[ffmpeg-libffmpeg.so-expected_results8]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[libexpat-libexpat.so-expected_results17]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[openssh_client-ssh-keyscan-expected_results35]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[python-python3.8-expected_results44]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[node-bin/node-expected_results26]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[bind-libisccc-9.16.37-Debian.so-expected_results62]
  /opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/pbr/git.py:28: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

test/test_checkers.py::TestCheckerVersionParser::test_filename_is[apache-httpd-expected_results0]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[vim-vim-enhanced-expected_results53]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[ffmpeg-libffmpeg.so-expected_results8]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[libexpat-libexpat.so-expected_results17]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[openssh_client-ssh-keyscan-expected_results35]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[python-python3.8-expected_results44]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[node-bin/node-expected_results26]
test/test_checkers.py::TestCheckerVersionParser::test_filename_is[bind-libisccc-9.16.37-Debian.so-expected_results62]
  /opt/hostedtoolcache/Python/3.10.16/x64/lib/python3.10/site-packages/pkg_resources/__init__.py:3142: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
  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)

I don't offhand know what we need to change to, but you should be able to figure it out by searching and reading the docs including the links they provided in the warning message above.

To reproduce

Steps to reproduce the behaviour:

  1. run pytest with longtests enabled: LONG_TESTS=1 pytest test/test_checkers.py

Expected behaviour: no warnings
Actual behaviour: the warnings above apear

Anything else?

Feel free to add any other context here.

Short tips for new contributors:

  • cve-bin-tool's contributor docs
  • If you've contributed to open source but not this project, you might just want our checklist for a great pull request
  • cve-bin-tool uses https://www.conventionalcommits.org/ style for commit messages, and we have a test that checks the title of your pull request (PR). A good potential title for this one is in the title of this issue.
  • You can make an issue auto close by including a comment "fixes #ISSUENUMBER" in your PR comments where ISSUENUMBER is the actual number of the issue. This "links" the issue to the pull request.

Claiming issues:

  • You do not need to have an issue assigned to you before you work on it. To "claim" an issue either make a linked pull request or comment on the issue saying you'll be working on it.
  • If someone else has already commented or opened a pull request, assume it is claimed and find another issue to work on.
  • If it's been more than 1 week without progress, you can ask in a comment if the claimant is still working on it before claiming it yourself (give them at least 3 days to respond before assuming they have moved on).
@terriko terriko added the good first issue Good for newcomers label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant