Closed mgorny closed 1 month ago
Note that this
immutables/_map.c: In function ‘map_node_bitmap_dump’:
immutables/_map.c:1287:12: warning: implicit declaration of function ‘_PyLong_Format’; did you mean ‘_PyLong_Copy’? [-Wimplicit-function-declaration]
1287 | tmp2 = _PyLong_Format(tmp1, 2);
| ^~~~~~~~~~~~~~
| _PyLong_Copy
immutables/_map.c:1287:10: warning: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
1287 | tmp2 = _PyLong_Format(tmp1, 2);
| ^
reflects the fact that _PyLong_Format
belongs to the internal, private API, and is now defined in internal/pycore_long.h
and only when Py_BUILD_CORE
is defined. Extension modules can do this, but these APIs are supposed to be only for building Python itself.
Note also that in Fedora Rawhide, implicit function declarations like this are errors rather than warnings.
What’s more, replacing _PyLong_Format
with PyNumber_ToBase
seems to be enough for the tests to pass on Python 3.13.0b1.
I just tested with Python 3.13.0rc2 and immutables==0.20. I can confirm that the issue is still present.
Thank you!