@@ -68,13 +68,6 @@ class SSLWantWriteError(Exception):
68
68
gssapi = None
69
69
GSSError = None
70
70
71
- # needed for AWS_MSK_IAM authentication:
72
- try :
73
- from botocore .session import Session as BotoSession
74
- except ImportError :
75
- # no botocore available, will disable AWS_MSK_IAM mechanism
76
- BotoSession = None
77
-
78
71
AFI_NAMES = {
79
72
socket .AF_UNSPEC : "unspecified" ,
80
73
socket .AF_INET : "IPv4" ,
@@ -113,7 +106,7 @@ class BrokerConnection:
113
106
will be applied to the backoff resulting in a random range between
114
107
20% below and 20% above the computed value. Default: 1000.
115
108
connection_timeout_ms (int): Connection timeout in milliseconds.
116
- Default: None, which defaults it to the same value as
109
+ Default: None, which defaults it to the same value as
117
110
request_timeout_ms.
118
111
request_timeout_ms (int): Client request timeout in milliseconds.
119
112
Default: 30000.
@@ -235,7 +228,7 @@ def __init__(self, host, port, afi, **configs):
235
228
for key in self .config :
236
229
if key in configs :
237
230
self .config [key ] = configs [key ]
238
-
231
+
239
232
if self .config ['connection_timeout_ms' ] is None :
240
233
self .config ['connection_timeout_ms' ] = self .config ['request_timeout_ms' ]
241
234
@@ -253,19 +246,15 @@ def __init__(self, host, port, afi, **configs):
253
246
assert self .config ['security_protocol' ] in self .SECURITY_PROTOCOLS , (
254
247
'security_protocol must be in ' + ', ' .join (self .SECURITY_PROTOCOLS ))
255
248
256
-
257
249
if self .config ['security_protocol' ] in ('SSL' , 'SASL_SSL' ):
258
250
assert ssl_available , "Python wasn't built with SSL support"
259
251
260
- if self .config ['sasl_mechanism' ] == 'AWS_MSK_IAM' :
261
- assert BotoSession is not None , 'AWS_MSK_IAM requires the "botocore" package'
262
- assert self .config ['security_protocol' ] == 'SASL_SSL' , 'AWS_MSK_IAM requires SASL_SSL'
263
-
264
252
if self .config ['security_protocol' ] in ('SASL_PLAINTEXT' , 'SASL_SSL' ):
265
253
assert self .config ['sasl_mechanism' ] in sasl .MECHANISMS , (
266
254
'sasl_mechanism must be one of {}' .format (', ' .join (sasl .MECHANISMS .keys ()))
267
255
)
268
256
sasl .MECHANISMS [self .config ['sasl_mechanism' ]].validate_config (self )
257
+
269
258
# This is not a general lock / this class is not generally thread-safe yet
270
259
# However, to avoid pushing responsibility for maintaining
271
260
# per-connection locks to the upstream client, we will use this lock to
0 commit comments