logilab-common #253517 pylint: "no module named paste" [deprecated]

From: kris kvilekval <kris@cs.ucsb.edu> To: code-quality@python.org Subject: [code-quality] ImportError: No module named paste

I am using pip to install all dependencies of new packages and am running into a few issues (see error at end of email).

The following patch seems to remove the issue. Not sure why imports of names space packages had to be greater than one, but it seems like pip installs namespaces differently than easy_install did.

$ hg diff
diff --git a/modutils.py b/modutils.py
--- a/modutils.py
+++ b/modutils.py
@@ -612,11 +612,14 @@
     except AttributeError:
         checkeggs = False
     # pkg_resources support (aka setuptools namespace packages)
-    if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages and len(modpath) > 1:
+#    if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages and len(modpath) > 1:
+    if pkg_resources is not None and modpath[0] in pkg_resources._namespace_packages:#
         # setuptools has added into sys.modules a module object with proper
         # __path__, get back information from there
         module = sys.modules[modpath.pop(0)]
         path = module.__path__
+        mtype = PKG_DIRECTORY
+        mp_filename = path[0]
     imported = []
     while modpath:
         modname = modpath[0]
prioritynormal
typebug
done in0.63.0
load0.000
load left0.000
closed by<not specified>