aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources.py
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2014-12-18 12:29:36 -0500
committerDonald Stufft <donald@stufft.io>2014-12-18 12:29:36 -0500
commit5df137548ceab35e51a53f12664df130bc8f2a5f (patch)
treef698976bfc5a3a49db1b9956079625638841cd37 /pkg_resources.py
parent57e7ab8ebab9981efed9936ca11c939e34d52eec (diff)
downloadexternal_python_setuptools-5df137548ceab35e51a53f12664df130bc8f2a5f.tar.gz
external_python_setuptools-5df137548ceab35e51a53f12664df130bc8f2a5f.tar.bz2
external_python_setuptools-5df137548ceab35e51a53f12664df130bc8f2a5f.zip
Silence PEP440Warning by default unless invoking easy_install
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 87fd2782..3a8edca5 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -2932,6 +2932,13 @@ def _mkstemp(*args,**kw):
os.open = old_open
+# Silence the PEP440Warning by default, so that end users don't get hit by it
+# randomly just because they use pkg_resources. We want to append the rule
+# because we want earlier uses of filterwarnings to take precedence over this
+# one.
+warnings.filterwarnings("ignore", category=PEP440Warning, append=True)
+
+
# Set up global resource manager (deliberately not state-saved)
_manager = ResourceManager()
def _initialize(g):