summaryrefslogtreecommitdiff
path: root/setuptools/__init__.py
diff options
context:
space:
mode:
authorJunhan Huang <robinhuang@172-2-0-43.lightspeed.dybhfl.sbcglobal.net>2018-10-27 16:26:51 -0400
committerPaul Ganssle <paul@ganssle.io>2018-10-28 17:43:24 -0400
commit5854b0eba03dd257e30efff68f1632bdec5f0416 (patch)
tree4fa6de7fd235f29e5aca82c86da88d83651f9516 /setuptools/__init__.py
parent29f9cb087fd107f412e2a2f0df877e3b14a75be9 (diff)
downloadpython-setuptools-git-5854b0eba03dd257e30efff68f1632bdec5f0416.tar.gz
Add custom deprecation warning classes
`DeprecationWarning` is not visible by default in the latest versions of CPython, so this switches the deprecation warnings in setuptools and pkg_resources over to custom classes derived from `Warning` instead. Fixes issue github issue #159 Co-authored-by: Junhan Huang <robin.j.huang@gmail.com> Co-authored-by: Marton Pono <marci93@gmail.com>
Diffstat (limited to 'setuptools/__init__.py')
-rw-r--r--setuptools/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/setuptools/__init__.py b/setuptools/__init__.py
index 54309b57..e438036a 100644
--- a/setuptools/__init__.py
+++ b/setuptools/__init__.py
@@ -8,6 +8,8 @@ import distutils.filelist
from distutils.util import convert_path
from fnmatch import fnmatchcase
+from ._deprecation_warning import SetuptoolsDeprecationWarning
+
from setuptools.extern.six import PY3
from setuptools.extern.six.moves import filter, map
@@ -22,6 +24,7 @@ __metaclass__ = type
__all__ = [
'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require',
+ 'SetuptoolsDeprecationWarning',
'find_packages'
]
@@ -188,4 +191,5 @@ def findall(dir=os.curdir):
return list(files)
+# Apply monkey patches
monkey.patch_all()