From 18bbe73da25340affdfbb81ffc33d72a34938b40 Mon Sep 17 00:00:00 2001 From: Mike Dirolf Date: Wed, 9 Dec 2009 11:53:01 -0500 Subject: [PATCH] BUMP 1.2 see changelog in docs --- doc/examples/map_reduce.rst | 2 +- doc/index.rst | 26 ++++++++++++++++++++++++++ pymongo/__init__.py | 2 +- pymongo/collection.py | 4 ++-- pymongo/cursor.py | 2 +- pymongo/json_util.py | 2 +- pymongo/objectid.py | 2 +- 7 files changed, 33 insertions(+), 7 deletions(-) diff --git a/doc/examples/map_reduce.rst b/doc/examples/map_reduce.rst index 242a339f8..acf9ee6c0 100644 --- a/doc/examples/map_reduce.rst +++ b/doc/examples/map_reduce.rst @@ -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 ----- diff --git a/doc/index.rst b/doc/index.rst index 40482babe..540f5c13e 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -46,6 +46,32 @@ minor tweaks to this documentation. To contribute, fork the project on `github `_ 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 ` +- 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 ------------------ diff --git a/pymongo/__init__.py b/pymongo/__init__.py index 5faa49239..72bc3a706 100644 --- a/pymongo/__init__.py +++ b/pymongo/__init__.py @@ -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 diff --git a/pymongo/collection.py b/pymongo/collection.py index a3d0dfb83..fb648394d 100644 --- a/pymongo/collection.py +++ b/pymongo/collection.py @@ -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 """ diff --git a/pymongo/cursor.py b/pymongo/cursor.py index aca0cecb5..ab1bdf918 100644 --- a/pymongo/cursor.py +++ b/pymongo/cursor.py @@ -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)") diff --git a/pymongo/json_util.py b/pymongo/json_util.py index 5251eec96..606799dad 100644 --- a/pymongo/json_util.py +++ b/pymongo/json_util.py @@ -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. """ diff --git a/pymongo/objectid.py b/pymongo/objectid.py index 8984b8329..facf0d7de 100644 --- a/pymongo/objectid.py +++ b/pymongo/objectid.py @@ -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)