Skip to content

Commit 7ac3b9e

Browse files
committed
Include changelog from 2.9
1 parent 101f704 commit 7ac3b9e

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

doc/changelog.rst

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,82 @@ in this release.
494494

495495
.. _PyMongo 3.0 release notes in JIRA: https://jira.mongodb.org/browse/PYTHON/fixforversion/12501
496496

497+
Changes in Version 2.9
498+
----------------------
499+
500+
Version 2.9 provides an upgrade path to PyMongo 3.x. Most of the API changes
501+
from PyMongo 3.0 have been backported in a backward compatible way, allowing
502+
applications to be written against PyMongo >= 2.9, rather then PyMongo 2.x or
503+
PyMongo 3.x. See the :doc:`/migrate-to-pymongo3` for detailed examples.
504+
505+
.. note:: There are a number of new deprecations in this release for features
506+
that were removed in PyMongo 3.0.
507+
508+
:class:`~pymongo.mongo_client.MongoClient`:
509+
- :attr:`~pymongo.mongo_client.MongoClient.host`
510+
- :attr:`~pymongo.mongo_client.MongoClient.port`
511+
- :attr:`~pymongo.mongo_client.MongoClient.use_greenlets`
512+
- :attr:`~pymongo.mongo_client.MongoClient.document_class`
513+
- :attr:`~pymongo.mongo_client.MongoClient.tz_aware`
514+
- :attr:`~pymongo.mongo_client.MongoClient.secondary_acceptable_latency_ms`
515+
- :attr:`~pymongo.mongo_client.MongoClient.tag_sets`
516+
- :attr:`~pymongo.mongo_client.MongoClient.uuid_subtype`
517+
- :meth:`~pymongo.mongo_client.MongoClient.disconnect`
518+
- :meth:`~pymongo.mongo_client.MongoClient.alive`
519+
520+
:class:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient`:
521+
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.use_greenlets`
522+
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.document_class`
523+
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.tz_aware`
524+
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.secondary_acceptable_latency_ms`
525+
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.tag_sets`
526+
- :attr:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.uuid_subtype`
527+
- :meth:`~pymongo.mongo_replica_set_client.MongoReplicaSetClient.alive`
528+
529+
:class:`~pymongo.database.Database`:
530+
- :attr:`~pymongo.database.Database.secondary_acceptable_latency_ms`
531+
- :attr:`~pymongo.database.Database.tag_sets`
532+
- :attr:`~pymongo.database.Database.uuid_subtype`
533+
534+
:class:`~pymongo.collection.Collection`:
535+
- :attr:`~pymongo.collection.Collection.secondary_acceptable_latency_ms`
536+
- :attr:`~pymongo.collection.Collection.tag_sets`
537+
- :attr:`~pymongo.collection.Collection.uuid_subtype`
538+
539+
.. warning::
540+
In previous versions of PyMongo, changing the value of
541+
:attr:`~pymongo.mongo_client.MongoClient.document_class` changed
542+
the behavior of all existing instances of
543+
:class:`~pymongo.collection.Collection`::
544+
545+
>>> coll = client.test.test
546+
>>> coll.find_one()
547+
{u'_id': ObjectId('5579dc7cfba5220cc14d9a18')}
548+
>>> from bson.son import SON
549+
>>> client.document_class = SON
550+
>>> coll.find_one()
551+
SON([(u'_id', ObjectId('5579dc7cfba5220cc14d9a18'))])
552+
553+
The document_class setting is now configurable at the client,
554+
database, collection, and per-operation level. This required breaking
555+
the existing behavior. To change the document class per operation in a
556+
forward compatible way use
557+
:meth:`~pymongo.collection.Collection.with_options`::
558+
559+
>>> coll.find_one()
560+
{u'_id': ObjectId('5579dc7cfba5220cc14d9a18')}
561+
>>> from bson.codec_options import CodecOptions
562+
>>> coll.with_options(CodecOptions(SON)).find_one()
563+
SON([(u'_id', ObjectId('5579dc7cfba5220cc14d9a18'))])
564+
565+
Issues Resolved
566+
...............
567+
568+
See the `PyMongo 2.9 release notes in JIRA`_ for the list of resolved issues
569+
in this release.
570+
571+
.. _PyMongo 2.9 release notes in JIRA: https://jira.mongodb.org/browse/PYTHON/fixforversion/14795
572+
497573
Changes in Version 2.8.1
498574
------------------------
499575

0 commit comments

Comments
 (0)