From c836172e42822144ac4823e94fa1b0ed65c7ca54 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 21 Nov 2023 16:59:40 +0000 Subject: [PATCH 1/2] Improve warning visibility with due date and reference url --- setuptools/dep_util.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setuptools/dep_util.py b/setuptools/dep_util.py index c8ab14c8f2..998ffa206e 100644 --- a/setuptools/dep_util.py +++ b/setuptools/dep_util.py @@ -1,14 +1,16 @@ -import warnings - from ._distutils import _modified +from .warnings import SetuptoolsDeprecationWarning def __getattr__(name): if name not in ['newer_group', 'newer_pairwise_group']: raise AttributeError(name) - warnings.warn( + SetuptoolsDeprecationWarning.emit( "dep_util is Deprecated. Use functions from setuptools.modified instead.", - DeprecationWarning, - stacklevel=2, + "Please use `setuptools.modified` instead of `setuptools.dep_util`.", + see_url="https://github.com/pypa/setuptools/pull/4069", + due_date=(2024, 5, 21), + # Warning added in v69.0.0 on 2023/11/20, + # See https://github.com/pypa/setuptools/discussions/4128 ) return getattr(_modified, name) From 14957384f9e408b2569e5caba85fd2090a8944c9 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 21 Nov 2023 18:12:23 +0000 Subject: [PATCH 2/2] Add news fragment --- newsfragments/4131.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/4131.bugfix.rst diff --git a/newsfragments/4131.bugfix.rst b/newsfragments/4131.bugfix.rst new file mode 100644 index 0000000000..615c73963d --- /dev/null +++ b/newsfragments/4131.bugfix.rst @@ -0,0 +1 @@ +Added missing estimated date for removing ``setuptools.dep_util`` (deprecated in v69.0.0).