Skip to content

maximum recursion depth exceeded in 1050 string join #231

Description

@pyflakes-bot

Original report by jayvdb (@jayvdb?) on Launchpad:


Running current pyflakes on astroid results in maximum recursion depth exceeded on a test module.

https://bitbucket.org/logilab/astroid/src/6d4e198bdc7091f36c2c24d911c5ee92b64847c2/astroid/tests/testdata/python2/data/joined_strings.py

$ pyflakes  astroid/tests/testdata/python2/data/joined_strings.py
Traceback (most recent call last):
  File "/usr/bin/pyflakes", line 9, in <module>
    load_entry_point('pyflakes==1.0.0', 'console_scripts', 'pyflakes')()
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/api.py", line 172, in main
    warnings = checkRecursive(args, reporter)
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/api.py", line 129, in checkRecursive
    warnings += checkPath(sourcePath, reporter)
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/api.py", line 96, in checkPath
    return check(codestr, filename, reporter)
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/api.py", line 57, in check
    w = checker.Checker(tree, filename)
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/checker.py", line 294, in __init__
    self.handleChildren(tree)
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/checker.py", line 567, in handleChildren
    self.handleNode(node, tree)
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/checker.py", line 609, in handleNode
    handler(node)
...
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/checker.py", line 609, in handleNode
    handler(node)
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/checker.py", line 566, in handleChildren
    for node in iter_child_nodes(tree, omit=omit):
  File "/usr/lib/python2.7/site-packages/pyflakes-1.0.0-py2.7.egg/pyflakes/checker.py", line 80, in iter_child_nodes
    if isinstance(field, ast.AST):
RuntimeError: maximum recursion depth exceeded while calling a Python object

Setting sys.setrecursionlimit(2500) fixes the problem

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions