Changelog for 2.9.

This commit is contained in:
Bernie Hackett 2015-07-15 14:52:46 -07:00
parent d19786423f
commit 3bb6f0865d
6 changed files with 90 additions and 30 deletions

View File

@ -14,6 +14,7 @@
Raises :class:`~pymongo.errors.InvalidName` if an invalid database name is used.
.. autoattribute:: address
.. autoattribute:: host
.. autoattribute:: port
.. autoattribute:: is_primary
@ -21,6 +22,7 @@
.. autoattribute:: max_pool_size
.. autoattribute:: nodes
.. autoattribute:: auto_start_request
.. autoattribute:: use_greenlets
.. autoattribute:: document_class
.. autoattribute:: tz_aware
.. autoattribute:: max_bson_size

View File

@ -17,6 +17,7 @@
.. autoattribute:: seeds
.. autoattribute:: hosts
.. autoattribute:: address
.. autoattribute:: primary
.. autoattribute:: secondaries
.. autoattribute:: arbiters
@ -29,6 +30,7 @@
.. autoattribute:: min_wire_version
.. autoattribute:: max_wire_version
.. autoattribute:: auto_start_request
.. autoattribute:: use_greenlets
.. autoattribute:: codec_options
.. autoattribute:: read_preference
.. autoattribute:: tag_sets
@ -41,6 +43,9 @@
.. automethod:: get_default_database
.. automethod:: get_database
.. automethod:: close_cursor
.. automethod:: start_request
.. automethod:: in_request
.. automethod:: end_request
.. automethod:: alive
.. autoattribute:: uuid_subtype
.. autoattribute:: slave_okay

View File

@ -4,6 +4,45 @@ Changelog
Changes in Version 2.9
----------------------
Version 2.9 provides an upgrade path to PyMongo 3.x. Most of the API changes
from PyMongo 3.0 have been backported in a backward compatible way, allowing
applications to be written against PyMongo >= 2.9, rather then PyMongo 2.x or
PyMongo 3.x. See the :doc:`/migrate-to-pymongo3` for detailed examples.
.. note:: There are a number of new deprecations in this release for features
that were removed in PyMongo 3.0.
:class:`~pymongo.mongo_client.MongoClient`:
- :attr:`~pymongo.mongo_client.MongoClient.host`
- :attr:`~pymongo.mongo_client.MongoClient.port`
- :attr:`~pymongo.mongo_client.MongoClient.use_greenlets`
- :attr:`~pymongo.mongo_client.MongoClient.document_class`
- :attr:`~pymongo.mongo_client.MongoClient.tz_aware`
- :attr:`~pymongo.mongo_client.MongoClient.secondary_acceptable_latency_ms`
- :attr:`~pymongo.mongo_client.MongoClient.tag_sets`
- :attr:`~pymongo.mongo_client.MongoClient.uuid_subtype`
- :meth:`~pymongo.mongo_client.MongoClient.disconnect`
- :meth:`~pymongo.mongo_client.MongoClient.alive`
:class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`:
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.use_greenlets`
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.document_class`
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.tz_aware`
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.secondary_acceptable_latency_ms`
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.tag_sets`
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.uuid_subtype`
- :meth:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.alive`
:class:`~pymongo.database.Database`:
- :attr:`~pymongo.database.Database.secondary_acceptable_latency_ms`
- :attr:`~pymongo.database.Database.tag_sets`
- :attr:`~pymongo.database.Database.uuid_subtype`
:class:`~pymongo.collection.Collection`:
- :attr:`~pymongo.collection.Collection.secondary_acceptable_latency_ms`
- :attr:`~pymongo.collection.Collection.tag_sets`
- :attr:`~pymongo.collection.Collection.uuid_subtype`
.. warning::
In previous versions of PyMongo, changing the value of
:attr:`~pymongo.mongo_client.MongoClient.document_class` changed
@ -70,15 +109,27 @@ Highlights include:
.. note:: There are a number of deprecations in this release for features that
will be removed in PyMongo 3.0. These include:
- :meth:`~pymongo.mongo_client.MongoClient.start_request`
- :meth:`~pymongo.mongo_client.MongoClient.in_request`
- :meth:`~pymongo.mongo_client.MongoClient.end_request`
- :meth:`~pymongo.mongo_client.MongoClient.copy_database`
- :meth:`~pymongo.database.Database.error`
- :meth:`~pymongo.database.Database.last_status`
- :meth:`~pymongo.database.Database.previous_error`
- :meth:`~pymongo.database.Database.reset_error_history`
- :class:`~pymongo.master_slave_connection.MasterSlaveConnection`
:class:`~pymongo.mongo_client.MongoClient`:
- :attr:`~pymongo.mongo_client.MongoClient.auto_start_request`
- :meth:`~pymongo.mongo_client.MongoClient.start_request`
- :meth:`~pymongo.mongo_client.MongoClient.in_request`
- :meth:`~pymongo.mongo_client.MongoClient.end_request`
- :meth:`~pymongo.mongo_client.MongoClient.copy_database`
:class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`:
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.auto_start_request`
- :meth:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.start_request`
- :meth:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.in_request`
- :meth:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.end_request`
- :meth:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.copy_database`
:class:`~pymongo.database.Database`:
- :meth:`~pymongo.database.Database.error`
- :meth:`~pymongo.database.Database.last_status`
- :meth:`~pymongo.database.Database.previous_error`
- :meth:`~pymongo.database.Database.reset_error_history`
:class:`~pymongo.master_slave_connection.MasterSlaveConnection`
The JSON format for :class:`~bson.timestamp.Timestamp` has changed from
'{"t": <int>, "i": <int>}' to '{"$timestamp": {"t": <int>, "i": <int>}}'.

View File

@ -587,7 +587,7 @@ class BaseObject(object):
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` to set write
concern.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.9
Deprecated directly setting write_concern.
@ -607,7 +607,7 @@ class BaseObject(object):
:meth:`~pymongo.mongo_client.MongoClient.get_database`,
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` instead.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.1
Deprecated slave_okay.
@ -637,7 +637,7 @@ class BaseObject(object):
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` to set read
preference.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.9
Deprecated directly setting read_preference.
@ -668,8 +668,10 @@ class BaseObject(object):
.. warning:: :attr:`secondary_acceptable_latency_ms` is deprecated in
this version of PyMongo and removed in PyMongo 3. Use the
`localThresholdMS` :class:`~pymongo.mongo_client.MongoClient` option
instead. See :doc:`/migrate-to-pymongo3` for more information.
`localThresholdMS` option with
:class:`~pymongo.mongo_client.MongoClient` or
:class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`
instead. See the :doc:`/migrate-to-pymongo3` for more information.
.. versionchanged:: 2.9
Deprecated secondary_acceptable_latency_ms.
@ -711,7 +713,7 @@ class BaseObject(object):
:meth:`~pymongo.mongo_client.MongoClient.get_database`,
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` instead.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.9
Deprecated tag_sets.
@ -742,7 +744,7 @@ class BaseObject(object):
:meth:`~pymongo.mongo_client.MongoClient.get_database`,
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` instead.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.9
Deprecated uuid_subtype.
@ -771,7 +773,7 @@ class BaseObject(object):
:meth:`~pymongo.mongo_client.MongoClient.get_database`,
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` instead.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.4
Deprecated safe.
@ -822,7 +824,7 @@ class BaseObject(object):
:meth:`~pymongo.mongo_client.MongoClient.get_database`,
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` instead.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.4
Deprecated set_lasterror_options.
@ -850,7 +852,7 @@ class BaseObject(object):
:meth:`~pymongo.mongo_client.MongoClient.get_database`,
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` instead.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.4
Deprecated unset_lasterror_options.

View File

@ -695,7 +695,7 @@ class MongoClient(common.BaseObject):
:meth:`~pymongo.mongo_client.MongoClient.get_database`,
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` instead.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.9
Deprecated document_class.
@ -721,7 +721,7 @@ class MongoClient(common.BaseObject):
@property
def tz_aware(self):
"""Does this client return timezone-aware datetimes?
"""**DEPRECATED** Does this client return timezone-aware datetimes?
.. warning:: :attr:`tz_aware` is deprecated in this version of PyMongo
and removed in PyMongo 3. Use :attr:`codec_options` instead.
@ -1059,7 +1059,7 @@ class MongoClient(common.BaseObject):
self.__ensure_member()
def disconnect(self):
"""**DEPRECATED** Use close() instead.
"""**DEPRECATED** Disconnect from MongoDB.
Disconnecting will close all underlying sockets in the connection
pool. If this instance is used again it will be automatically
@ -1379,7 +1379,7 @@ class MongoClient(common.BaseObject):
.. warning:: :meth:`start_request`, :meth:`in_request`,
and :meth:`end_request` are deprecated, and removed in PyMongo 3.
See :doc:`/migrate-to-pymongo3` for more information.
See the :doc:`/migrate-to-pymongo3` for more information.
.. versionchanged:: 2.8
Deprecated start_request.
@ -1402,7 +1402,7 @@ class MongoClient(common.BaseObject):
.. warning:: :meth:`start_request`, :meth:`in_request`,
and :meth:`end_request` are deprecated in this version of PyMongo and
removed in PyMongo 3. See :doc:`/migrate-to-pymongo3` for more
removed in PyMongo 3. See the :doc:`/migrate-to-pymongo3` for more
information.
.. versionchanged:: 2.8
@ -1429,7 +1429,7 @@ class MongoClient(common.BaseObject):
.. warning:: :meth:`start_request`, :meth:`in_request`,
and :meth:`end_request` are deprecated in this version of PyMongo and
removed in PyMongo 3. See :doc:`/migrate-to-pymongo3` for more
removed in PyMongo 3. See the :doc:`/migrate-to-pymongo3` for more
information.
.. versionchanged:: 2.8

View File

@ -990,7 +990,7 @@ class MongoReplicaSetClient(common.BaseObject):
with :meth:`~pymongo.mongo_client.MongoClient.get_database`,
:meth:`~pymongo.database.Database.get_collection`,
or :meth:`~pymongo.collection.Collection.with_options` instead.
See :doc:`/migrate-to-pymongo3` for examples.
See the :doc:`/migrate-to-pymongo3` for examples.
.. versionchanged:: 2.9
Deprecated document_class.
@ -1015,7 +1015,7 @@ class MongoReplicaSetClient(common.BaseObject):
@property
def tz_aware(self):
"""Does this client return timezone-aware datetimes?
"""**DEPRECATED** Does this client return timezone-aware datetimes?
.. warning:: :attr:`tz_aware` is deprecated in this version of PyMongo
and removed in PyMongo 3. See :attr:`codec_options` instead.
@ -1856,7 +1856,7 @@ class MongoReplicaSetClient(common.BaseObject):
.. warning:: :meth:`start_request`, :meth:`in_request`,
and :meth:`end_request` are deprecated, and removed in PyMongo 3.
See :doc:`/migrate-to-pymongo3` for more information.
See the :doc:`/migrate-to-pymongo3` for more information.
.. versionchanged:: 2.8
Deprecated start_request.
@ -1884,7 +1884,7 @@ class MongoReplicaSetClient(common.BaseObject):
.. warning:: :meth:`start_request`, :meth:`in_request`,
and :meth:`end_request` are deprecated in this version of PyMongo
and removed in PyMongo 3. See :doc:`/migrate-to-pymongo3` for more
and removed in PyMongo 3. See the :doc:`/migrate-to-pymongo3` for more
information.
.. versionchanged:: 2.8
@ -1910,7 +1910,7 @@ class MongoReplicaSetClient(common.BaseObject):
.. warning:: :meth:`start_request`, :meth:`in_request`,
and :meth:`end_request` are deprecated in this version of PyMongo and
removed in PyMongo 3. See :doc:`/migrate-to-pymongo3` for more
removed in PyMongo 3. See the :doc:`/migrate-to-pymongo3` for more
information.
.. versionchanged:: 2.8