Skip to content
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

RecursionError: maximum recursion depth exceeded #471

Open
ericwb opened this issue May 21, 2024 · 1 comment
Open

RecursionError: maximum recursion depth exceeded #471

ericwb opened this issue May 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ericwb
Copy link
Contributor

ericwb commented May 21, 2024

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/python/cpython
  2. precli --debug ../cpython/Lib/test/test_traceback.py
  3. See error
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
  File "/Users/ericwb/workspace/precli/precli/parsers/python.py", line 155, in visit_assignment
    self.visit(nodes)
  File "/Users/ericwb/workspace/precli/precli/parsers/__init__.py", line 121, in visit
    visitor_fn(node.children)
RecursionError: maximum recursion depth exceeded

Expected behavior
No errors

Version

precli 0.5.4
Copyright 2024 Secure Saurce LLC
License BUSL-1.1: Business Source License 1.1 <https://spdx.org/licenses/BUSL-1.1.html>
  Python 3.12.2 (main, May 13 2024, 16:18:42) [Clang 15.0.0 (clang-1500.3.9.4)]

Additional context

@ericwb ericwb added the bug Something isn't working label May 21, 2024
@ericwb
Copy link
Contributor Author

ericwb commented May 29, 2024

The root cause is a very huge assignment statement. Many variables being assigned at once.

https://github.com/python/cpython/blob/a8e35e8ebad8c3bb44d14968aa05d1acbc028247/Lib/test/test_traceback.py#L4240

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant