function annotation raise "ValueError: Function has keyword-only arguments or annotations, use getfullargspec() API which can support them"

Bug #1597218 reported by Valérian Rousset
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cliff
New
Undecided
Unassigned

Bug Description

Python3 introduce (in PEP 3107) the function annotation concept, meaning that one can add information to a function declaration, which can be for example, be use to add types (as in PEP 484).

```
def f(s: str) -> None:
     pass
```
means that a it is a function taking a `str` and returning nothing.

Cliff fail if a function has ones, because it is using `inspect.getargspec` instead of the new `inspect.getfullargspec` in Python3.

I'm attaching a patch to resolve it.

Revision history for this message
Valérian Rousset (tharvik) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.