You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was updating my docker images, and switched the base image python 3.12.
The build runs, but the latest available kafka-python module does not have some py3.12 compat fixes, which leads it to fail at execution with the following:
Traceback (most recent call last):
File "/usr/local/bin/parsedmarc", line 5, in <module>
from parsedmarc.cli import _main
File "/usr/local/lib/python3.12/site-packages/parsedmarc/cli.py", line 19, in <module>
from parsedmarc import get_dmarc_reports_from_mailbox, watch_inbox, \
File "/usr/local/lib/python3.12/site-packages/parsedmarc/kafkaclient.py", line 6, in <module>
from kafka import KafkaProducer
File "/usr/local/lib/python3.12/site-packages/kafka/__init__.py", line 23, in <module>
from kafka.consumer import KafkaConsumer
File "/usr/local/lib/python3.12/site-packages/kafka/consumer/__init__.py", line 3, in <module>
from kafka.consumer.group import KafkaConsumer
File "/usr/local/lib/python3.12/site-packages/kafka/consumer/group.py", line 13, in <module>
from kafka.consumer.fetcher import Fetcher
File "/usr/local/lib/python3.12/site-packages/kafka/consumer/fetcher.py", line 19, in <module>
from kafka.record import MemoryRecords
File "/usr/local/lib/python3.12/site-packages/kafka/record/__init__.py", line 1, in <module>
from kafka.record.memory_records import MemoryRecords, MemoryRecordsBuilder
File "/usr/local/lib/python3.12/site-packages/kafka/record/memory_records.py", line 27, in <module>
from kafka.record.legacy_records import LegacyRecordBatch, LegacyRecordBatchBuilder
File "/usr/local/lib/python3.12/site-packages/kafka/record/legacy_records.py", line 50, in <module>
from kafka.codec import (
File "/usr/local/lib/python3.12/site-packages/kafka/codec.py", line 9, in <module>
from kafka.vendor.six.moves import range
ModuleNotFoundError: No module named 'kafka.vendor.six.moves'
Simply switching to the fork resolves the runtime issue, and since it's the same codebase I'd expect it to work with little issues, but I did not explicitly test it as I don't have a setup for it.
The text was updated successfully, but these errors were encountered:
Hello,
I was updating my docker images, and switched the base image python 3.12.
The build runs, but the latest available kafka-python module does not have some py3.12 compat fixes, which leads it to fail at execution with the following:
Investigating a little, I found out that the current maintainer of kafka-python is not the owner, and cannot publish updates to the kafka-python namespace on pypi anymore. He created a fork named kafka-python-ng telling people to switch over.
Simply switching to the fork resolves the runtime issue, and since it's the same codebase I'd expect it to work with little issues, but I did not explicitly test it as I don't have a setup for it.
The text was updated successfully, but these errors were encountered: