Commit d470273d authored by Jason R. Coombs's avatar Jason R. Coombs

Merge pull request #23 from dstufft/silence-pep440-warnings

Silence PEP440Warning by default unless invoking easy_install
parents 57e7ab8e 5df13754
......@@ -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):
......
......@@ -54,9 +54,14 @@ from pkg_resources import (
import pkg_resources
# Turn on PEP440Warnings
warnings.filterwarnings("default", category=pkg_resources.PEP440Warning)
sys_executable = os.environ.get('__PYVENV_LAUNCHER__',
os.path.normpath(sys.executable))
__all__ = [
'samefile', 'easy_install', 'PthDistributions', 'extract_wininst_cfg',
'main', 'get_exe_prefixes',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment