File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 139
139
# Default value for serverMonitoringMode
140
140
SERVER_MONITORING_MODE = "auto" # poll/stream/auto
141
141
142
- # Options that must raise an error instead of warning if they invalidate.
143
- _OPTION_MUST_RAISE = ["CANONICALIZE_HOST_NAME" ]
142
+ # Auth mechanism properties that must raise an error instead of warning if they invalidate.
143
+ _MECH_PROP_MUST_RAISE = ["CANONICALIZE_HOST_NAME" ]
144
144
145
145
146
146
def partition_node (node : str ) -> tuple [str , int ]:
@@ -873,7 +873,9 @@ def get_setter_key(x: str) -> str:
873
873
validator = _get_validator (opt , URI_OPTIONS_VALIDATOR_MAP , normed_key = normed_key )
874
874
validated = validator (opt , value )
875
875
except (ValueError , TypeError , ConfigurationError ) as exc :
876
- if warn and opt not in _OPTION_MUST_RAISE :
876
+ if normed_key == "authmechanismproperties" and _MECH_PROP_MUST_RAISE in str (exc ):
877
+ raise
878
+ if warn :
877
879
warnings .warn (str (exc ), stacklevel = 2 )
878
880
else :
879
881
raise
You can’t perform that action at this time.
0 commit comments