-
Kirill Smelkov authored
Starting from python3.11 inspect.formatargspec was removed: f = <function test_func.<locals>.zzz at 0x7fb6d265fec0> def fmtargspec(f): # -> str with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) > return inspect.formatargspec(*inspect.getargspec(f)) E AttributeError: module 'inspect' has no attribute 'formatargspec' golang/golang_test.py:1823: AttributeError We were already handling formatargspec deprecation in 45f4df9e (golang: tests: Silence inspect deprecation warning), but now is the time to actually replace its usage. -> Fix it by using `str(inspect.signature(f))` instead of `inspect.formatargspec(*inspect.getargspec(f))`.
c1e41ac8