diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-01-02 15:15:47 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-01-02 15:15:47 -0500 |
commit | a76f5c03136f0c69e8c366bf4069ec8d89d85da7 (patch) | |
tree | 1143faa0a65fbc1d2006952822ab95b24f391024 | |
parent | de5caaee3c9a23600b96f512ed2054b4e27357a8 (diff) | |
download | external_python_setuptools-a76f5c03136f0c69e8c366bf4069ec8d89d85da7.tar.gz external_python_setuptools-a76f5c03136f0c69e8c366bf4069ec8d89d85da7.tar.bz2 external_python_setuptools-a76f5c03136f0c69e8c366bf4069ec8d89d85da7.zip |
Pop the module off the stack, preventing the 'Version' class from having a different manifestation in packaging than in pkg_resources.
--HG--
branch : feature/issue-229
-rw-r--r-- | pkg_resources/extern/__init__.py | 3 | ||||
-rw-r--r-- | setuptools/extern/__init__.py | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/pkg_resources/extern/__init__.py b/pkg_resources/extern/__init__.py index 17a582ea..b7f87ee9 100644 --- a/pkg_resources/extern/__init__.py +++ b/pkg_resources/extern/__init__.py @@ -28,8 +28,7 @@ class VendorImporter: for prefix in self.search_path: try: __import__(prefix + target) - mod = sys.modules[prefix + target] - sys.modules[fullname] = mod + mod = sys.modules[fullname] = sys.modules.pop(prefix + target) return mod except ImportError: pass diff --git a/setuptools/extern/__init__.py b/setuptools/extern/__init__.py index 1329285c..e1400238 100644 --- a/setuptools/extern/__init__.py +++ b/setuptools/extern/__init__.py @@ -28,8 +28,7 @@ class VendorImporter: for prefix in self.search_path: try: __import__(prefix + target) - mod = sys.modules[prefix + target] - sys.modules[fullname] = mod + mod = sys.modules[fullname] = sys.modules.pop(prefix + target) return mod except ImportError: pass |