diff options
author | Paul Ganssle <pganssle@users.noreply.github.com> | 2018-10-29 12:41:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-29 12:41:50 -0400 |
commit | 566f3aadfa112b8d6b9a1ecf5178552f6e0f8c6c (patch) | |
tree | 661aa631695a78bb6011888cf49edf0b60b7dbd4 /setuptools/command/egg_info.py | |
parent | 29f9cb087fd107f412e2a2f0df877e3b14a75be9 (diff) | |
parent | 3a9dc2b03ef313ee7729606fb56ae9b41066dfd1 (diff) | |
download | external_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/command/egg_info.py')
-rw-r--r-- | setuptools/command/egg_info.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index bd116e1f..e1022d31 100644 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -31,7 +31,7 @@ import setuptools.unicode_utils as unicode_utils from setuptools.glob import glob from setuptools.extern import packaging - +from setuptools import SetuptoolsDeprecationWarning def translate_pattern(glob): """ @@ -696,7 +696,7 @@ def get_pkg_info_revision(): Get a -r### off of PKG-INFO Version in case this is an sdist of a subversion revision. """ - warnings.warn("get_pkg_info_revision is deprecated.", DeprecationWarning) + warnings.warn("get_pkg_info_revision is deprecated.", EggInfoDeprecationWarning) if os.path.exists('PKG-INFO'): with io.open('PKG-INFO') as f: for line in f: @@ -704,3 +704,7 @@ def get_pkg_info_revision(): if match: return int(match.group(1)) return 0 + + +class EggInfoDeprecationWarning(SetuptoolsDeprecationWarning): + """Class for warning about deprecations in eggInfo in setupTools. Not ignored by default, unlike DeprecationWarning.""" |