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

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)

----------

_______________________________________
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