Doc updates for PyMongo 2.3

This commit is contained in:
behackett 2012-08-16 15:52:14 -07:00
parent 72770fa5df
commit dfaadd53e8
5 changed files with 19 additions and 14 deletions

View File

@ -68,8 +68,9 @@ change to this in a future release.
"""
JAVA_LEGACY = 5
"""Specify that UUIDs should be stored in the legacy
byte order used by the Java driver.
"""Used with :attr:`pymongo.collection.Collection.uuid_subtype`
to specify that UUIDs should be stored in the legacy byte order
used by the Java driver.
:class:`uuid.UUID` instances will automatically be encoded
by :mod:`bson` using :data:`OLD_UUID_SUBTYPE`.
@ -78,8 +79,9 @@ by :mod:`bson` using :data:`OLD_UUID_SUBTYPE`.
"""
CSHARP_LEGACY = 6
"""Specify that UUIDs should be stored in the legacy
byte order used by the C# driver.
"""Used with :attr:`pymongo.collection.Collection.uuid_subtype`
to specify that UUIDs should be stored in the legacy byte order
used by the C# driver.
:class:`uuid.UUID` instances will automatically be encoded
by :mod:`bson` using :data:`OLD_UUID_SUBTYPE`.

View File

@ -130,7 +130,7 @@ class ObjectId(object):
:Parameters:
- `oid`: the object id to validate
.. versionadded:: 2.2.1+
.. versionadded:: 2.3
"""
try:
ObjectId(oid)

View File

@ -7,8 +7,10 @@
.. autodata:: BINARY_SUBTYPE
.. autodata:: FUNCTION_SUBTYPE
.. autodata:: OLD_BINARY_SUBTYPE
.. autodata:: UUID_SUBTYPE
.. autodata:: OLD_UUID_SUBTYPE
.. autodata:: UUID_SUBTYPE
.. autodata:: JAVA_LEGACY
.. autodata:: CSHARP_LEGACY
.. autodata:: MD5_SUBTYPE
.. autodata:: USER_DEFINED_SUBTYPE

View File

@ -16,6 +16,7 @@ Important New Features:
- A new :meth:`~pymongo.collection.Collection.aggregate` method to support
MongoDB's new `aggregation framework
<http://docs.mongodb.org/manual/applications/aggregation/>`_.
- Support for legacy Java and C# byte order when encoding and decoding UUIDs.
- Support for connecting directly to an arbiter.
.. warning::

View File

@ -182,14 +182,14 @@ class Collection(common.BaseObject):
self.__uuid_subtype = subtype
uuid_subtype = property(__get_uuid_subtype, __set_uuid_subtype,
doc="""This setting specifies which BSON Binary
doc="""This attribute specifies which BSON Binary
subtype is used when storing UUIDs. Historically
UUIDs have been stored as BSON Binary subtype 3.
This setting is used to switch to the newer BSON
binary subtype 4. This setting can also be used to
force legacy byte order and subtype compatibility
with the Java and C# drivers. See the bson.binary
module for all options.""")
This attribute is used to switch to the newer BSON
binary subtype 4. It can also be used to force
legacy byte order and subtype compatibility with
the Java and C# drivers. See the
:mod:`bson.binary` module for all options.""")
def save(self, to_save, manipulate=True,
safe=None, check_keys=True, **kwargs):
@ -685,7 +685,7 @@ class Collection(common.BaseObject):
arguments
- `ttl` (deprecated): Use `cache_for` instead.
.. versionchanged:: 2.2.1+
.. versionchanged:: 2.3
The `ttl` parameter has been deprecated to avoid confusion with
TTL collections. Use `cache_for` instead.
@ -787,7 +787,7 @@ class Collection(common.BaseObject):
arguments
- `ttl` (deprecated): Use `cache_for` instead.
.. versionchanged:: 2.2.1+
.. versionchanged:: 2.3
The `ttl` parameter has been deprecated to avoid confusion with
TTL collections. Use `cache_for` instead.