Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support python 3.11? #341

Closed
wenbinf opened this issue Oct 25, 2022 · 11 comments
Closed

Support python 3.11? #341

wenbinf opened this issue Oct 25, 2022 · 11 comments

Comments

@wenbinf
Copy link

wenbinf commented Oct 25, 2022

Describe the bug
Can't install clickhouse-driver with python 3.11

To Reproduce
pip3.11 install clickhouse-driver

Expected behavior
Seeing such errors:

      building 'clickhouse_driver.bufferedreader' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/clickhouse_driver
      x86_64-linux-gnu-gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/mnt/python-ve/ck/include -I/usr/include/python3.11 -c clickhouse_driver/bufferedreader.c -o build/temp.linux-x86_64-cpython-311/clickhouse_driver/bufferedreader.o
      clickhouse_driver/bufferedreader.c:209:12: fatal error: longintrepr.h: No such file or directory
        209 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

Versions

  • clickhouse-driver 0.24
  • Python 3.11
@xzkostyan
Copy link
Member

I'll push wheels as soon as they will be available in cibuildwheel. How it produces wheels only for 3.11rc2.

@tonyabracadabra
Copy link

yea, also looking forward to this!

@xzkostyan
Copy link
Member

Wheels for version 0.2.4 and 3.11 are available on pypi.

@tonyabracadabra
Copy link

Wheels for version 0.2.4 and 3.11 are available on pypi.

I thought this was for python 3.10?

@xzkostyan
Copy link
Member

@tonyabracadabra what do you mean?

@tonyabracadabra
Copy link

@tonyabracadabra what do you mean?

I meant isn't the wheel (0.2.4) on pypi only for 3.10 since it was released in Jun and I wasn't able to use it with Python 3.11

@asottile-sentry
Copy link
Contributor

if you could make a new release with newly cythonized .c files in the source dist that'll help this build cleanly on python3.11 macos arm64 -- right now they fail due to:

      gcc -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/asottile/opt/pythons/cp311-cp311/include/python3.11 -c clickhouse_driver/bufferedreader.c -o build/temp.macosx-12.5-arm64-3.11/clickhouse_driver/bufferedreader.o
      clickhouse_driver/bufferedreader.c:209:12: fatal error: 'longintrepr.h' file not found
        #include "longintrepr.h"
                 ^~~~~~~~~~~~~~~
      1 error generated.

a workaround is to preinstall cython such that they'll get freshly generated

@xzkostyan
Copy link
Member

Python 3.11 is fully supported now. clickhouse-cityhash also has been patched: xzkostyan/clickhouse-cityhash@112fa22

Wheels for both packages are placed on pypi.

@asottile-sentry
Copy link
Contributor

@xzkostyan can you make a new release (0.2.5 or such?) with the updated cythonized files (that way it builds from source cleanly on M1)

@xzkostyan
Copy link
Member

I'll push new version in this weekend.

@xzkostyan
Copy link
Member

Version 0.2.5 released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants