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 Deprecation Warnings in test_checkers (#4686) #4789

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cve_bin_tool/checkers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@
from cve_bin_tool.error_handler import InvalidCheckerError
from cve_bin_tool.util import regex_find

# Version-specific imports for metadata
if sys.version_info >= (3, 10):
from importlib import metadata as importlib_metadata
else:
import importlib_metadata

# Version-specific imports for resources
if sys.version_info >= (3, 9):
import importlib.resources as resources
else:
import importlib_resources as resources

# Package path extension while maintaining compatibility
from pkgutil import extend_path

__path__ = extend_path(__path__, __name__)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't understand why this change. Can you point me to some documentation explaining why this is needed? Because it looks like it's just extending the potential attack surface on the system rather than doing something we require going forwards.


__all__ = [
"Checker",
"VendorProductPair",
Expand Down