This is a follow-up to b4565b41ea (PR #1043),
to support closures, async functions and generators in `inspect.signature`.
Signed-off-by: Damien George <damien@micropython.org>
This implements a very basic `inspect.signature()` function.
At the moment it returns only a simple `Signature` instance with a
`parameters` attribute that holds an `OrderedDict` whose length matches the
arity of the input function (the number of arguments it takes).
So, the following code works and is compatible with CPython:
def f(a, b, *, c):
pass
print(len(inspect.signature(f).parameters))
That should print 3.
Signed-off-by: Damien George <damien@micropython.org>
Also optimise both `isgenerator()` and `isgeneratorfunction()` so they use
the same lambda, and don't have to create it each time they are called.
Fixes issue #997.
Signed-off-by: Damien George <damien@micropython.org>
Uses the new require()/package()/module() functions from manifestfile.py.
Add manifest.py for iperf3 and pyjwt.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>