Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wbarnha authored Apr 3, 2024
2 parents d34ad3c + aba153f commit a9e30b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
13 changes: 9 additions & 4 deletions kafka/sasl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import logging

from kafka.sasl import gssapi, oauthbearer, plain, scram, msk

log = logging.getLogger(__name__)
from kafka.sasl import gssapi, oauthbearer, plain, scram

MECHANISMS = {
'GSSAPI': gssapi,
'OAUTHBEARER': oauthbearer,
'PLAIN': plain,
'SCRAM-SHA-256': scram,
'SCRAM-SHA-512': scram,
'AWS_MSK_IAM': msk,
}

try:
from kafka.sasl import msk
MECHANISMS['AWS_MSK_IAM'] = msk
except ImportError:
pass

log = logging.getLogger(__name__)


def register_mechanism(key, module):
"""
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def run(cls):
"lz4": ["lz4"],
"snappy": ["python-snappy"],
"zstd": ["zstandard"],
"boto": ["botocore"],
},
cmdclass={"test": Tox},
packages=find_packages(exclude=['test']),
Expand Down

0 comments on commit a9e30b0

Please sign in to comment.