You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performing pylint on Python codes that include pandas.merge makes a RecursionError like below.
I'm not sure the error was caused by pandas itself, but at least I can say pylint with pandas==1.1.4 doesn't raise the error, and pylint with pandas==1.1.5 raises.
For pylint side, an issue about it was already opened, so I've opened it just in case for those who will face the same problem. pylint-dev/pylint#3969
...
res = next(generator)
File "/private/tmp/pandas-pylint/venv/lib/python3.8/site-packages/astroid/inference.py", line 293, in infer_attribute
for owner in self.expr.infer(context):
File "/private/tmp/pandas-pylint/venv/lib/python3.8/site-packages/astroid/util.py", line 160, in limit_inference
yield from islice(iterator, size)
File "/private/tmp/pandas-pylint/venv/lib/python3.8/site-packages/astroid/context.py", line 113, in cache_generator
for result in generator:
File "/private/tmp/pandas-pylint/venv/lib/python3.8/site-packages/astroid/decorators.py", line 132, in raise_if_nothing_inferred
yield next(generator)
File "/private/tmp/pandas-pylint/venv/lib/python3.8/site-packages/astroid/decorators.py", line 93, in wrapped
generator = _func(node, context, **kwargs)
File "/private/tmp/pandas-pylint/venv/lib/python3.8/site-packages/astroid/inference.py", line 203, in infer_name
context = contextmod.copy_context(context)
File "/private/tmp/pandas-pylint/venv/lib/python3.8/site-packages/astroid/context.py", line 155, in copy_context
return context.clone()
File "/private/tmp/pandas-pylint/venv/lib/python3.8/site-packages/astroid/context.py", line 102, in clone
clone = InferenceContext(self.path, inferred=self.inferred)
RecursionError: maximum recursion depth exceeded
ikedaosushi
changed the title
BUG: pylint with merging of pandas==1.1.5 raises a RecursionError
BUG: pylint with merge of pandas==1.1.5 raises a RecursionError
Dec 8, 2020
This issue is caused by astroid , which is a dependency of pylint , and the root cause has been fixed on astroid 's master already. However the last release of astroid is 2020-04-27, so we have to wait a new release of astroid, or specify the master of astroid in our requirement.txt. pylint-dev/astroid#804
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
Performing
pylint
on Python codes that includepandas.merge
makes a RecursionError like below.I'm not sure the error was caused by pandas itself, but at least I can say
pylint
withpandas==1.1.4
doesn't raise the error, andpylint
withpandas==1.1.5
raises.For
pylint
side, an issue about it was already opened, so I've opened it just in case for those who will face the same problem.pylint-dev/pylint#3969
I might think the commit can be related to the problem.
e99e5ab#diff-7c4c2c4161d35fe8d1d71cc86b45abcc642271069f05cf860d9195a304d2ed33
Expected Output
No error will be raised.
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: