Open
Description
https://setuptools.pypa.io/en/stable/history.html#v80-9-0
Set a deadline for the removal of pkg_resources later this year (December). (#3085)
and emits corresponding warning.
This leads to test failure:
=================================== FAILURES ===================================
_______ AstroidManagerTest.test_identify_old_namespace_package_protocol ________
self = <tests.test_manager.AstroidManagerTest testMethod=test_identify_old_namespace_package_protocol>
def test_identify_old_namespace_package_protocol(self) -> None:
# Like the above cases, this package follows the old namespace package protocol
# astroid currently assumes such packages are in sys.modules, so import it
# pylint: disable-next=import-outside-toplevel
> import tests.testdata.python3.data.path_pkg_resources_1.package.foo as _ # noqa
tests/test_manager.py:124:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/testdata/python3/data/path_pkg_resources_1/package/__init__.py:5: in <module>
__import__("pkg_resources").declare_namespace(__name__)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
...
E UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
/usr/lib64/python3/site-packages/pkg_resources/__init__.py:98: UserWarning