pyflakes crashes with AttributeError. No attribute 'varargannotation'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Fix Released
|
High
|
Unassigned |
Bug Description
As of python 3.4.0 pyflakes will crash in checker.py:
File "../site-
for annotation in (node.args.
AttributeError: 'arguments' object has no attribute 'varargannotation'
Code that generates the error
if hasattr(node, 'returns'): # Only for FunctionDefs
for annotation in (node.args.
It seems that the module ast has changed from python 3.3 to 3.4. The attribute 'varargannotation' is no longer present in the newer version.
In 3.3 the documentation: (http://
arguments = (arg* args, identifier? vararg, expr? varargannotation,
In 3.4 the dokumentation says: (http://
arguments = (arg* args, arg? vararg, arg* kwonlyargs, expr* kw_defaults,
Changed in pyflakes: | |
status: | Fix Committed → Fix Released |
Circumventing the reported error reveals a second bug:
AttributeError: 'FlakesChecker' object has no attribute 'NAMECONSTANT'. I assume this has to do with the new Enumeration type in 3.4. Anyhow a second fix avoids also this crash to get it back to a "working" state.
These fixes should just be considered a hint at how to fix these problems.