Skip to content

Commit

Permalink
Improve warning visibility with due date and reference url
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Nov 21, 2023
1 parent d148d9e commit c836172
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions setuptools/dep_util.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit c836172

Please sign in to comment.