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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

22f1001635
Copy link

Summary
This PR resolves the deprecation warnings in test_checkers.py caused by the usage of pkg_resources, which has been deprecated in favor of importlib.metadata and importlib.resources.

Changes Introduced

  • Replaced pkg_resources with importlib.metadata and importlib.resources for improved compatibility.
  • Used conditional imports to ensure support for older Python versions (<3.10 for metadata and <3.9 for resources).
  • Retained pkgutil.extend_path for namespace package handling while aligning with PEP 420.

Checklist

  • Code follows the project's coding standards.
  • Tests have been run to verify the changes.
  • No new warnings appear during test execution.

Steps to Reproduce & Test

Run the following command:

LONG_TESTS=1 pytest test/test_checkers.py
  • Ensured that no deprecation warnings related to pkg_resources appear.
  • Verified that all tests pass successfully.

Related Issues
Fixes #4686

Additional Notes
These changes ensure compatibility with modern Python versions while maintaining backward compatibility. 🚀

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

Successfully merging this pull request may close these issues.

fix: address warnings in test_checkers
1 participant