Skip to content

Commit 18bbe73

Browse files
author
Mike Dirolf
committed
BUMP 1.2 see changelog in docs
1 parent e4d36ae commit 18bbe73

File tree

7 files changed

+33
-7
lines changed

7 files changed

+33
-7
lines changed

doc/examples/map_reduce.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ map/reduce style aggregations on your data.
77

88
.. note:: Map/Reduce requires server version **>= 1.1.1**. The PyMongo
99
:meth:`~pymongo.collection.Collection.map_reduce` helper requires
10-
PyMongo version **>= 1.1.2+**.
10+
PyMongo version **>= 1.2**.
1111

1212
Setup
1313
-----

doc/index.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,32 @@ minor tweaks to this documentation. To contribute, fork the project on
4646
`github <http://github.com/mongodb/mongo-python-driver/>`_ and send a
4747
pull request.
4848

49+
Changes in Version 1.2
50+
----------------------
51+
- `spec` parameter for :meth:`~pymongo.collection.Collection.remove` is
52+
now optional to allow for deleting all documents in a
53+
:class:`~pymongo.collection.Collection`
54+
- always wrap queries with ``{query: ...}`` even when no special options -
55+
get around some issues with queries on fields named ``query``
56+
- enforce 4MB document limit on the client side
57+
- added :meth:`~pymongo.collection.Collection.map_reduce` helper - see
58+
:doc:`example <examples/map_reduce>`
59+
- added :meth:`pymongo.cursor.Cursor.distinct` to allow distinct with
60+
queries
61+
- fix for :meth:`pymongo.cursor.Cursor.__getitem__` after
62+
:meth:`~pymongo.cursor.Cursor.skip`
63+
- allow any UTF-8 string in :class:`~pymongo.bson.BSON` encoder, not
64+
just ASCII subset
65+
- added :attr:`pymongo.objectid.ObjectId.generation_time`
66+
- removed support for legacy :class:`~pymongo.objectid.ObjectId`
67+
format - pretty sure this was never used, and is just confusing
68+
- DEPRECATED :meth:`pymongo.objectid.ObjectId.url_encode` and
69+
:meth:`pymongo.objectid.ObjectId.url_decode` in favor of :meth:`str`
70+
and :meth:`pymongo.objectid.ObjectId`, respectively
71+
- allow *oplog.$main* as a valid collection name
72+
- some minor fixes for installation process
73+
- added support for datetime and regex in :mod:`~pymongo.json_util`
74+
4975
Full Contents Tree
5076
------------------
5177

pymongo/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
ALL = 2
2929
"""Profile all operations."""
3030

31-
version = "1.1.2+"
31+
version = "1.2"
3232
"""Current version of PyMongo."""
3333

3434
Connection = PyMongo_Connection

pymongo/collection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def remove(self, spec_or_object_id=None, safe=False):
268268
``_id`` field for the document to be removed
269269
- `safe` (optional): check that the remove succeeded?
270270
271-
.. versionchanged:: 1.1.2+
271+
.. versionchanged:: 1.2
272272
The `spec_or_object_id` parameter is now optional. If it is
273273
not specified *all* documents in the collection will be
274274
removed.
@@ -750,7 +750,7 @@ def map_reduce(self, map, reduce, full_response=False, **kwargs):
750750
751751
.. seealso:: :doc:`/examples/map_reduce`
752752
753-
.. versionadded:: 1.1.2+
753+
.. versionadded:: 1.2
754754
755755
.. _map reduce command: http://www.mongodb.org/display/DOCS/MapReduce
756756
"""

pymongo/cursor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def distinct(self, key):
321321
322322
.. seealso:: :meth:`pymongo.collection.Collection.distinct`
323323
324-
.. versionadded:: 1.1.2+
324+
.. versionadded:: 1.2
325325
"""
326326
if not isinstance(key, types.StringTypes):
327327
raise TypeError("key must be an instance of (str, unicode)")

pymongo/json_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
:class:`~pymongo.binary.Binary` and :class:`~pymongo.code.Code`
3535
instances.
3636
37-
.. versionchanged:: 1.1.2+
37+
.. versionchanged:: 1.2
3838
Added support for encoding/decoding datetimes and regular expressions.
3939
"""
4040

pymongo/objectid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def generation_time(self):
142142
The :class:`datetime.datetime` is always naive and represents the
143143
generation time in UTC. It is precise to the second.
144144
145-
.. versionadded:: 1.1.2+
145+
.. versionadded:: 1.2
146146
"""
147147
t = struct.unpack(">i", self.__id[0:4])[0]
148148
return datetime.datetime.utcfromtimestamp(t)

0 commit comments

Comments
 (0)