aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/dist.py
diff options
context:
space:
mode:
authorPaul Ganssle <pganssle@users.noreply.github.com>2018-10-29 12:41:50 -0400
committerGitHub <noreply@github.com>2018-10-29 12:41:50 -0400
commit566f3aadfa112b8d6b9a1ecf5178552f6e0f8c6c (patch)
tree661aa631695a78bb6011888cf49edf0b60b7dbd4 /setuptools/dist.py
parent29f9cb087fd107f412e2a2f0df877e3b14a75be9 (diff)
parent3a9dc2b03ef313ee7729606fb56ae9b41066dfd1 (diff)
downloadexternal_python_setuptools-566f3aadfa112b8d6b9a1ecf5178552f6e0f8c6c.tar.gz
external_python_setuptools-566f3aadfa112b8d6b9a1ecf5178552f6e0f8c6c.tar.bz2
external_python_setuptools-566f3aadfa112b8d6b9a1ecf5178552f6e0f8c6c.zip
Merge pull request #1545 from robinjhuang/custom-deprecation-warnings
Custom deprecation warning classes.
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r--setuptools/dist.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index 6ee4a97f..f6078dbe 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -21,6 +21,8 @@ from setuptools.extern import six
from setuptools.extern import packaging
from setuptools.extern.six.moves import map, filter, filterfalse
+from . import SetuptoolsDeprecationWarning
+
from setuptools.depends import Require
from setuptools import windows_support
from setuptools.monkey import get_unpatched
@@ -33,7 +35,7 @@ __import__('setuptools.extern.packaging.version')
def _get_unpatched(cls):
- warnings.warn("Do not call this function", DeprecationWarning)
+ warnings.warn("Do not call this function", DistDeprecationWarning)
return get_unpatched(cls)
@@ -980,7 +982,7 @@ class Feature:
"Features are deprecated and will be removed in a future "
"version. See https://github.com/pypa/setuptools/issues/65."
)
- warnings.warn(msg, DeprecationWarning, stacklevel=3)
+ warnings.warn(msg, DistDeprecationWarning, stacklevel=3)
def __init__(
self, description, standard=False, available=True,
@@ -1069,3 +1071,7 @@ class Feature:
" doesn't contain any packages or modules under %s"
% (self.description, item, item)
)
+
+
+class DistDeprecationWarning(SetuptoolsDeprecationWarning):
+ """Class for warning about deprecations in dist in setuptools. Not ignored by default, unlike DeprecationWarning."""