[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

Serhiy Storchaka report at bugs.python.org
Thu Mar 30 01:09:17 EDT 2017


Serhiy Storchaka added the comment:

My apologies for breaking the world.

The workaround is to undefine PySlice_GetIndicesEx after #include "Python.h".

#if PY_VERSION_HEX < 0x03070000 && defined(PySlice_GetIndicesEx)
#undef PySlice_GetIndicesEx
#endif

But this restores the initial bug.

Other obvious solution -- declare 3.6.0 broken and require upgrading to 3.6.1.

For 3.5.4 we can disable defining the macro when Py_LIMITED_API is not defined. This will restore the initial bug in many extensions. And we need other way to detect if we compile the CPython core or standard extensions for fixing the bug in standard collections. Or expand all uses of PySlice_GetIndicesEx to PySlice_Unpack+PySlice_AdjustIndices (the patch can be generated automatically).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29943>
_______________________________________


More information about the Python-bugs-list mailing list