-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve warning visibility with due date and reference url
- Loading branch information
1 parent
d148d9e
commit c836172
Showing
1 changed file
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |