PYTHON-2292 Fix failing doctest due to UuidRepresentation (#458)
PYTHON-2277 Remove UuidRepresentation DeprecationWarning
This commit is contained in:
parent
065001ef2e
commit
426f5fdef7
@ -252,12 +252,6 @@ class CodecOptions(_options_base):
|
||||
if not isinstance(tz_aware, bool):
|
||||
raise TypeError("tz_aware must be True or False")
|
||||
if uuid_representation is None:
|
||||
warnings.warn(
|
||||
"Starting in PyMongo 4.0, the default uuidRepresentation "
|
||||
"will be changed to 'unspecified'. Applications will need to "
|
||||
"explicitly set 'uuidRepresentation=pythonLegacy' in the "
|
||||
"connection string to preserve current behavior.",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
uuid_representation = UuidRepresentation.PYTHON_LEGACY
|
||||
elif uuid_representation not in ALL_UUID_REPRESENTATIONS:
|
||||
raise ValueError("uuid_representation must be a value "
|
||||
|
||||
@ -237,7 +237,7 @@ collection, configured to use :class:`~bson.son.SON` instead of dict:
|
||||
>>> opts
|
||||
CodecOptions(document_class=<class 'bson.son.SON'>,
|
||||
tz_aware=False,
|
||||
uuid_representation=PYTHON_LEGACY,
|
||||
uuid_representation=UuidRepresentation.PYTHON_LEGACY,
|
||||
unicode_decode_error_handler='strict',
|
||||
tzinfo=None, type_registry=TypeRegistry(type_codecs=[],
|
||||
fallback_encoder=None))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user