Hi,

I'm trying to setup a pre-commit hook on my git-trunk. This hook call pylint on the modified/added files. It works with Python2.5 but now i'm on Ubuntu Karmic with Python2.6 and I get a maximum recursion depth exceeded.

For both version of Python my pyling config is the same :
pylint 0.18.1,
astng 0.19.1, common 0.44.0

I put the traceback in case it would be useful.


Traceback (most recent call last):
  File "/usr/local/bin/pylint", line 5, in <module>
    pkg_resources.run_script('pylint==0.18.1', 'pylint')
File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 489, in run_script
    if dist.key not in keys2:
File "/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 1207, in run_script File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/EGG-INFO/scripts/pylint", line 4, in <module>
    lint.Run(sys.argv[1:])
File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/pylint/lint.py", line 884, in __init__
    linter.check(args)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/pylint/lint.py", line 501, in check
    self.check_astng_module(astng, checkers)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/pylint/lint.py", line 578, in check_astng_module
    if implements(checker, IASTNGChecker)])
File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/pylint/lint.py", line 595, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/pylint/lint.py", line 595, in astng_events
    self.astng_events(child, checkers, _reversed_checkers)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/pylint/lint.py", line 592, in astng_events
    checker.visit(astng)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/utils.py", line 320, in visit
    method(node)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/pylint/checkers/typecheck.py", line 184, in visit_assign
    function_node = safe_infer(node.value.func)
File "/usr/local/lib/python2.6/dist-packages/pylint-0.18.1-py2.6.egg/pylint/checkers/utils.py", line 38, in safe_infer
    value = inferit.next()
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/infutils.py", line 203, in wrapped
    for res in _func(node, context, **kwargs):
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/infutils.py", line 231, in wrapper
    for node in func(*args, **kwargs):
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/inference.py", line 281, in infer_getattr
    for obj in owner.igetattr(self.attrname, context):
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/infutils.py", line 265, in igetattr
    self._wrap_attr(self.getattr(name, context, lookupclass=False), context),
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/infutils.py", line 248, in getattr
    return self._proxied.instance_attr(name, context)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/scoped_nodes.py", line 49, in wrapper
    nodes = [n for n in func(*args, **kwargs) if not isinstance(n, cls)]
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/scoped_nodes.py", line 703, in instance_attr
    for class_node in self.instance_attr_ancestors(name, context):
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/scoped_nodes.py", line 672, in instance_attr_ancestors
    for astng in self.ancestors(context=context):
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/scoped_nodes.py", line 644, in ancestors
    for baseobj in stmt.infer(context):
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/infutils.py", line 203, in wrapped
    for res in _func(node, context, **kwargs):
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/inference.py", line 190, in infer_name
    frame, stmts = self.lookup(self.name)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/lookup.py", line 54, in lookup
    return self.scope().scope_lookup(self, name)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/lookup.py", line 89, in class_scope_lookup
    return scope_lookup(frame, node, name, offset)
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/lookup.py", line 68, in scope_lookup
    pscope = pscope.root()
File "/usr/local/lib/python2.6/dist-packages/logilab_astng-0.19.1-py2.6.egg/logilab/astng/nodes.py", line 202, in root
    return self.parent.root()
...
RuntimeError: maximum recursion depth exceeded


Thanks,
Benjamin


_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to