Skip to content

Commit 05cb3c8

Browse files
authored
Merge pull request #5014 from pypa/debt/pkg_resources-deadline
Set a deadline for pkg_resources removal
2 parents a3bfef9 + 3b0bf5b commit 05cb3c8

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

newsfragments/3085.feature.1.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Set a deadline for the removal of pkg_resources later this year (December).

pkg_resources/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,11 @@
9797

9898
warnings.warn(
9999
"pkg_resources is deprecated as an API. "
100-
"See https://setuptools.pypa.io/en/latest/pkg_resources.html",
101-
DeprecationWarning,
100+
"See https://setuptools.pypa.io/en/latest/pkg_resources.html. "
101+
"The pkg_resources package is slated for removal as early as "
102+
"2025-11-30. Refrain from using this package or pin to "
103+
"Setuptools<81.",
104+
UserWarning,
102105
stacklevel=2,
103106
)
104107

pytest.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ filterwarnings=
8484
# Avoid errors when testing pkg_resources.declare_namespace
8585
ignore:.*pkg_resources\.declare_namespace.*:DeprecationWarning
8686

87-
# suppress known deprecation
88-
ignore:pkg_resources is deprecated:DeprecationWarning
87+
# suppress known deprecation pypa/setuptools#3085
88+
ignore:pkg_resources is deprecated:UserWarning
8989

9090
# Dependencies might not have been updated yet
9191
default:onerror argument is deprecated, use onexc instead

0 commit comments

Comments
 (0)