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

pytest is not working with kafka #193

Open
ker-zhao opened this issue Oct 26, 2023 · 3 comments
Open

pytest is not working with kafka #193

ker-zhao opened this issue Oct 26, 2023 · 3 comments

Comments

@ker-zhao
Copy link

The following code is from lib/python3.11/site-packages/kafka/conn.py:79, if I didn't install gssapi it should be catched by ImportError, but if it's run by pytest, then there will be a ImportWarning instead of ImportError, so the following code won't work properly.

try:
import gssapi
from gssapi.raw.misc import GSSError
except ImportError:
#no gssapi available, will disable gssapi mechanism
gssapi = None
GSSError = None

@s3rius
Copy link
Owner

s3rius commented Oct 31, 2023

Will take a closer look. Thanks for reporting.

@danboyle7
Copy link

danboyle7 commented Nov 3, 2023

Its due to an out-of-date vendored version of six in python-kafka (dependency of aiokafka). An update was pushed to their master to push their version to 1.16 2 days ago (dpkp/kafka-python#2398), however, python-kafka hasnt had a tagged update in years...

@s3rius
Copy link
Owner

s3rius commented Nov 4, 2023

Well, we can depend on the tag revisions from repo.

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

No branches or pull requests

3 participants