Compilation fails with Python 3.11
fschulze opened this issue · comments
Describe the bug
Missing header during compilation with Python 3.11.
To Reproduce
Try to install with Python 3.11 nightly or pre-release.
Expected behavior
Finish installation.
Logs/tracebacks
gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/runner/work/devpi/devpi/server/.tox/py311/include -I/opt/hostedtoolcache/Python/3.11.0-alpha.4/x64/include/python3.11 -c yarl/_quoting_c.c -o build/temp.linux-x86_64-3.11/yarl/_quoting_c.o
yarl/_quoting_c.c:198:12: fatal error: longintrepr.h: No such file or directory
198 | #include "longintrepr.h"
| ^~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
Python Version
$ python --version
Python 3.11.0a4 (main, Jan 16 2022, 11:55:59) [GCC 9.3.0]
https://github.com/actions/python-versions/releases/download/3.11.0-alpha.4-121430/python-3.11.0-alpha.4-linux-20.04-x64.tar.gz
multidict Version
$ python -m pip show multidict
6.0.1
yarl Version
$ python -m pip show yarl
1.7.2
OS
GitHub Actions:
Operating System
Ubuntu
20.04.3
LTS
Additional context
No response
Code of Conduct
- I agree to follow the aio-libs Code of Conduct
Please report to cython.
The yarl project doesn't import longintrepr.h
directly.
This has been reported to Cython in cython/cython#4461, fixed in cython/cython#4428 and released in 0.29.x: cython/cython@0f7bd0d
From the similar issue at aiohttp:
Are you asking for the release of a new version with C-files generated with newer Cython? If that's an action item right now, I think that it's doable.
I think this is the case 🤔
aio-libs/aiohttp#6600 (comment)
Can yarl do something similar?
@hugovk Maybe you can do it yourself. I had the same problem with pyzmq and found this helpful comment zeromq/pyzmq#1655 (comment)
Thanks for the suggestion! This is for CI and I think we can wait until yarl installs smoothly for 3.11.
zeromq/pyzmq#1655 (comment) hasn't helped with yarl. As a workaround, I've used YARL_NO_EXTENSIONS=1 pip install yarl