MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / saslprep

Function saslprep

pymongo/saslprep.py:25–35  ·  view source on GitHub ↗

SASLprep dummy

(
        data: Any,
        prohibit_unassigned_code_points: Optional[bool] = True,  # noqa: ARG001
    )

Source from the content-addressed store, hash-verified

23 HAVE_STRINGPREP = False
24
25 def saslprep(
26 data: Any,
27 prohibit_unassigned_code_points: Optional[bool] = True, # noqa: ARG001
28 ) -> Any:
29 """SASLprep dummy"""
30 if isinstance(data, str):
31 raise TypeError(
32 "The stringprep module is not available. Usernames and "
33 "passwords must be instances of bytes."
34 )
35 return data
36
37else:
38 HAVE_STRINGPREP = True

Callers 3

test_saslprepMethod · 0.90
_authenticate_scramFunction · 0.90
_authenticate_scramFunction · 0.90

Calls 1

joinMethod · 0.45

Tested by 1

test_saslprepMethod · 0.72