logilab-astng #8946 infinite recursion during inference [rejected]

Brian reported on python-projects

I have a pylint bug to report (actually probably astng). The type inferencing step gets into an infinite recursive loop under a certain condition, which I have isolated:

mkdir P

echo "
def p():
  from P import M
  M.foo = None
" > P/__init__.py

echo "
import P
P.foo = None
" > P/M.py

pylint P

All good the first time through (no .pyc files). Now run pylint again (__init__.pyc left by first run)... OOPS!

Changing "from P import M" to "import P.M as M" makes the problem go away as well.

This is with pylint-0.18.0, logilab-astng-0.19.0, logilab-common-0.39.0, and python-2.5 under Linux 2.6.18-8.1.10.el5.x86_64.

done in0.19.1
load left0.000
closed by<not specified>