From c836172e42822144ac4823e94fa1b0ed65c7ca54 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Tue, 21 Nov 2023 16:59:40 +0000 Subject: [PATCH] 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)