MKuranowski / aiocsv

Python: Asynchronous CSV reading/writing
https://pypi.org/project/aiocsv/
MIT License
67 stars 9 forks source link

Won't build in Python 3.11 #10

Closed HarrisonPace closed 1 year ago

HarrisonPace commented 1 year ago

aiocsv can't be installed from pypi against python3.11, because it expects the longintrepr.h header, which was removed in: https://github.com/python/cpython/pull/28968

This was fixed in cython here: https://github.com/cython/cython/pull/4428

On my system, the result of pip install aiocsv while using python 3.11 is:

build output:

#0 8.992       running bdist_wheel
#0 8.992       running build
#0 8.992       running build_py
#0 8.992       file aiocsv.py (for module aiocsv) not found
#0 8.992       creating build
#0 8.992       creating build/lib.linux-x86_64-cpython-311
#0 8.992       creating build/lib.linux-x86_64-cpython-311/aiocsv
#0 8.992       copying aiocsv/writers.py -> build/lib.linux-x86_64-cpython-311/aiocsv
#0 8.992       copying aiocsv/readers.py -> build/lib.linux-x86_64-cpython-311/aiocsv
#0 8.992       copying aiocsv/parser.py -> build/lib.linux-x86_64-cpython-311/aiocsv
#0 8.992       copying aiocsv/__init__.py -> build/lib.linux-x86_64-cpython-311/aiocsv
#0 8.992       copying aiocsv/protocols.py -> build/lib.linux-x86_64-cpython-311/aiocsv
#0 8.992       copying aiocsv/py.typed -> build/lib.linux-x86_64-cpython-311/aiocsv
#0 8.992       copying aiocsv/_parser.pyi -> build/lib.linux-x86_64-cpython-311/aiocsv
#0 8.992       file aiocsv.py (for module aiocsv) not found
#0 8.992       running build_ext
#0 8.992       building 'aiocsv._parser' extension
#0 8.992       creating build/temp.linux-x86_64-cpython-311
#0 8.992       creating build/temp.linux-x86_64-cpython-311/aiocsv
#0 8.992       x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.11 -c aiocsv/_parser.c -o build/temp.linux-x86_64-cpython-311/aiocsv/_parser.o
#0 8.992       aiocsv/_parser.c:210:12: fatal error: longintrepr.h: No such file or directory
#0 8.992         210 |   #include "longintrepr.h"
#0 8.992             |            ^~~~~~~~~~~~~~~
#0 8.992       compilation terminated.
#0 8.992       error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
#0 8.992       [end of output]
MKuranowski commented 1 year ago

Should be fixed in 0f6713eaa700de5c8bf15ce8ab9dced0aab90539; release 1.2.3.

Unfortunately cibuildwheel didn't build 3.11 wheels for Linux (just for MacOS and Windows), so installs of aiocsv 1.2.3 on Python 3.11 on Linux will still require compilation :C