diff --git a/doc/api/pymongo/connection.rst b/doc/api/pymongo/connection.rst index fcba55942..b97989268 100644 --- a/doc/api/pymongo/connection.rst +++ b/doc/api/pymongo/connection.rst @@ -26,6 +26,7 @@ .. autoattribute:: document_class .. autoattribute:: tz_aware .. autoattribute:: max_bson_size + .. autoattribute:: max_message_size .. autoattribute:: read_preference .. autoattribute:: tag_sets .. autoattribute:: secondary_acceptable_latency_ms diff --git a/doc/api/pymongo/cursor.rst b/doc/api/pymongo/cursor.rst index 2f5ddc648..ba54121dc 100644 --- a/doc/api/pymongo/cursor.rst +++ b/doc/api/pymongo/cursor.rst @@ -4,7 +4,7 @@ .. automodule:: pymongo.cursor :synopsis: Tools for iterating over MongoDB query results - .. autoclass:: pymongo.cursor.Cursor + .. autoclass:: pymongo.cursor.Cursor(collection, spec=None, fields=None, skip=0, limit=0, timeout=True, snapshot=False, tailable=False, sort=None, max_scan=None, as_class=None, slave_okay=False, await_data=False, partial=False, manipulate=True, read_preference=ReadPreference.PRIMARY, tag_sets=[{}], secondary_acceptable_latency_ms=None, exhaust=False, network_timeout=None) :members: .. describe:: c[index] diff --git a/doc/api/pymongo/mongo_client.rst b/doc/api/pymongo/mongo_client.rst index 44fe3e65e..7260457dd 100644 --- a/doc/api/pymongo/mongo_client.rst +++ b/doc/api/pymongo/mongo_client.rst @@ -26,6 +26,7 @@ .. autoattribute:: document_class .. autoattribute:: tz_aware .. autoattribute:: max_bson_size + .. autoattribute:: max_message_size .. autoattribute:: read_preference .. autoattribute:: tag_sets .. autoattribute:: secondary_acceptable_latency_ms diff --git a/doc/api/pymongo/mongo_replica_set_client.rst b/doc/api/pymongo/mongo_replica_set_client.rst index 3e7de2a43..1e9dc1499 100644 --- a/doc/api/pymongo/mongo_replica_set_client.rst +++ b/doc/api/pymongo/mongo_replica_set_client.rst @@ -26,6 +26,7 @@ .. autoattribute:: document_class .. autoattribute:: tz_aware .. autoattribute:: max_bson_size + .. autoattribute:: max_message_size .. autoattribute:: auto_start_request .. autoattribute:: read_preference .. autoattribute:: tag_sets diff --git a/doc/api/pymongo/replica_set_connection.rst b/doc/api/pymongo/replica_set_connection.rst index d59dbc724..5d0445f8f 100644 --- a/doc/api/pymongo/replica_set_connection.rst +++ b/doc/api/pymongo/replica_set_connection.rst @@ -26,6 +26,7 @@ .. autoattribute:: document_class .. autoattribute:: tz_aware .. autoattribute:: max_bson_size + .. autoattribute:: max_message_size .. autoattribute:: auto_start_request .. autoattribute:: read_preference .. autoattribute:: tag_sets diff --git a/doc/changelog.rst b/doc/changelog.rst index a0ba6c07d..db3f38ba7 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,21 +1,38 @@ Changelog ========= -Changes in Version 2.5.2+ -------------------------- +Changes in Version 2.6 +---------------------- + +Version 2.6 includes some frequently requested improvements and adds +support for some early MongoDB 2.6 features. + +Special thanks go to Justin Patrin for his work on the connection pool +in this release. Important new features: -- The `max_pool_size` option for :class:`~pymongo.mongo_client.MongoClient` and - :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient` now actually - caps the number of sockets the pool will open concurrently. Connection or - query attempts when the pool has reached `max_pool_size` block waiting for a - socket to be returned to the pool. If ``waitQueueTimeoutMS`` is set, an - operation that blocks waiting for a socket will raise - :exc:`~pymongo.errors.ConnectionFailure` after the timeout. By default - ``waitQueueTimeoutMS`` is not set. +- The ``max_pool_size`` option for :class:`~pymongo.mongo_client.MongoClient` + and :class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient` now + actually caps the number of sockets the pool will open concurrently. + Once the pool has reached :attr:`~pymongo.mongo_client.MongoClient.max_pool_size` + operations will block waiting for a socket to become available. If + ``waitQueueTimeoutMS`` is set, an operation that blocks waiting for a socket + will raise :exc:`~pymongo.errors.ConnectionFailure` after the timeout. By + default ``waitQueueTimeoutMS`` is not set. + See :ref:`connection-pooling` for more information. +- The :meth:`~pymongo.collection.Collection.insert` method automatically splits + large batches of documents into multiple insert messages based on + :attr:`~pymongo.mongo_client.MongoClient.max_message_size` +- Support for the exhaust cursor flag. + See :meth:`~pymongo.collection.Collection.find` for details and caveats. +- Support for the PLAIN and MONGODB-X509 authentication mechanisms. + See :doc:`the authentication docs ` for more + information. +- Support aggregation output as a :class:`~pymongo.cursor.Cursor`. See + :meth:`~pymongo.collection.Collection.aggregate` for details. -.. warning:: SIGNIFICANT BEHAVIOR CHANGE in 2.5.2+. Previously, `max_pool_size` +.. warning:: SIGNIFICANT BEHAVIOR CHANGE in 2.6. Previously, `max_pool_size` would limit only the idle sockets the pool would hold onto, not the number of open sockets. The default has also changed, from 10 to 100. If you pass a value for ``max_pool_size`` make sure it is large enough for @@ -25,6 +42,14 @@ Important new features: See :ref:`connection-pooling` for more information. +Issues Resolved +............... + +See the `PyMongo 2.6 release notes in JIRA`_ for the list of resolved issues +in this release. + +.. _PyMongo 2.6 release notes in JIRA: https://jira.mongodb.org/browse/PYTHON/fixforversion/12380 + Changes in Version 2.5.2 ------------------------ diff --git a/pymongo/collection.py b/pymongo/collection.py index 66c351165..0998ca28f 100644 --- a/pymongo/collection.py +++ b/pymongo/collection.py @@ -1090,9 +1090,9 @@ class Collection(common.BaseObject): for doc in cursor: print doc - .. versionadded:: 2.3 .. versionchanged:: 2.6 Added cursor support. + .. versionadded:: 2.3 .. _aggregate command: http://docs.mongodb.org/manual/applications/aggregation