Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.2
-
None
Description
At the moment in shiboken, the isConvertible methods from the primitive types handling seems not to be accurate.
For example:
- For Integers, we use the function PyFloat_Check
- For Floats, we use the function PyInt_Check(pyIn) || PyLong_Check(pyIn)
- and the same happens with long, bool, etc.
Also, the complementary methods isOtherConvertible is mainly using SbkNumber_Check which is an alias to PyNumber_Check, function that's too permissive since accept both integers and floats.
On CPython's HISTORY file (Misc/HISTORY), there is a statement that suggest its deprecation in the future:
PyNumber_Check() is not very useful to determine numeric behavior. It may be deprecated.)
Attachments
Issue Links
- relates to
-
PYSIDE-1375 Overflow-Checks produce a Warning/Error Mix
- Reported
Gerrit Reviews
For Gerrit Dashboard: PYSIDE-1000 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
259597,3 | WIP: Improve primitive types converters | 5.14 | pyside/pyside-setup | Status: ABANDONED | -2 | 0 |