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, Tim.Graham, eric.snow, larry, ncoghlan, ned.deily, python-dev, r.david.murray, ryan.petrello, serhiy.storchaka, yselivanov
Date 2017-10-10.06:17:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507616276.27.0.213398074469.issue27172@psf.upfronthosting.co.za>
In-reply-to
Content
Larry, your personal insult is entirely unwelcome, unnecessary, and unappreciated, especially as it's wrong regarding the Python 2/3 compatibility concerns.

While getfullargspec() is indeed new in Python 3.x, it's also deliberately designed as a *drop-in replacement* for inspect.getargspec(). This means straddling Python 2 & 3 is straightforward, since you just need to toggle which API function you call (getargspec() on 2.7, getfullargspec() on 3.x).

This is *not* the case for switching to the inspect.signature() API: doing that for existing code that still supports Python 2.7 also requires switching to one of the third party backports of that API to 2.7, and then changing the way your own code models function signatures.

This is why getfullargspec() only received a documented deprecation, rather than a programmatic one. However, the combination of that notice in the documentation with the programmatic deprecation warning in getargspec() was enough to make people believe that in order to add Python 3 support, they *also* had to either switch to the inspect.signature() API, or else write and maintain their own version of getfullargspec().

That wasn't the intended outcome, and we have no plans to actually remove getfullargspec(), so I changed the wording in the getargspec() deprecation warning and the getfullargspec() documentation to better encourage the desired behaviour (i.e. inspect.signature() being used in new code, and existing code being migrated to the inspect.signature() API as developers find value in doing so)
History
Date User Action Args
2017-10-10 06:17:56ncoghlansetrecipients: + ncoghlan, larry, ned.deily, r.david.murray, SilentGhost, python-dev, eric.snow, serhiy.storchaka, yselivanov, Tim.Graham, ryan.petrello
2017-10-10 06:17:56ncoghlansetmessageid: <1507616276.27.0.213398074469.issue27172@psf.upfronthosting.co.za>
2017-10-10 06:17:56ncoghlanlinkissue27172 messages
2017-10-10 06:17:55ncoghlancreate