aio-libs / aiokafka

asyncio client for kafka
http://aiokafka.readthedocs.io/
Apache License 2.0
1.09k stars 224 forks source link

Snappy package doesn't support Python 3.11 #930

Closed ahmetanbar closed 8 months ago

ahmetanbar commented 8 months ago

Hello,

I am new at Kafka. I want to consume messages which are compresses by snappy. I see that aiokafka automatically decompress messages. So that, snappy package should be installed.

When I try to install python-snappy package as how it is said here pip install 'aiokafka[snappy]' or via pip install python-snappy, I got error

Building wheel for python-snappy (setup.py) ... error
  ERROR: Command errored out with exit status 1:
...
src/snappy/snappymodule.cc:33:10: fatal error: 'snappy-c.h' file not found

It is due to this package doesn't have wheels for Python 3.11. An issue exists at the project regarding this.

I think I can apply those solutions to solve the issue:

  1. Build and install package manually: I don't want to do this
  2. Wait wheels publish for 3.11 from the package: I don't know when it will be available
  3. Get compressed raw message without any decompression by aiokafka and decompress it manually by using other packages like that: It is what I prefer.

Is the third one possible right now?

I am looking for your helps and ideas.

Thank you