Skip to content

Commit 8c99fc2

Browse files
Skip the test for old namespace package based on pkg_resource
It won't work when the package is removed anyway
1 parent 2da7a38 commit 8c99fc2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_manager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import astroid
1818
from astroid import manager, test_utils
19-
from astroid.const import IS_JYTHON, IS_PYPY, PY312_PLUS
19+
from astroid.const import IS_JYTHON, IS_PYPY, PY312_PLUS, PY314_PLUS
2020
from astroid.exceptions import (
2121
AstroidBuildingError,
2222
AstroidImportError,
@@ -117,6 +117,10 @@ def test_ast_from_namespace_pkgutil(self) -> None:
117117
def test_ast_from_namespace_pkg_resources(self) -> None:
118118
self._test_ast_from_old_namespace_package_protocol("pkg_resources")
119119

120+
@pytest.mark.skipif(
121+
PY314_PLUS,
122+
reason="The pkg_resources package is slated for removal as early as 2025-11-30",
123+
)
120124
def test_identify_old_namespace_package_protocol(self) -> None:
121125
# Like the above cases, this package follows the old namespace package protocol
122126
# astroid currently assumes such packages are in sys.modules, so import it

0 commit comments

Comments
 (0)