[issue27172] Undeprecate inspect.getfullargspec()

Brett Cannon report at bugs.python.org
Wed Nov 29 13:24:28 EST 2017


Brett Cannon <brett at python.org> added the comment:

Nick pointed me at this issue for the undeprecation of inspect.getfullargspec(). While I'm fine with the un-deprecation for compatibility reasons, I would rather the function not last beyond Python 3 un-deprecated. Nick says, though that:
"""
... the undeprecation
isn't a Python 2/3 issue, it's a "tuples, lists and dicts are really
handy representations of things, and Python developers often prefer
them to more structured objects" issue.

The modern inspect.getfullargspec implementation is a relatively thin
wrapper around inspect.signature, and the only lossy part of the
output transformation is that you can't tell the difference between
positional-only and positional-or-keyword parameters.
"""

My argument is TOOWDI and as of right now there's 3 for getting parameter information for functions (of which only one is currently deprecated). I would also argue that if people want a "signature to core data structure" translation then that can be covered by a package on PyPI since even now getfullargspec() is lossy and we don't need that kind of pragmatic support in the stdlib for this.

----------
nosy: +brett.cannon

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27172>
_______________________________________


More information about the Python-bugs-list mailing list