Hi community!
I have stumbled upon an issue working with uuidRepresentations in python module. I am updating an application to run the last version of pymongo (3.12.3 to 4.2.0). In the code snippet I am initializing a MongoClient object passing username, password, uri and uuidRepresentation as kwargs.
client = MongoClient(
SOME_URI,
user=user,
pass=pass
uuidRepresentation=UuidRepresentation.PYTHON_LEGACY
)
However, when I check the properties of client object in debug I could see that the uuidRepresentation in codec_options is equal to 0 (UNSPECIFIED) and it looks like it is being set to default value somewhere inside pymongo, regardless of what uuidRepresentation parameter I passed to MongoClient constructor.
.
What could be the cause of this issue and how to fix it properly?
Thanks in advance!