You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behavior should probably be deprecated, and eventually removed. Interfaces that should accept generic number-like objects should use the PyNumber API instead.
@batuhan: I think so, yes; at least, the "deprecated" part is done. The "eventually removed" is not, and I don't know whether we have a target version for that removal.
Activity
embray commentedon Dec 28, 2017
Per Serhiy's comment in this thread https://mail.python.org/pipermail/python-ideas/2017-December/048413.html (which I agree with), several of the PyLong_ functions have behavior carried over from Python 2 of calling __int__ on their arguments if the input is not a PyLongObject:
PyLong_AsLong
PyLong_AsLongAndOverflow
PyLong_AsLongLong
PyLong_AsLongLongAndOverflow
PyLong_AsUnsignedLongMask
PyLong_AsUnsignedLongLongMask
This behavior should probably be deprecated, and eventually removed. Interfaces that should accept generic number-like objects should use the PyNumber API instead.
serhiy-storchaka commentedon Dec 28, 2017
See also bpo-17576. And there may be other related issues.
isidentical commentedon Dec 28, 2019
Is this related/resolved with bpo-36048?
mdickinson commentedon Dec 28, 2019
@batuhan: I think so, yes; at least, the "deprecated" part is done. The "eventually removed" is not, and I don't know whether we have a target version for that removal.
mdickinson commentedon Dec 28, 2019
Closing as a duplicate of bpo-36048 (which isn't quite right, since this issue came first, but it's probably close enough).