Install Error on Python 3.11
Closed this issue · 5 comments
Long story short
With Python 3.11 coming up, I'm testing various projects, and encountered an issue with frozenlist
during this testing. During the install, the following error occurs:
gcc -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/zevaryx/.cache/pypoetry/virtualenvs/jarvis-core-FBeBr3II-py3.11/include -I/usr/local/include/python3.11 -c frozenlist/_frozenlist.c -o build/temp.linux-x86_64-3.11/frozenlist/_frozenlist.o
frozenlist/_frozenlist.c: In function ‘__Pyx_AddTraceback’:
frozenlist/_frozenlist.c:432:62: error: invalid use of incomplete typedef ‘PyFrameObject’ {aka ‘struct _frame’}
432 | #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
| ^~
frozenlist/_frozenlist.c:7127:5: note: in expansion of macro ‘__Pyx_PyFrame_SetLineNumber’
7127 | __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
I believe this is due to Python 3.11 C API changes with PyFrameObject
Expected behaviour
frozenlist
to properly install
Actual behaviour
GCC error with the aforementioned error
Steps to reproduce
Create a Python 3.11 environment and run pip install frozenlist
Your environment
frozenlist == 1.3.0
OS: Arch Linux
Python 3.11.0a6, compiled with GCC 11.2.0
GCC 11.2.0
Frozenlist depends on cython and it is that project that needs to be made compatible with Python 3.11. This is not something we can fix here.
See cython/cython#4667 for an in-progress fix for this issue on their side.
Update:
cython/cython#4667 has been merged and backported (cython/cython#4667 (comment)):
Backported to 0.29.x in cython/cython@afc00fc
But not released yet.
Are there any updates on this? This was fixed in Cython release 0.29.29
Hi,
I've run into same error today, while trying to install dependencies, which include frozenlist
on Python 3.11, see: https://github.com/playpauseandstop/aiohttp-middlewares/runs/6983836150?check_suite_focus=true
frozenlist/_frozenlist.c:432:62: error: dereferencing pointer to incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
#define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
^~
Can we expect on new frozenlist
release, which is suitable with Python 3.11, anytime soon?
Thanks!
🚀 frozenlist 1.3.1 has just been released with 3.11 support: