-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
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
pylint is broken with CPython main #101914
Labels
3.12
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
release-blocker
type-bug
An unexpected behavior, bug, or error
Comments
More simple way to reproduce it: a = b()
func(1) Backtrace: ************* Module test
test.py:1:0: C0114: Missing module docstring (missing-module-docstring)
test.py:1:4: E0602: Undefined variable 'b' (undefined-variable)
Exception on node <Call l.2 at 0x7f4912053dd0> in file '/home/eclips4/projects/test.py'
Traceback (most recent call last):
File "/home/eclips4/projects/venv_3_12/lib/python3.12/site-packages/pylint/utils/ast_walker.py", line 91, in walk
callback(astroid)
File "/home/eclips4/projects/venv_3_12/lib/python3.12/site-packages/pylint/checkers/base/basic_checker.py", line 705, in visit_call
if utils.is_terminating_func(node):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eclips4/projects/venv_3_12/lib/python3.12/site-packages/pylint/checkers/utils.py", line 2181, in is_terminating_func
return True
^^^^
File "/home/eclips4/projects/venv_3_12/lib/python3.12/site-packages/astroid/nodes/node_ng.py", line 171, in infer
yield from self._infer(context=context, **kwargs)
File "/home/eclips4/projects/venv_3_12/lib/python3.12/site-packages/astroid/decorators.py", line 142, in raise_if_nothing_inferred
yield next(generator)
^^^^^^^^^^^^^^^
File "/home/eclips4/projects/venv_3_12/lib/python3.12/site-packages/astroid/decorators.py", line 111, in wrapped
for res in _func(node, context, **kwargs):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/eclips4/projects/venv_3_12/lib/python3.12/site-packages/astroid/inference.py", line 240, in infer_name
raise NameInferenceError(
astroid.exceptions.NameInferenceError: 'func' not found in <Module.test l.0 at 0x7f49126cdd30>.
test.py:1:0: F0002: test.py: Fatal error while checking 'test.py'. Please open an issue in our bug tracker so we address this. There is a pre-filled template that you can use in '/home/eclips4/.cache/pylint/pylint-crash-2023-02-17-20-32-34.txt'. (astroid-error)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00) |
Fixed by #103502. |
Would be nice if there's a relatively small regression test we could add! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.12
bugs and security fixes
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
release-blocker
type-bug
An unexpected behavior, bug, or error
Bug report
pylint
currently crashes with CPython main. I noticed this when I noticed thepylint
benchmark in Pyston's benchmark suite was no longer working.The first bad commit is 4a1c58d (@markshannon), issue #96793, PR #98772.
I don't know whether this is the result of expected breakage (and
pylint
orastroid
needs to modify their code) or there is a specialization failure here.Your environment
Linux
To reproduce
pip install pylint==2.16.2
Download the example Python file from the pyston macrobenchmark suite
pylint dist.py
Backtrace:
The text was updated successfully, but these errors were encountered: