Hello,

The following file generates an exception with pylint

test.py
====
def doNotexecute():
   import IPython
   shell = IPython.Shell.IPShellEmbed()
====

If pylint is run from an Ipython shell, then no exception is shown, however it still takes a lot of time for pylint to return (around 30 sec).
If the last line is commented, then everything is fine.


1/ is it a known bug or misconfiguration ?
2/ is there a whay to tell pylint no to walk into objects (it looks like introspecting Ipython is the problem here)

Regards,

JM

pylint --version
pylint 0.14.0,
astng 0.17.2, common 0.30.0
Python 2.5.2 (r252:60911, Jan 24 2010, 14:53:14)
[GCC 4.3.2]


details about the traceback:
pylint -e test.py
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/logilab/astng/manager.py", line 109, in astng_from_file
   astng = ASTNGBuilder(self).file_build(filepath, modname)
File "/usr/lib/python2.5/site-packages/logilab/astng/builder.py", line 220, in file_build
   node = self.string_build(data, modname, path)
File "/usr/lib/python2.5/site-packages/logilab/astng/builder.py", line 230, in string_build
   return self.ast_build(parse(data + '\n'), modname, path)
File "/usr/lib/python2.5/site-packages/logilab/astng/builder.py", line 250, in ast_build
   self._walker.walk(node)
File "/usr/lib/python2.5/site-packages/logilab/astng/utils.py", line 60, in walk
   self.walk(child_node)
File "/usr/lib/python2.5/site-packages/logilab/astng/utils.py", line 60, in walk
   self.walk(child_node)
File "/usr/lib/python2.5/site-packages/logilab/astng/utils.py", line 55, in walk
   self.visit(node)
File "/usr/lib/python2.5/site-packages/logilab/astng/utils.py", line 84, in visit
   method(node)
File "/usr/lib/python2.5/site-packages/logilab/astng/builder.py", line 385, in visit_from
   imported = node.root().import_module(node.modname)
File "/usr/lib/python2.5/site-packages/logilab/astng/scoped_nodes.py", line 255, in import_module
   return MANAGER.astng_from_module_name(self.relative_name(modname))
File "/usr/lib/python2.5/site-packages/logilab/astng/manager.py", line 137, in astng_from_module_name
   module = load_module_from_name(modname)
File "/usr/lib/python2.5/site-packages/logilab/common/modutils.py", line 106, in load_module_from_name
   return load_module_from_modpath(dotted_name.split('.'), path, use_sys)
File "/usr/lib/python2.5/site-packages/logilab/common/modutils.py", line 149, in load_module_from_modpath
   module = load_module(curname, mp_file, mp_filename, mp_desc)
File "/usr/lib/python2.5/site-packages/numpy/__init__.py", line 97, in <module>
   import testing
File "/usr/lib/python2.5/site-packages/numpy/testing/__init__.py", line 3, in <module>
   from numpytest import *
File "/usr/lib/python2.5/site-packages/numpy/testing/numpytest.py", line 7, in <module>
   import shlex
 File "/usr/lib/python2.5/shlex.py", line 12, in <module>
   from collections import deque
File "/usr/lib/python2.5/site-packages/matplotlib/collections.py", line 13, in <module>
   import matplotlib as mpl
File "/usr/lib/python2.5/site-packages/matplotlib/__init__.py", line 128, in <module>
   from rcsetup import defaultParams, validate_backend, validate_toolbar
File "/usr/lib/python2.5/site-packages/matplotlib/rcsetup.py", line 18, in <module>
   from matplotlib.colors import is_color_like
File "/usr/lib/python2.5/site-packages/matplotlib/colors.py", line 38, in <module>
   from numpy import ma
File "/usr/lib/python2.5/site-packages/numpy/ma/__init__.py", line 14, in <module>
   import core
File "/usr/lib/python2.5/site-packages/numpy/ma/core.py", line 67, in <module>
   import numpy.core.umath as umath
AttributeError: 'module' object has no attribute 'core'
pylint -e test.py  22.10s user 0.26s system 98% cpu 22.596 total

_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to