Skip to content

Commit 426f5fd

Browse files
PYTHON-2292 Fix failing doctest due to UuidRepresentation (#458)
PYTHON-2277 Remove UuidRepresentation DeprecationWarning
1 parent 065001e commit 426f5fd

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

bson/codec_options.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,6 @@ def __new__(cls, document_class=dict,
252252
if not isinstance(tz_aware, bool):
253253
raise TypeError("tz_aware must be True or False")
254254
if uuid_representation is None:
255-
warnings.warn(
256-
"Starting in PyMongo 4.0, the default uuidRepresentation "
257-
"will be changed to 'unspecified'. Applications will need to "
258-
"explicitly set 'uuidRepresentation=pythonLegacy' in the "
259-
"connection string to preserve current behavior.",
260-
DeprecationWarning, stacklevel=2)
261255
uuid_representation = UuidRepresentation.PYTHON_LEGACY
262256
elif uuid_representation not in ALL_UUID_REPRESENTATIONS:
263257
raise ValueError("uuid_representation must be a value "

doc/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ collection, configured to use :class:`~bson.son.SON` instead of dict:
237237
>>> opts
238238
CodecOptions(document_class=<class 'bson.son.SON'>,
239239
tz_aware=False,
240-
uuid_representation=PYTHON_LEGACY,
240+
uuid_representation=UuidRepresentation.PYTHON_LEGACY,
241241
unicode_decode_error_handler='strict',
242242
tzinfo=None, type_registry=TypeRegistry(type_codecs=[],
243243
fallback_encoder=None))

0 commit comments

Comments
 (0)