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))