Skip to content

Commit 2f06e8a

Browse files
committed
PYTHON-1808 - Document uuidRepresentation
1 parent 7491162 commit 2f06e8a

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

bson/binary.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@
4949
"""BSON binary subtype for a UUID.
5050
5151
This is the new BSON binary subtype for UUIDs. The
52-
current default is :data:`OLD_UUID_SUBTYPE` but will
53-
change to this in a future release.
52+
current default is :data:`OLD_UUID_SUBTYPE`.
5453
5554
.. versionchanged:: 2.1
5655
Changed to subtype 4.

doc/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ Changes in Version 3.8.0.dev0
9494
:meth:`~pymongo.cursor.Cursor.hint` of which index to use. The find command
9595
is expected to require a :meth:`~pymongo.cursor.Cursor.hint` when using
9696
min/max starting in MongoDB 4.2.
97+
- Documented support for the uuidRepresentation URI option, which has been
98+
supported since PyMongo 2.7. Valid values are `pythonLegacy` (the default),
99+
`javaLegacy`, `csharpLegacy` and `standard`. New applications should consider
100+
setting this to `standard` for cross language compatibility.
97101

98102
Issues Resolved
99103
...............

pymongo/mongo_client.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,11 @@ def __init__(
294294
are -1 through 9. -1 tells the zlib library to use its default
295295
compression level (usually 6). 0 means no compression. 1 is best
296296
speed. 9 is best compression. Defaults to -1.
297+
- `uuidRepresentation`: The BSON representation to use when encoding
298+
from and decoding to instances of :class:`~uuid.UUID`. Valid
299+
values are `pythonLegacy` (the default), `javaLegacy`,
300+
`csharpLegacy` and `standard`. New applications should consider
301+
setting this to `standard` for cross language compatibility.
297302
298303
| **Write Concern options:**
299304
| (Only set if passed. No default values.)

0 commit comments

Comments
 (0)