faust-streaming / cChardet

universal character encoding detector
Other
56 stars 4 forks source link

Can't import cchardet in Python 3.11 #10

Closed seperman closed 1 year ago

seperman commented 1 year ago

OS/Arch

uname_result(system='Linux', release='5.15.0-56-generic', version='#62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022', machine='x86_64')

Python version

3.11.0, 3.11.1

cChardet version

2.1.10, 2.1.11, 2.1.12

What is the problem?

>>> import cchardet
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/.pyenv/versions/common/lib/python3.11/site-packages/cchardet/__init__.py", line 1, in <module>
    from cchardet import _cchardet
ImportError: dynamic module does not define module export function (PyInit__cchardet)

Expected behavior

I should be able to import cchardet

Actual behavior

I can't even import it

Steps to reproduce the behavior

pip install faust-cchardet

Try to import cchardet

seperman commented 1 year ago

I was able to build a wheel locally and install it. It seems all that is needed is the wheel for Ubuntu 22.04. Probably manylinux2014_x86_64 that is used to build the existing images is too old and needs to be updated.

wbarnha commented 1 year ago

Interesting, I'll look into this at some point. I've been using manylinux2014_x86_64 for a lot of my builds and I haven't ran into this problem yet.

seperman commented 1 year ago

Maybe you want to use manylinux_2_28?pypa/manylinux: Python wheels that work on any linux (almost)github.comSep DehpourOn Dec 16, 2022, at 9:38 PM, William Barnhart @.***> wrote: Interesting, I'll look into this at some point. I've been using manylinux2014_x86_64 for a lot of my builds and I haven't ran into this problem yet.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

wbarnha commented 1 year ago

Looks like this bug exists for all of my releases of faust-cchardet back to 2.1.9. I'll have to yank these wheels once I have a fix ready.

wbarnha commented 1 year ago

Fixed! Sorry for the inconvenience. Expect a fix in 2.1.13.