cyac icon indicating copy to clipboard operation
cyac copied to clipboard

Build failure with CPython 3.13.0

Open decaz opened this issue 2 years ago • 6 comments

building 'cyac.xstring' extension
clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -Ilib/cyac -I/Users/marat/workspace/publishing/.venv/include -I/Users/marat/.pyenv/versions/3.13.0/include/python3.13 -c lib/cyac/xstring.cpp -o build/temp.macosx-15.0-arm64-cpython-313/lib/cyac/xstring.o
lib/cyac/xstring.cpp:5097:17: error: use of undeclared identifier '_PyUnicode_ToLowerFull'
 5097 |     __pyx_v_n = _PyUnicode_ToLowerFull((__pyx_v_original->chars[__pyx_v_ori_char_idx]), __pyx_v_buf);
      |                 ^
1 error generated.
error: command '/usr/bin/clang++' failed with exit code 1

decaz avatar Oct 14 '24 12:10 decaz

@nppoly @chenkovsky FYI

decaz avatar Oct 14 '24 12:10 decaz

@decaz ACK

chenkovsky avatar Oct 14 '24 12:10 chenkovsky

@chenkovsky previously you suggested to remove support of Python 2, - I think it's time now to do it if it could make this fix be made easier.

decaz avatar Oct 14 '24 13:10 decaz

currently this api is private https://github.com/python/cpython/blob/c77121e9f19702b1ab280299394e38e8f15c0fd3/Include/internal/pycore_unicodeobject.h#L8. I have to seek a workaround.

chenkovsky avatar Oct 14 '24 14:10 chenkovsky

I cannot find these methods in final .so file. so I will copy toLower codes from python as a workaround. https://github.com/python/cpython/pull/117117

chenkovsky avatar Oct 15 '24 12:10 chenkovsky

Hi! I opened #27 to fix this CPython 3.13 build failure by replacing the removed _PyUnicode_ToLowerFull API call with a compatible implementation, so the xstring extension should build successfully on Python 3.13.

webbrain-one avatar Aug 17 '26 22:08 webbrain-one