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.10 #77

Open
decaz opened this issue Oct 5, 2021 · 17 comments · May be fixed by #78
Open

Support Python 3.10 #77

decaz opened this issue Oct 5, 2021 · 17 comments · May be fixed by #78

Comments

@decaz
Copy link
Contributor

decaz commented Oct 5, 2021

... and prepare for Python 3.11 (dev).

@spenpal
Copy link

spenpal commented Mar 17, 2022

Any news on making this library Python 3.10 supported?

@oleksandr-kuzmenko
Copy link

JFYI #78

@ooliver1
Copy link

ooliver1 commented May 4, 2022

After 6 months, will that PR get merged or even looked at

@mikBighne98
Copy link

Future updates like python 3.10 support coming or the project is dropped?

@ooliver1
Copy link

it seems as though cchardet has been abandoned, yet it is depended on by many large projects

@NebularNerd
Copy link

Are there any good alternatives to cchardet? If the repo is not getting any love then quite a few projects will need a replacement.

@ooliver1
Copy link

^, it is possible to install gcc but this wont be the biggest issue forever, 3.11/12 may somehow break this

@NebularNerd
Copy link

^, it is possible to install gcc but this wont be the biggest issue forever, 3.11/12 may somehow break this

I assume this is for *nix users, I'm on Windows and it keeps throwing up the 'C++ 14 Required' error when I try to install. I assume because for Windows it's trying to compile using C++ instead of gcc

Does anyone know if I can manually compile this on Windows using my MinGW gcc install? I'd rather not download multi GB's of Visual Studio just for one python package.

@ooliver1
Copy link

ooliver1 commented Jun 22, 2022

^, it is possible to install gcc but this wont be the biggest issue forever, 3.11/12 may somehow break this

I assume this is for *nix users, I'm on Windows and it keeps throwing up the 'C++ 14 Required' error when I try to install. I assume because for Windows it's trying to compile using C++ instead of gcc

Does anyone know if I can manually compile this on Windows using my MinGW gcc install? I'd rather not download multi GB's of Visual Studio just for one python package.

@NebularNerd yes this was *nix, here are steps i found for windows using mingw

  • add C:\MinGW\bin to PATH
  • edit PYTHONPATH\Lib\distutils with a distutils.cfg file containing
[build]
compiler=mingw32

https://stackoverflow.com/a/5051281

@banagale
Copy link

banagale commented Jun 23, 2022

I ended up here when I was upgrading the project's python version and started hitting up against errors involving this package in pip.

Are there any good alternatives to cchardet? If the repo is not getting any love then quite a few projects will need a replacement.

It depends on what you're trying to do. There's an MIT licensed package called charset_normalizer many seem to have switched to.

charset_normalizer focuses on providing you the actual text content in usable, unicode form.

Whereas, it seems like cchardet focuses on trying to tell you what a text file is encoded in. In a project I'm working on, this detected encoding is attempted to be used with an open().

charset_normalizer is like, "why bother with determining the exact encoding scheme?"

Instead it figures out the most likely original encoding scheme to result in successful decoding and encoding to useable text content.

If you look, it is specifically compared with this package and calls out this package, cChardet's apparent use of a cpp binding. It also claims it has higher accuracy but possibly less speed.

@NebularNerd
Copy link

Thanks @ooliver1 and @banagale for your replies. I'm going to take a good look at charset_normalizer as anyone having to install gcc just to compile cChardet for my small Subtotxt script seems a trifle excessive.

In the meantime I'll compile it with gcc as an interim bodge.

hroncok added a commit to hroncok/calibre that referenced this issue Jul 16, 2022
kovidgoyal added a commit to kovidgoyal/calibre that referenced this issue Jul 16, 2022
cchardet is not maintained anymore: PyYoshi/cChardet#77

cchardet is based on uchardet with the addition of reporting encoding
detection confidence. We dont really need that, so moving to uchardet is
simplest.

See #1690 (Low effort port to charset_normalizer)
webknjaz added a commit to webknjaz/aiohttp that referenced this issue Aug 3, 2022
`cchardet` stopped being maintained a while ago so this patch removes
it from the `speedups` extra to keep it helpful. It also makes the
same adjustment in the CI under the most recent CPython versions to
keep the testing going.

Refs:
* aio-libs#6819 (comment)
* PyYoshi/cChardet#77
duhby added a commit to duhby/hypixel.py that referenced this issue Aug 18, 2022
fniessink added a commit to ICTU/quality-time that referenced this issue Oct 17, 2022
…aiohttp#6819. Since this is a speedup for aiohttp, simply remove it.
fniessink added a commit to ICTU/quality-time that referenced this issue Oct 17, 2022
…aiohttp#6819. Since this is a speedup for aiohttp, simply remove it.
@mohd-akram
Copy link

mohd-akram commented Oct 26, 2022

It was working for me on Python 3.10, but now fails to install on Python 3.11:

/usr/bin/clang -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -Isrc/ext/uchardet/src -I/opt/local/Library/Frameworks/Python.framework/Versions/3.11/include/python3.11 -c src/cchardet/_cchardet.cpp -o build/temp.macosx-12.0-x86_64-cpython-311/src/cchardet/_cchardet.o
src/cchardet/_cchardet.cpp:196:12: fatal error: 'longintrepr.h' file not found
  #include "longintrepr.h"
           ^~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1

EDIT: Manually installing cython beforehand seems to fix the issue (possibly related to cython/cython#4461).

@SimplicityGuy
Copy link

There are 2 PRs #78 and #80 that will address this. @PyYoshi, can you merge and release a new build, please?

@ooliver1
Copy link

ooliver1 commented Nov 5, 2022

There are 2 PRs #78 and #80 that will address this. @PyYoshi, can you merge and release a new build, please?

It is pretty established they have abandoned cchardet, see the PRs you referenced, #78 is nearly 1 year old.

@SimplicityGuy
Copy link

It is pretty established they have abandoned cchardet, see the PRs you referenced, #78 is nearly 1 year old.

Indeed. It's unfortunate since right now many downstream dependencies can't be completely installed with Python 3.11 due to build issues.

@NebularNerd
Copy link

At this stage it's come down to either moving to charset_normalizer or if someone is willing to, fork this and make cchardet-ng or similar.

philn added a commit to philn/gst-dev-container that referenced this issue Nov 16, 2022
hotdoc won't install due to broken cchardet:
PyYoshi/cChardet#77
@wbarnha
Copy link

wbarnha commented Dec 12, 2022

Might want to take a look at this: https://github.com/faust-streaming/cChardet

pip install faust-cchardet

I support Python 3.10+3.11 now, so we're good. I'll open a PR so that some day if @PyYoshi comes back to this project, he can update this.

bdraco added a commit to bdraco/vulcan-api that referenced this issue Feb 15, 2023
cchardet is abandonware PyYoshi/cChardet#77

There is a new active fork https://github.com/faust-streaming/cChardet
that works on python3.11
bdraco added a commit to bdraco/docker that referenced this issue Feb 15, 2023
kapi2289 pushed a commit to kapi2289/vulcan-api that referenced this issue Feb 16, 2023
cchardet is abandonware PyYoshi/cChardet#77

There is a new active fork https://github.com/faust-streaming/cChardet
that works on python3.11
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

Successfully merging a pull request may close this issue.

10 participants