Skip to content

Commit 13b6119

Browse files
author
Mike Dirolf
committed
minor: add full changelog and add version changed / added information for all changes since 1.0
1 parent 17d1d00 commit 13b6119

File tree

7 files changed

+224
-25
lines changed

7 files changed

+224
-25
lines changed

doc/changelog.rst

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
Changes
2+
=======
3+
4+
Changes in Version 1.2
5+
----------------------
6+
- `spec` parameter for :meth:`~pymongo.collection.Collection.remove` is
7+
now optional to allow for deleting all documents in a
8+
:class:`~pymongo.collection.Collection`
9+
- always wrap queries with ``{query: ...}`` even when no special options -
10+
get around some issues with queries on fields named ``query``
11+
- enforce 4MB document limit on the client side
12+
- added :meth:`~pymongo.collection.Collection.map_reduce` helper - see
13+
:doc:`example <examples/map_reduce>`
14+
- added :meth:`~pymongo.cursor.Cursor.distinct` method on
15+
:class:`~pymongo.cursor.Cursor` instances to allow distinct with
16+
queries
17+
- fix for :meth:`~pymongo.cursor.Cursor.__getitem__` after
18+
:meth:`~pymongo.cursor.Cursor.skip`
19+
- allow any UTF-8 string in :class:`~pymongo.bson.BSON` encoder, not
20+
just ASCII subset
21+
- added :attr:`~pymongo.objectid.ObjectId.generation_time`
22+
- removed support for legacy :class:`~pymongo.objectid.ObjectId`
23+
format - pretty sure this was never used, and is just confusing
24+
- DEPRECATED :meth:`~pymongo.objectid.ObjectId.url_encode` and
25+
:meth:`~pymongo.objectid.ObjectId.url_decode` in favor of :meth:`str`
26+
and :meth:`~pymongo.objectid.ObjectId`, respectively
27+
- allow *oplog.$main* as a valid collection name
28+
- some minor fixes for installation process
29+
- added support for datetime and regex in :mod:`~pymongo.json_util`
30+
31+
Changes in Version 1.1.2
32+
------------------------
33+
- improvements to :meth:`~pymongo.collection.Collection.insert` speed
34+
(using C for insert message creation)
35+
- use random number for request_id
36+
- fix some race conditions with :class:`~pymongo.errors.AutoReconnect`
37+
38+
Changes in Version 1.1.1
39+
------------------------
40+
- added `multi` parameter for
41+
:meth:`~pymongo.collection.Collection.update`
42+
- fix unicode regex patterns with C extension
43+
- added :meth:`~pymongo.collection.Collection.distinct`
44+
- added `database` support for :class:`~pymongo.dbref.DBRef`
45+
- added :mod:`~pymongo.json_util` with helpers for encoding / decoding
46+
special types to JSON
47+
- DEPRECATED :meth:`~pymongo.cursor.Cursor.__len__` in favor of
48+
:meth:`~pymongo.cursor.Cursor.count` with `with_limit_and_skip` set
49+
to ``True`` due to performance regression
50+
- switch documentation to Sphinx
51+
52+
Changes in Version 1.1
53+
----------------------
54+
- added :meth:`__hash__` for :class:`~pymongo.dbref.DBRef` and
55+
:class:`~pymongo.objectid.ObjectId`
56+
- bulk :meth:`~pymongo.collection.Collection.insert` works with any
57+
iterable
58+
- fix :class:`~pymongo.objectid.ObjectId` generation when using
59+
:mod:`multiprocessing`
60+
- added :attr:`~pymongo.cursor.Cursor.collection`
61+
- added `network_timeout` parameter for
62+
:meth:`~pymongo.connection.Connection`
63+
- DEPRECATED `slave_okay` parameter for individual queries
64+
- fix for `safe` mode when multi-threaded
65+
- added `safe` parameter for :meth:`~pymongo.collection.Collection.remove`
66+
- added `tailable` parameter for :meth:`~pymongo.collection.Collection.find`
67+
68+
Changes in Version 1.0
69+
----------------------
70+
- fixes for
71+
:class:`~pymongo.master_slave_connection.MasterSlaveConnection`
72+
- added `finalize` parameter for :meth:`~pymongo.collection.Collection.group`
73+
- improvements to :meth:`~pymongo.collection.Collection.insert` speed
74+
- improvements to :mod:`gridfs` speed
75+
- added :meth:`~pymongo.cursor.Cursor.__getitem__` and
76+
:meth:`~pymongo.cursor.Cursor.__len__` for
77+
:class:`~pymongo.cursor.Cursor` instances
78+
79+
Changes in Version 0.16
80+
-----------------------
81+
- support for encoding/decoding :class:`uuid.UUID` instances
82+
- fix for :meth:`~pymongo.cursor.Cursor.explain` with limits
83+
84+
Changes in Version 0.15.2
85+
-------------------------
86+
- documentation changes only
87+
88+
Changes in Version 0.15.1
89+
-------------------------
90+
- various performance improvements
91+
- API CHANGE no longer need to specify direction for
92+
:meth:`~pymongo.collection.Collection.create_index` and
93+
:meth:`~pymongo.collection.Collection.ensure_index` when indexing a
94+
single key
95+
- support for encoding :class:`tuple` instances as :class:`list`
96+
instances
97+
98+
Changes in Version 0.15
99+
-----------------------
100+
- fix string representation of :class:`~pymongo.objectid.ObjectId`
101+
instances
102+
- added `timeout` parameter for
103+
:meth:`~pymongo.collection.Collection.find`
104+
- allow scope for `reduce` function in
105+
:meth:`~pymongo.collection.Collection.group`
106+
107+
Changes in Version 0.14.2
108+
-------------------------
109+
- minor bugfixes
110+
111+
Changes in Version 0.14.1
112+
-------------------------
113+
- :meth:`~gridfs.grid_file.GridFile.seek` and
114+
:meth:`~gridfs.grid_file.GridFile.tell` for (read mode)
115+
:class:`~gridfs.grid_file.GridFile` instances
116+
117+
Changes in Version 0.14
118+
-----------------------
119+
- support for long in :class:`~pymongo.bson.BSON`
120+
- added :meth:`~pymongo.collection.Collection.rename`
121+
- added `snapshot` parameter for
122+
:meth:`~pymongo.collection.Collection.find`
123+
124+
Changes in Version 0.13
125+
-----------------------
126+
- better
127+
:class:`~pymongo.master_slave_connection.MasterSlaveConnection`
128+
support
129+
- API CHANGE :meth:`~pymongo.collection.Collection.insert` and
130+
:meth:`~pymongo.collection.Collection.save` both return inserted
131+
``_id``
132+
- DEPRECATED passing an index name to
133+
:meth:`~pymongo.cursor.Cursor.hint`
134+
135+
Changes in Version 0.12
136+
-----------------------
137+
- improved :class:`~pymongo.objectid.ObjectId` generation
138+
- added :class:`~pymongo.errors.AutoReconnect` exception for when
139+
reconnection is possible
140+
- make :mod:`gridfs` thread-safe
141+
- fix for :mod:`gridfs` with non :class:`~pymongo.objectid.ObjectId` ``_id``
142+
143+
Changes in Version 0.11.3
144+
-------------------------
145+
- don't allow NULL bytes in string encoder
146+
- fixes for Python 2.3
147+
148+
Changes in Version 0.11.2
149+
-------------------------
150+
- PEP 8
151+
- updates for :meth:`~pymongo.collection.Collection.group`
152+
- VS build
153+
154+
Changes in Version 0.11.1
155+
-------------------------
156+
- fix for connection pooling under Python 2.5
157+
158+
Changes in Version 0.11
159+
-----------------------
160+
- better build failure detection
161+
- driver support for selecting fields in sub-documents
162+
- disallow insertion of invalid key names
163+
- added `timeout` parameter for :meth:`~pymongo.connection.Connection`
164+
165+
Changes in Version 0.10.3
166+
-------------------------
167+
- fix bug with large :meth:`~pymongo.cursor.Cursor.limit`
168+
- better exception when modules get reloaded out from underneath the C
169+
extension
170+
- better exception messages when calling a
171+
:class:`~pymongo.collection.Collection` or
172+
:class:`~pymongo.database.Database` instance
173+
174+
Changes in Version 0.10.2
175+
-------------------------
176+
- support subclasses of :class:`dict` in C encoder
177+
178+
Changes in Version 0.10.1
179+
-------------------------
180+
- alias :class:`~pymongo.connection.Connection` as
181+
:attr:`pymongo.Connection`
182+
- raise an exception rather than silently overflowing in encoder
183+
184+
Changes in Version 0.10
185+
-----------------------
186+
- added :meth:`~pymongo.collection.Collection.ensure_index`
187+
188+
Changes in Version 0.9.7
189+
------------------------
190+
- allow sub-collections of *$cmd* as valid
191+
:class:`~pymongo.collection.Collection` names
192+
- add version as :attr:`pymongo.version`
193+
- add ``--no_ext`` command line option to *setup.py*

doc/index.rst

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,31 +46,9 @@ 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`
49+
Changes
50+
-------
51+
See the :doc:`changelog` list for a full list of changes to PyMongo.
7452

7553
Full Contents Tree
7654
------------------
@@ -85,6 +63,7 @@ Full Contents Tree
8563
api/index
8664
tools
8765
contributors
66+
changelog
8867

8968
Indices and tables
9069
==================

pymongo/collection.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ def insert(self, doc_or_docs,
170170
- `safe` (optional): check that the insert succeeded?
171171
- `check_keys` (optional): check if keys start with '$' or
172172
contain '.', raising `pymongo.errors.InvalidName` in either case
173+
174+
.. versionchanged:: 1.1
175+
Bulk insert works with any iterable
173176
"""
174177
docs = doc_or_docs
175178
if isinstance(docs, types.DictType):
@@ -272,6 +275,9 @@ def remove(self, spec_or_object_id=None, safe=False):
272275
The `spec_or_object_id` parameter is now optional. If it is
273276
not specified *all* documents in the collection will be
274277
removed.
278+
279+
.. versionadded:: 1.1
280+
The `safe` parameter.
275281
"""
276282
spec = spec_or_object_id
277283
if spec is None:
@@ -379,6 +385,9 @@ def find(self, spec=None, fields=None, skip=0, limit=0,
379385
the cursor will continue from the last document received. For
380386
details, see the `tailable cursor documentation
381387
<http://www.mongodb.org/display/DOCS/Tailable+Cursors>`_.
388+
389+
.. versionadded:: 1.1
390+
The `tailable` parameter.
382391
"""
383392
if spec is None:
384393
spec = SON()

pymongo/connection.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ def __init__(self, host=None, port=None, pool_size=None,
107107
can be set to -1 to wait indefinitely
108108
- `network_timeout` (optional): timeout (in seconds) to use for socket
109109
operations - default is no timeout
110+
111+
.. versionadded:: 1.1
112+
The `network_timeout` parameter.
110113
"""
111114
if host is None:
112115
host = self.HOST

pymongo/cursor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def __init__(self, collection, spec, fields, skip, limit, slave_okay,
6666

6767
def collection(self):
6868
"""Get the collection for this cursor.
69+
70+
.. versionadded:: 1.1
6971
"""
7072
return self.__collection
7173
collection = property(collection)

pymongo/dbref.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ def __init__(self, collection, id, database=None):
3434
- `collection`: name of the collection the document is stored in
3535
- `id`: the value of the document's _id field
3636
- `database` (optional): name of the database to reference
37+
38+
.. versionadded:: 1.1.1
39+
The `database` parameter.
3740
"""
3841
if not isinstance(collection, types.StringTypes):
3942
raise TypeError("collection must be an instance of (str, unicode)")
@@ -60,6 +63,8 @@ def database(self):
6063
"""Get the name of this DBRef's database.
6164
6265
Returns None if this DBRef doesn't specify a database.
66+
67+
.. versionadded:: 1.1.1
6368
"""
6469
return self.__database
6570
database = property(database)
@@ -87,4 +92,8 @@ def __cmp__(self, other):
8792
return NotImplemented
8893

8994
def __hash__(self):
95+
"""Get a hash value for this :class:`DBRef`.
96+
97+
.. versionadded:: 1.1
98+
"""
9099
return hash((self.__collection, self.__id, self.__database))

pymongo/objectid.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ def __cmp__(self, other):
160160
return NotImplemented
161161

162162
def __hash__(self):
163+
"""Get a hash value for this :class:`ObjectId`.
164+
165+
.. versionadded:: 1.1
166+
"""
163167
return hash(self.__id)
164168

165169

0 commit comments

Comments
 (0)