From 426f5fdef7828de443efd82b627d2b3f7099bba5 Mon Sep 17 00:00:00 2001 From: Prashant Mital <5883388+prashantmital@users.noreply.github.com> Date: Wed, 8 Jul 2020 15:45:25 -0700 Subject: [PATCH] PYTHON-2292 Fix failing doctest due to UuidRepresentation (#458) PYTHON-2277 Remove UuidRepresentation DeprecationWarning --- bson/codec_options.py | 6 ------ doc/faq.rst | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/bson/codec_options.py b/bson/codec_options.py index a514cc92d..82079b71a 100644 --- a/bson/codec_options.py +++ b/bson/codec_options.py @@ -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 " diff --git a/doc/faq.rst b/doc/faq.rst index 2f72746b4..faa4d803a 100644 --- a/doc/faq.rst +++ b/doc/faq.rst @@ -237,7 +237,7 @@ collection, configured to use :class:`~bson.son.SON` instead of dict: >>> opts CodecOptions(document_class=, 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))