Skip to content

Commit 8053745

Browse files
author
Mike Dirolf
committed
BUMP 1.4 - see changelog for details
1 parent 103bd3f commit 8053745

File tree

8 files changed

+77
-13
lines changed

8 files changed

+77
-13
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ PyMongo
77
About
88
=====
99

10-
The PyMongo distribution contains tools for interacting with the Mongo
10+
The PyMongo distribution contains tools for interacting with MongoDB
1111
database from Python. The ``pymongo`` package is a native Python
12-
driver for the Mongo database. The ``gridfs`` package is a `gridfs
12+
driver for MongoDB. The ``gridfs`` package is a `gridfs
1313
<http://www.mongodb.org/display/DOCS/GridFS+Specification>`_
1414
implementation on top of ``pymongo``.
1515

doc/changelog.rst

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,68 @@
11
Changelog
22
=========
33

4+
Changes in Version 1.4
5+
----------------------
6+
7+
Perhaps the most important change in version 1.4 is that we have
8+
decided to **no longer support Python 2.3**. The most immediate reason
9+
for this is to allow some improvements to connection pooling. This
10+
will also allow us to use some new (as in Python 2.4 ;) idioms and
11+
will help begin the path towards supporting Python 3.0. If you need to
12+
use Python 2.3 you should consider using version 1.3 of this driver,
13+
although that will no longer be actively supported.
14+
15+
Other changes:
16+
17+
- move ``"_id"`` to front only for top-level documents (fixes some
18+
corner cases).
19+
- :meth:`~pymongo.collection.Collection.update` and
20+
:meth:`~pymongo.collection.Collection.remove` return the entire
21+
response to the *lastError* command when safe is ``True``.
22+
- completed removal of things that were deprecated in version 1.2 or
23+
earlier.
24+
- enforce that collection names do not contain the NULL byte.
25+
- fix to allow using UTF-8 collection names with the C extension.
26+
- added :class:`~pymongo.errors.PyMongoError` as base exception class
27+
for all :mod:`~pymongo.errors`. this changes the exception hierarchy
28+
somewhat, and is a BREAKING change if you depend on
29+
:class:`~pymongo.errors.ConnectionFailure` being a :class:`IOError`
30+
or :class:`~pymongo.errors.InvalidBSON` being a :class:`ValueError`,
31+
for example.
32+
- added :class:`~pymongo.errors.DuplicateKeyError` for calls to
33+
:meth:`~pymongo.collection.Collection.insert` or
34+
:meth:`~pymongo.collection.Collection.update` with `safe` set to
35+
``True``.
36+
- removed :mod:`~pymongo.thread_util`
37+
- added :meth:`~pymongo.database.Database.add_user` and
38+
:meth:`~pymongo.database.Database.remove_user` helpers.
39+
- fix for :meth:`~pymongo.database.Database.authenticate` when using
40+
non-UTF-8 names or passwords.
41+
- minor fixes for
42+
:class:`~pymongo.master_slave_connection.MasterSlaveConnection`.
43+
- clean up all cases where :class:`~pymongo.errors.ConnectionFailure`
44+
is raised.
45+
- simplification of connection pooling - makes driver ~2x faster for
46+
simple benchmarks. see :ref:`connection-pooling` for more information.
47+
- DEPRECATED `pool_size`, `auto_start_request` and `timeout`
48+
parameters to :class:`~pymongo.connection.Connection`. DEPRECATED
49+
:meth:`~pymongo.connection.Connection.start_request`.
50+
- use :meth:`socket.sendall`.
51+
- removed :meth:`~pymongo.son.SON.from_xml` as it was only being used
52+
for some internal testing - also eliminates dependency on
53+
:mod:`elementtree`.
54+
- implementation of :meth:`~pymongo.message.update` in C.
55+
- deprecate :meth:`~pymongo.database.Database._command` in favor of
56+
:meth:`~pymongo.database.Database.command`.
57+
- send all commands without wrapping as ``{"query": ...}``.
58+
- support string as `key` argument to
59+
:meth:`~pymongo.collection.Collection.group` (keyf) and run all
60+
groups as commands.
61+
- support for equality testing for :class:`~pymongo.code.Code`
62+
instances.
63+
- allow the NULL byte in strings and disallow it in key names or regex
64+
patterns
65+
466
Changes in Version 1.3
567
----------------------
668
- DEPRECATED running :meth:`~pymongo.collection.Collection.group` as

doc/faq.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Is PyMongo thread-safe?
99
PyMongo is thread-safe and even provides built-in connection pooling
1010
for threaded applications.
1111

12+
.. _connection-pooling:
13+
1214
How does connection pooling work in PyMongo?
1315
--------------------------------------------
1416

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.3+"
31+
version = "1.4"
3232
"""Current version of PyMongo."""
3333

3434
Connection = PyMongo_Connection

pymongo/collection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def update(self, spec, document,
258258
explicitly for all update operations in order to prepare your code
259259
for that change.
260260
261-
.. versionchanged:: 1.3+
261+
.. versionchanged:: 1.4
262262
Return the response to *lastError* if `safe` is ``True``.
263263
.. versionadded:: 1.1.1
264264
The `multi` parameter.
@@ -309,7 +309,7 @@ def remove(self, spec_or_object_id=None, safe=False):
309309
``_id`` field for the document to be removed
310310
- `safe` (optional): check that the remove succeeded?
311311
312-
.. versionchanged:: 1.3+
312+
.. versionchanged:: 1.4
313313
Return the response to *lastError* if `safe` is ``True``.
314314
.. versionchanged:: 1.2
315315
The `spec_or_object_id` parameter is now optional. If it is
@@ -645,7 +645,7 @@ def group(self, key, condition, initial, reduce, finalize=None,
645645
command instead of in an eval - this option is deprecated and
646646
will be removed in favor of running all groups as commands
647647
648-
.. versionchanged:: 1.3+
648+
.. versionchanged:: 1.4
649649
The `key` argument can now be ``None`` or a JavaScript function,
650650
in addition to a :class:`list` of keys.
651651
.. versionchanged:: 1.3

pymongo/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def __init__(self, host=None, port=None, pool_size=None,
124124
operations - default is no timeout
125125
126126
.. seealso:: :meth:`end_request`
127-
.. versionchanged:: 1.3+
127+
.. versionchanged:: 1.4
128128
DEPRECATED The `pool_size`, `auto_start_request`, and `timeout`
129129
parameters.
130130
.. versionadded:: 1.1
@@ -542,7 +542,7 @@ def _send_message_with_response(self, message,
542542
def start_request(self):
543543
"""DEPRECATED all operations will start a request.
544544
545-
.. versionchanged:: 1.3+
545+
.. versionchanged:: 1.4
546546
DEPRECATED
547547
"""
548548
warnings.warn("the Connection.start_request method is deprecated",

pymongo/database.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def command(self, command, check=True, allowable_errors=[], _sock=None):
213213
- `allowable_errors`: if `check` is ``True``, error messages in this
214214
list will be ignored by error-checking
215215
216-
.. versionadded:: 1.3+
216+
.. versionadded:: 1.4
217217
"""
218218
result = self["$cmd"].find_one(command, _sock=_sock,
219219
_must_use_master=True,
@@ -379,7 +379,7 @@ def add_user(self, name, password):
379379
- `name`: the name of the user to create
380380
- `password`: the password of the user to create
381381
382-
.. versionadded:: 1.3+
382+
.. versionadded:: 1.4
383383
"""
384384
self.system.users.update({"user": name},
385385
{"user": name,
@@ -395,7 +395,7 @@ def remove_user(self, name):
395395
:Paramaters:
396396
- `name`: the name of the user to remove
397397
398-
.. versionadded:: 1.3+
398+
.. versionadded:: 1.4
399399
"""
400400
self.system.users.remove({"user": name}, safe=True)
401401

pymongo/errors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class PyMongoError(Exception):
1818
"""Base class for all PyMongo exceptions.
1919
20-
.. versionadded:: 1.3+
20+
.. versionadded:: 1.4
2121
"""
2222

2323

@@ -51,7 +51,7 @@ class OperationFailure(PyMongoError):
5151
class DuplicateKeyError(OperationFailure):
5252
"""Raised when a safe insert or update fails due to a duplicate key error.
5353
54-
.. versionadded:: 1.3+
54+
.. versionadded:: 1.4
5555
"""
5656

5757

0 commit comments

Comments
 (0)