Skip to content

Commit c836172

Browse files
committed
Improve warning visibility with due date and reference url
1 parent d148d9e commit c836172

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

setuptools/dep_util.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
import warnings
2-
31
from ._distutils import _modified
2+
from .warnings import SetuptoolsDeprecationWarning
43

54

65
def __getattr__(name):
76
if name not in ['newer_group', 'newer_pairwise_group']:
87
raise AttributeError(name)
9-
warnings.warn(
8+
SetuptoolsDeprecationWarning.emit(
109
"dep_util is Deprecated. Use functions from setuptools.modified instead.",
11-
DeprecationWarning,
12-
stacklevel=2,
10+
"Please use `setuptools.modified` instead of `setuptools.dep_util`.",
11+
see_url="https://github.com/pypa/setuptools/pull/4069",
12+
due_date=(2024, 5, 21),
13+
# Warning added in v69.0.0 on 2023/11/20,
14+
# See https://github.com/pypa/setuptools/discussions/4128
1315
)
1416
return getattr(_modified, name)

0 commit comments

Comments
 (0)