This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients SilentGhost, eric.snow, larry, ncoghlan, ned.deily, r.david.murray, ryan.petrello, yselivanov
Date 2016-11-27.13:13:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Initial patch attached. Key missing pieces:

- needs a What's New note
- needs to undeprecate inspect.getcallargs() as well (more on that below)

As my last couple of comments indicate, I'd forgotten that only getargspec() was programmatically deprecated, which means the sole code change is a rewording of the getargspec() warning to mention both signature() and getfullargspec().

The documentation changes are a bit more extensive, as I couldn't resist fixing the longstanding terminology error in the docs and docstrings, where these functions are mostly reporting *parameter* names, not argument names (callable arguments have values, not names).

I think the "versionchanged" note works well for indicating that folks aren't imagining things if they remembered seeing this function marked as deprecated.

However, I also went back and checked the 3.5 What's New, and that does mention the deprecations, so I'll need to do another version of this patch that includes a 3.6 What's New notice retracting those deprecations.

That check also reveals some other documented deprecations that should probably be reverted.

Firstly, getargvalues() and formatargvalues() are *frame* introspection functions, and hence have nothing whatsoever to do with inspect.signature(). The code and docs are just a bit confusing as they're interleaved with the callable introspection functions. I've filed that as a new issue:

Secondly, notes that inspect.getcallargs() has some behaviours that differ from Signature.bind in a way that's a bit of a pain to replicate on top of the latter. Similar to getfullargspec(), what do folks think of the idea of reverting that deprecation at least until 2.7 goes EOL?

(Noting for the record so folks don't wonder if it's an accidental oversight: I think formatargspec should retain its documented deprecation, as folks really are better off writing their own formatting function based on the data returned or switching to the new signature API)
Date User Action Args
2016-11-27 13:13:20ncoghlansetrecipients: + ncoghlan, larry, ned.deily, r.david.murray, SilentGhost, eric.snow, yselivanov, ryan.petrello
2016-11-27 13:13:20ncoghlansetmessageid: <>
2016-11-27 13:13:20ncoghlanlinkissue27172 messages
2016-11-27 13:13:20ncoghlancreate