BUMP 1.2 see changelog in docs

This commit is contained in:
Mike Dirolf 2009-12-09 11:53:01 -05:00
parent e4d36aea11
commit 18bbe73da2
7 changed files with 33 additions and 7 deletions

View File

@ -7,7 +7,7 @@ map/reduce style aggregations on your data.
.. note:: Map/Reduce requires server version **>= 1.1.1**. The PyMongo
:meth:`~pymongo.collection.Collection.map_reduce` helper requires
PyMongo version **>= 1.1.2+**.
PyMongo version **>= 1.2**.
Setup
-----

View File

@ -46,6 +46,32 @@ minor tweaks to this documentation. To contribute, fork the project on
`github <http://github.com/mongodb/mongo-python-driver/>`_ and send a
pull request.
Changes in Version 1.2
----------------------
- `spec` parameter for :meth:`~pymongo.collection.Collection.remove` is
now optional to allow for deleting all documents in a
:class:`~pymongo.collection.Collection`
- always wrap queries with ``{query: ...}`` even when no special options -
get around some issues with queries on fields named ``query``
- enforce 4MB document limit on the client side
- added :meth:`~pymongo.collection.Collection.map_reduce` helper - see
:doc:`example <examples/map_reduce>`
- added :meth:`pymongo.cursor.Cursor.distinct` to allow distinct with
queries
- fix for :meth:`pymongo.cursor.Cursor.__getitem__` after
:meth:`~pymongo.cursor.Cursor.skip`
- allow any UTF-8 string in :class:`~pymongo.bson.BSON` encoder, not
just ASCII subset
- added :attr:`pymongo.objectid.ObjectId.generation_time`
- removed support for legacy :class:`~pymongo.objectid.ObjectId`
format - pretty sure this was never used, and is just confusing
- DEPRECATED :meth:`pymongo.objectid.ObjectId.url_encode` and
:meth:`pymongo.objectid.ObjectId.url_decode` in favor of :meth:`str`
and :meth:`pymongo.objectid.ObjectId`, respectively
- allow *oplog.$main* as a valid collection name
- some minor fixes for installation process
- added support for datetime and regex in :mod:`~pymongo.json_util`
Full Contents Tree
------------------

View File

@ -28,7 +28,7 @@ SLOW_ONLY = 1
ALL = 2
"""Profile all operations."""
version = "1.1.2+"
version = "1.2"
"""Current version of PyMongo."""
Connection = PyMongo_Connection

View File

@ -268,7 +268,7 @@ class Collection(object):
``_id`` field for the document to be removed
- `safe` (optional): check that the remove succeeded?
.. versionchanged:: 1.1.2+
.. versionchanged:: 1.2
The `spec_or_object_id` parameter is now optional. If it is
not specified *all* documents in the collection will be
removed.
@ -750,7 +750,7 @@ class Collection(object):
.. seealso:: :doc:`/examples/map_reduce`
.. versionadded:: 1.1.2+
.. versionadded:: 1.2
.. _map reduce command: http://www.mongodb.org/display/DOCS/MapReduce
"""

View File

@ -321,7 +321,7 @@ class Cursor(object):
.. seealso:: :meth:`pymongo.collection.Collection.distinct`
.. versionadded:: 1.1.2+
.. versionadded:: 1.2
"""
if not isinstance(key, types.StringTypes):
raise TypeError("key must be an instance of (str, unicode)")

View File

@ -34,7 +34,7 @@ Currently this does not handle special encoding and decoding for
:class:`~pymongo.binary.Binary` and :class:`~pymongo.code.Code`
instances.
.. versionchanged:: 1.1.2+
.. versionchanged:: 1.2
Added support for encoding/decoding datetimes and regular expressions.
"""

View File

@ -142,7 +142,7 @@ class ObjectId(object):
The :class:`datetime.datetime` is always naive and represents the
generation time in UTC. It is precise to the second.
.. versionadded:: 1.1.2+
.. versionadded:: 1.2
"""
t = struct.unpack(">i", self.__id[0:4])[0]
return datetime.datetime.utcfromtimestamp(t)