PYTHON-1808 - Document uuidRepresentation

(cherry picked from commit 2f06e8a441)
This commit is contained in:
Bernie Hackett 2019-04-12 15:20:21 -07:00
parent e1c319b041
commit bc8e8b2830
3 changed files with 10 additions and 2 deletions

View File

@ -49,8 +49,7 @@ UUID_SUBTYPE = 4
"""BSON binary subtype for a UUID.
This is the new BSON binary subtype for UUIDs. The
current default is :data:`OLD_UUID_SUBTYPE` but will
change to this in a future release.
current default is :data:`OLD_UUID_SUBTYPE`.
.. versionchanged:: 2.1
Changed to subtype 4.

View File

@ -52,6 +52,10 @@ Changes in Version 3.8.0.dev0
:meth:`~pymongo.cursor.Cursor.hint` of which index to use. The find command
is expected to require a :meth:`~pymongo.cursor.Cursor.hint` when using
min/max starting in MongoDB 4.2.
- Documented support for the uuidRepresentation URI option, which has been
supported since PyMongo 2.7. Valid values are `pythonLegacy` (the default),
`javaLegacy`, `csharpLegacy` and `standard`. New applications should consider
setting this to `standard` for cross language compatibility.
Issues Resolved
...............

View File

@ -291,6 +291,11 @@ class MongoClient(common.BaseObject):
are -1 through 9. -1 tells the zlib library to use its default
compression level (usually 6). 0 means no compression. 1 is best
speed. 9 is best compression. Defaults to -1.
- `uuidRepresentation`: The BSON representation to use when encoding
from and decoding to instances of :class:`~uuid.UUID`. Valid
values are `pythonLegacy` (the default), `javaLegacy`,
`csharpLegacy` and `standard`. New applications should consider
setting this to `standard` for cross language compatibility.
| **Write Concern options:**
| (Only set if passed. No default values.)