diff --git a/newsfragments/3085.feature.1.rst b/newsfragments/3085.feature.1.rst new file mode 100644 index 0000000000..eb7f5051c3 --- /dev/null +++ b/newsfragments/3085.feature.1.rst @@ -0,0 +1 @@ +Set a deadline for the removal of pkg_resources later this year (December). diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 630aaa9a42..926765b887 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -97,8 +97,11 @@ warnings.warn( "pkg_resources is deprecated as an API. " - "See https://setuptools.pypa.io/en/latest/pkg_resources.html", - DeprecationWarning, + "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.", + UserWarning, stacklevel=2, ) diff --git a/pytest.ini b/pytest.ini index b6efa6f918..e315bd296c 100644 --- a/pytest.ini +++ b/pytest.ini @@ -84,8 +84,8 @@ filterwarnings= # Avoid errors when testing pkg_resources.declare_namespace ignore:.*pkg_resources\.declare_namespace.*:DeprecationWarning - # suppress known deprecation - ignore:pkg_resources is deprecated:DeprecationWarning + # suppress known deprecation pypa/setuptools#3085 + ignore:pkg_resources is deprecated:UserWarning # Dependencies might not have been updated yet default:onerror argument is deprecated, use onexc instead