Skip to content

PYTHON-2292 Fix failing doctest due to UuidRepresentation #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions bson/codec_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ def __new__(cls, document_class=dict,
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 "
Expand Down
2 changes: 1 addition & 1 deletion doc/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down