Open gtzampanakis opened 11 months ago
This was patched in https://github.com/dpkp/kafka-python/pull/2398 and will be resolved in the next release. I apologize for the delay. Hopefully running pip install git+https://github.com/dpkp/kafka-python.git
could fulfill your needs in the meantime.
Please understand that I am doing everything within my means to get a release out to the public.
This was patched in #2398 and will be resolved in the next release. I apologize for the delay. Hopefully running
pip install git+https://github.com/dpkp/kafka-python.git
could fulfill your needs in the meantime.Please understand that I am doing everything within my means to get a release out to the public.
Is there an idea of when the next release will be out?
No update, sorry. 😔
Hi i am still having this issue. Is it resolved in the latest release.
here is my contect: Python 3.12.2 kafka-python 2.0.2
from kafka import KafkaProducer Error: ModuleNotFoundError Traceback (most recent call last) Cell In[7], line 1 ----> 1 from kafka import KafkaProducer
File ~\AppData\Lib\site-packages\kafka__init__.py:23 21 from kafka.admin import KafkaAdminClient 22 from kafka.client_async import KafkaClient ---> 23 from kafka.consumer import KafkaConsumer 24 from kafka.consumer.subscription_state import ConsumerRebalanceListener 25 from kafka.producer import KafkaProducer
File ~\AppData\Lib\site-packages\kafka\consumer__init.py:3 1 from future__ import absolute_import ----> 3 from kafka.consumer.group import KafkaConsumer 5 all = [ 6 'KafkaConsumer' 7 ]
File ~\AppData\Lib\site-packages\kafka\consumer\group.py:13 10 from kafka.vendor import six 12 from kafka.client_async import KafkaClient, selectors ---> 13 from kafka.consumer.fetcher import Fetcher 14 from kafka.consumer.subscription_state import SubscriptionState 15 from kafka.coordinator.consumer import ConsumerCoordinator
File ~\AppData\Lib\site-packages\kafka\consumer\fetcher.py:19 15 from kafka.protocol.fetch import FetchRequest 16 from kafka.protocol.offset import ( 17 OffsetRequest, OffsetResetStrategy, UNKNOWN_OFFSET 18 ) ---> 19 from kafka.record import MemoryRecords 20 from kafka.serializer import Deserializer 21 from kafka.structs import TopicPartition, OffsetAndTimestamp
File ~\AppData\Lib\site-packages\kafka\record__init__.py:1 ----> 1 from kafka.record.memory_records import MemoryRecords, MemoryRecordsBuilder 3 all = ["MemoryRecords", "MemoryRecordsBuilder"]
File ~\AppData\Lib\site-packages\kafka\record\memory_records.py:27 25 from kafka.errors import CorruptRecordException 26 from kafka.record.abc import ABCRecords ---> 27 from kafka.record.legacy_records import LegacyRecordBatch, LegacyRecordBatchBuilder 28 from kafka.record.default_records import DefaultRecordBatch, DefaultRecordBatchBuilder 31 class MemoryRecords(ABCRecords):
File ~\AppData\Lib\site-packages\kafka\record\legacy_records.py:50 47 from kafka.record.abc import ABCRecord, ABCRecordBatch, ABCRecordBatchBuilder 48 from kafka.record.util import calc_crc32 ---> 50 from kafka.codec import ( 51 gzip_encode, snappy_encode, lz4_encode, lz4_encode_old_kafka, 52 gzip_decode, snappy_decode, lz4_decode, lz4_decode_old_kafka, 53 ) 54 import kafka.codec as codecs 55 from kafka.errors import CorruptRecordException, UnsupportedCodecError
File ~\AppData\Lib\site-packages\kafka\codec.py:9 6 import struct 8 from kafka.vendor import six ----> 9 from kafka.vendor.six.moves import range 11 _XERIAL_V1_HEADER = (-126, b'S', b'N', b'A', b'P', b'P', b'Y', 0, 1, 1) 12 _XERIAL_V1_FORMAT = 'bccccccBii'
ModuleNotFoundError: No module named 'kafka.vendor.six.moves'
Hi @wbarnha , The issue still persists and I am facing the same issue, can you pls provide an update when the fix will be rolloed out. Thanks
I am aware of the issue. Please refer to https://github.com/dpkp/kafka-python/issues/2412#issuecomment-1806341342.
Thanks for it @wbarnha , I downgraded my python version and got it rectified.
Did we ever merge this fix in for 3.12?
This was patched in #2398 and will be resolved in the next release. I apologize for the delay. Hopefully running
pip install git+https://github.com/dpkp/kafka-python.git
could fulfill your needs in the meantime.Please understand that I am doing everything within my means to get a release out to the public.
@wbarnha Thank you William for your support here.
Installing python -m pip install --break-system-packages git+https://github.com/dpkp/kafka-python.git
still is not resolving the issue.
i can not downgrade python 3.11 due to a HIGH vulnerability with ecdsa pacakge. Any work around solution for this problem at the moment?
This was patched in #2398 and will be resolved in the next release. I apologize for the delay. Hopefully running
pip install git+https://github.com/dpkp/kafka-python.git
could fulfill your needs in the meantime. Please understand that I am doing everything within my means to get a release out to the public.@wbarnha Thank you William for your support here. Installing
python -m pip install --break-system-packages git+https://github.com/dpkp/kafka-python.git
still is not resolving the issue.i can not downgrade python 3.11 due to a HIGH vulnerability with ecdsa pacakge. Any work around solution for this problem at the moment?
The current workaround solution would be to replace your kafka-python
installation with my fork at kafka-python-ng
for now.
Can we please reopen this bug because a critical bug like this should not be closed until the fix is released. I would even pin it after reopening it, just to remind everyone about it.
I also have the same issue
i meet this problem in python3.12 kafka-python 2.0.2,so how to solve this problem
Can we please reopen this bug because a critical bug like this should not be closed until the fix is released. I would even pin it after reopening it, just to remind everyone about it.
It's a fair point, and since there's a demand to reopen this, I'll oblige!
This is still not fixed, and have been open for a year now. Does everyone really install from the github repo? Is it so hard to do a release?
Anyway, commenting to show additional demand. Although demand for "be able to use the library" seems self-explanatory...
Will this fix be released in the near future? I'm using the following work-around in requirements.txt
at present:
kafka-python==2.0.2; python_version < '3.12'
kafka-python @ git+https://github.com/dpkp/kafka-python.git ; python_version >= '3.12'
This was patched in #2398 and will be resolved in the next release. I apologize for the delay. Hopefully running
pip install git+https://github.com/dpkp/kafka-python.git
could fulfill your needs in the meantime. Please understand that I am doing everything within my means to get a release out to the public.@wbarnha Thank you William for your support here. Installing
python -m pip install --break-system-packages git+https://github.com/dpkp/kafka-python.git
still is not resolving the issue. i can not downgrade python 3.11 due to a HIGH vulnerability with ecdsa pacakge. Any work around solution for this problem at the moment?The current workaround solution would be to replace your
kafka-python
installation with my fork atkafka-python-ng
for now.
Thank god. The fork version saved the day.
rip
+1 having this issue
Hey guys, this solved it for me:
1- Uninstall kafka-python using: pip uninstall kafka-python
2- Then run: pip install --break-system-packages git+https://github.com/dpkp/kafka-python.git
The following code fix works for me with the current public build of kafka-python
:
import sys
if sys.version_info >= (3, 12, 0):
import six
sys.modules['kafka.vendor.six.moves'] = six.moves
......
from kafka import KafkaConsumer, KafkaProducer
......
@csharplus , can confirm, that your workaround helped me to resolve the issue with kafka-python:2.0.2
@csharplus, It is working.
I have verified this on Linux and Windows, even though the output below is from Linux: