@@ -6,21 +6,61 @@ Changes in Version 3.7.0
66
77Version 3.7 adds support for MongoDB 4.0. Highlights include:
88
9- - Support for multi-document transactions, see :ref: `transactions-ref `.
10- - Support for the SCRAM-SHA-256 authentication mechanism.
9+ - Support for single replica set multi-document ACID transactions.
10+ See :ref: `transactions-ref `.
11+ - Support for wire protocol compression. See the
12+ :meth: `~pymongo.mongo_client.MongoClient ` documentation for details.
1113- Support for Python 3.7.
12- - Support for wire protocol compression. See
13- :meth: `~pymongo.mongo_client.MongoClient ` for details.
14- - MD5 is now optional in GridFS.
15- - If not specified, the authSource for the PLAIN authentication mechanism
16- defaults to $external.
14+ - New count methods, :meth: `~pymongo.collection.Collection.count_documents `
15+ and :meth: `~pymongo.collection.Collection.estimated_document_count `.
16+ :meth: `~pymongo.collection.Collection.count_documents ` is always
17+ accurate when used with MongoDB 3.6+, or when used with older standalone
18+ or replica set deployments. With older sharded clusters is it always
19+ accurate when used with Primary read preference. It can also be used in
20+ a transaction, unlike the now deprecated
21+ :meth: `pymongo.collection.Collection.count ` and
22+ :meth: `pymongo.cursor.Cursor.count ` methods.
23+ - Better support for using PyMongo in a FIPS 140-2 environment. Specifically,
24+ the following features and changes allow PyMongo to function when MD5 support
25+ is disabled in OpenSSL by the FIPS Object Module:
26+
27+ - Support for the :ref: `SCRAM-SHA-256 <scram_sha_256 >`
28+ authentication mechanism. The :ref: `GSSAPI <gssapi >`,
29+ :ref: `PLAIN <sasl_plain >`, and :ref: `MONGODB-X509 <mongodb_x509 >`
30+ mechanisms can also be used to avoid issues with OpenSSL in FIPS
31+ environments.
32+ - MD5 checksums are now optional in GridFS. See the `disable_md5 ` option
33+ of :class: `~gridfs.GridFS ` and :class: `~gridfs.GridFSBucket `.
34+ - :class: `~bson.objectid.ObjectId ` machine bytes are now hashed using
35+ `FNV-1a
36+ <https://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function> `_
37+ instead of MD5.
38+
39+ - The :meth: `~pymongo.database.Database.list_collection_names ` and
40+ :meth: `~pymongo.database.Database.collection_names ` methods use
41+ the nameOnly option when supported by MongoDB.
42+ - SCRAM client and server keys are cached for improved performance, following
43+ `RFC 5802 <https://tools.ietf.org/html/rfc5802 >`_.
44+ - If not specified, the authSource for the :ref: `PLAIN <sasl_plain >`
45+ authentication mechanism defaults to $external.
1746- wtimeoutMS is once again supported as a URI option.
18- - Deprecate the snapshot option of :meth: `~pymongo.collection.Collection.find `
47+
48+ Deprecations:
49+
50+ - Deprecated :meth: `pymongo.collection.Collection.count ` and
51+ :meth: `pymongo.cursor.Cursor.count `. These two methods use the `count `
52+ command and `may or may not be accurate
53+ <https://docs.mongodb.com/manual/reference/command/count/#behavior> `_,
54+ depending on the options used and connected MongoDB topology. Use
55+ :meth: `~pymongo.collection.Collection.count_documents ` instead.
56+ - Deprecated the snapshot option of :meth: `~pymongo.collection.Collection.find `
1957 and :meth: `~pymongo.collection.Collection.find_one `. The option was
2058 deprecated in MongoDB 3.6 and removed in MongoDB 4.0.
21- - Deprecate the max_scan option of :meth: `~pymongo.collection.Collection.find `
59+ - Deprecated the max_scan option of :meth: `~pymongo.collection.Collection.find `
2260 and :meth: `~pymongo.collection.Collection.find_one `. The option was
23- deprecated in MongoDB 4.0.
61+ deprecated in MongoDB 4.0. Use `maxTimeMS ` instead.
62+ - Deprecated :meth: `~pymongo.mongo_client.MongoClient.close_cursor `. Use
63+ :meth: `~pymongo.cursor.Cursor.close ` instead.
2464
2565Unavoidable breaking changes:
2666
@@ -30,6 +70,8 @@ Unavoidable breaking changes:
3070 PrimarySteppedDown, ShutdownInProgress respectively) now always raise
3171 :class: `~pymongo.errors.NotMasterError ` instead of
3272 :class: `~pymongo.errors.OperationFailure `.
73+ - :meth: `~pymongo.collection.Collection.parallel_scan ` no longer uses an
74+ implicit session. Explicit sessions are still supported.
3375
3476
3577Issues Resolved
@@ -1394,7 +1436,7 @@ Version 2.5 includes changes to support new features in MongoDB 2.4.
13941436
13951437Important new features:
13961438
1397- - Support for :ref: `GSSAPI (Kerberos) authentication <use_kerberos >`.
1439+ - Support for :ref: `GSSAPI (Kerberos) authentication <gssapi >`.
13981440- Support for SSL certificate validation with hostname matching.
13991441- Support for delegated and role based authentication.
14001442- New GEOSPHERE (2dsphere) and HASHED index constants.
0 commit comments