mabuchilab / Instrumental

Python-based instrumentation library from the Mabuchi Lab.
http://instrumental-lib.readthedocs.org/
GNU General Public License v3.0
117 stars 77 forks source link

python >=3.11 inspect changes #160

Closed Max-Herbold closed 1 year ago

Max-Herbold commented 1 year ago

ignore the extra params in getfullargspec. This is backwards compatible to <=3.10

natezb commented 1 year ago

Since we're dropping support for Python 2 (and your unpacking solution requires 3+ anyway), there's no need to attempt the import of getargspec(). I think we should just import getfullargspec() and use it directly.

Max-Herbold commented 1 year ago

maybe it's more verbose to breakout FullArgSpec(args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations) to args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations rather than args, varargs, varkw, defaults, *_.