Pythoscope exits with maximum recursion depth exceeded exception
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pythoscope |
Fix Released
|
Medium
|
Michal Kwiatkowski |
Bug Description
Found by Edward K. Ream (http://
When run on the Leo project (http://
$ pythoscope leo/core/
INFO: Inspecting module launchLeo.py.
[big cut...]
INFO: Inspecting module leo\modes\latex.py.
ERROR: Oops, it seems internal Pythoscope error occured. Please file a bug report at https:/
Traceback (most recent call last):
File "c:\Python25\
load_
File "c:\python25\
line 176, in main
generate_
File "c:\python25\
line 104, in generate_tests
inspect_
File "c:\python25\
line 11, in inspect_project
updates = add_and_
add_and_
File "c:\python25\
line 36, in add_and_
static.
File "c:\python25\
line 119, in inspect_module
return inspect_
File "c:\python25\
line 126, in inspect_code
visitor = descend(tree, ModuleVisitor)
File "c:\python25\
line 58, in descend
visitor.
File "c:\python25\
line 234, in visit
self.
File "c:\python25\
line 247, in visit_node
if pattern.match(node, results):
File "c:\python25\
line 428, in match
if not self._submatch(
File "c:\python25\
line 542, in _submatch
for c, r in generate_
File "c:\python25\
line 744, in generate_matches
for c0, r0 in p.generate_
File "c:\python25\
line 658, in generate_matches
for count, r in self._recursive
[big snip]
File "c:\python25\
line 686, in _recursive_matches
for c0, r0 in generate_
File "c:\python25\
line 744, in generate_matches
for c0, r0 in p.generate_
File "c:\python25\
line 451, in generate_matches
if nodes and self.match(
RuntimeError: maximum recursion depth exceeded
C:\leo.repo\trunk>
Related branches
Changed in pythoscope: | |
assignee: | nobody → ruby |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in pythoscope: | |
milestone: | none → 0.4.1-setup-and-teardown-fixes |
Setting max recursion limit to 2500 (via sys.setrecursio nlimit: http:// docs.python. org/library/ sys.html# sys.setrecursio nlimit) in astvisitor. ASTVisitor. visit_node makes it work. Documentation page says that "the highest possible limit is platform-dependent" and doesn't mention what are the values for different platforms, so we should research that before making a change.
Still, that's only a workaround. Maybe there's a way to make lib2to3. pytree. WildcardPattern ._recursive_ matches iterative? That would fix the problem once and for all.