New submission from dmlockhart <[email protected]>:
I have some code which performs transformations of python ast objects. The
code
executes as expected in CPython 2.7, but when run with the pypy interpreter, I
receive the following traceback:
Traceback (most recent call last):
File "app_main.py", line 72, in run_toplevel
File "ast_exception_bug.py", line 47, in <module>
new_tree = RemoveSelf().visit( tree )
File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 241, in
visit
return visitor(node)
File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 297, in
generic_visit
value = self.visit(value)
File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 241, in
visit
return visitor(node)
File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 297, in
generic_visit
value = self.visit(value)
File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 241, in
visit
return visitor(node)
File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 297, in
generic_visit
value = self.visit(value)
File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 241, in
visit
return visitor(node)
File "/Users/dmlockhart/venvs/pypy-2.0.2/lib-python/2.7/ast.py", line 308, in
generic_visit
delattr(node, field)
AttributeError: cannot delete attribute
Platform: OSX Mavericks
Interpreters Tested:
pypy-2.0.2
pypy-2.1
----------
files: ast_exception_bug.py
messages: 6505
nosy: dmlockhart, pypy-issue
priority: bug
status: unread
title: ast.NodeTransformer throws AttributeError in pypy only
________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1680>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue