diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2009-09-11 23:23:25 +0200 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2009-09-11 23:23:25 +0200 |
commit | 7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e (patch) | |
tree | bc74b155cb5c056ae3d89332728a94b18b1380d7 /pkg_resources.py | |
parent | 6badc540234386ca7a27d3c90b22c565472475f1 (diff) | |
download | external_python_setuptools-7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e.tar.gz external_python_setuptools-7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e.tar.bz2 external_python_setuptools-7ee68f0c5fe9122442c3f44aa94ebd1dfcc7b47e.zip |
Use types.ModuleType instead of new.module.
--HG--
branch : distribute
extra : rebase_source : 3327441a867ad2878553ed1d42418a7e68ee3067
Diffstat (limited to 'pkg_resources.py')
-rw-r--r-- | pkg_resources.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index c636903c..5a464870 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -13,7 +13,7 @@ The package resource API is designed to work with normal filesystem packages, method. """ -import sys, os, zipimport, time, re, imp, new +import sys, os, zipimport, time, re, imp, types try: frozenset @@ -1707,7 +1707,7 @@ def _handle_ns(packageName, path_item): return None module = sys.modules.get(packageName) if module is None: - module = sys.modules[packageName] = new.module(packageName) + module = sys.modules[packageName] = types.ModuleType(packageName) module.__path__ = []; _set_parent_ns(packageName) elif not hasattr(module,'__path__'): raise TypeError("Not a package:", packageName) |