Nick Coghlan <ncogh...@gmail.com> added the comment:

If there was a documented deprecation that said "Use <this PyPI package> 
instead", I'd be OK with that.

The part I wasn't OK with is multiple projects each copying & pasting their own 
variant of the getfullargspec code and accessing private inspect module APIs in 
order to get the old behaviour back.

So in order to move this to PyPI instead, we'd need to offer a completely 
public API that was equivalent to `_signature_from_callable(func, 
follow_wrapper_chains=False, skip_bound_arg=False, sigcls=Signature)`

`inspect.Signature.from_callable(func, follow_wrapped=False)` comes very close, 
but misses a subtlety where "getfullargspec" will mention "self" for bound 
methods, even though it's implicitly supplied, and doesn't need to be supplied 
by the caller.

That aspect could potentially just be deprecated outright though, with the PyPI 
replacement following inspect.signature's behaviour and reporting the actual 
call signature of the bound method.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue27172>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to