-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Maximum recursion depth exceeded during analysis of two files #3836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Pierre-Sassoulas i cannot reproduce it either. |
I also had difficulty reproducing when using another directory than the original one. I managed to do it by installing the following dependencies:
I wanted to pin down the exact dependencies required without setting them with pip freeze, but the problem started to happen everywhere even after deleting the virtualenv (?!). |
@psass-edfsf in order for us to investigate on this potential issue, could you provide a restricted set of dependencies required to trigger the infinite recursion? |
I have also started seeing this in a recent PR on my project which also adds a new checker: My specifics are that pylint executes against a large pool of files (site-packages dir) but for some reason this happens only in CI. Locally starts to happen when I have 3x the amount of packages installed.
Note: as far as we can tell disabling the new checker being added in the PR above doesn't cause the recursion issues. This is very puzzling. Do you have any hints on how to investigate this ? |
Possible duplicate #3602 |
I've been able to dig more information around this. For me it happens when executing pylint against
Attached is the full traceback I get - traceback.txt |
which was discovered to trigger a recursion loop: pylint-dev/pylint#3836 (comment)
which was discovered to trigger a recursion loop: pylint-dev/pylint#3836 (comment)
@atodorov thanks for your feed back. We will investigate this ASAP. |
which was discovered to trigger a recursion loop: pylint-dev/pylint#3836 (comment)
Hi, New virtualenv, Python 3.8.0 (Python 3.6 seems unaffected, oddly). Drop this into
Then
|
Workaround; turns out this is a genuinely large recursion problem, and can be gotten around by putting the following in your pylintrc file:
(3x works for me, YMMV). Perhaps there's some way to make the Pylint error more helpful, and point to a relevant FAQ section or something? |
Is it worth trying to figure out why it's recursing so much first? |
Definitely worth trying to figure out IMO. |
@timstaley thanks for your report. This is probably link to #3939 which has been fixed in the current |
So it seems that releasing a new version of astroid and pylint would fix the problem for all pandas < 1.1.5. As long as 2.6.1 is not released, the fix to the init_hook provided by @timstaley seems acceptable : #3836 (comment) We can probably wait for the fix for all version of pandas before releasing |
@Pierre-Sassoulas yes we can try to solve the bug for pandas 1.1.5 before releasing what i think could be a major pylint version (2.7). |
This was solved in pylint 2.7 / astroid 2.5. |
Steps to reproduce
a.py
:b.py
in the same directory thana.py
a.py
Current behavior
Expected behavior
pylint --version output
pylint 2.6.0
astroid 2.4.2
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0]
The text was updated successfully, but these errors were encountered: