Skip to content

Commit 657b078

Browse files
committed
Update changelog
1 parent 4cce6d4 commit 657b078

File tree

2 files changed

+62
-14
lines changed

2 files changed

+62
-14
lines changed

doc/changelog.rst

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,61 @@ Changes in Version 3.7.0
66

77
Version 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

2565
Unavoidable 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

3577
Issues Resolved
@@ -1394,7 +1436,7 @@ Version 2.5 includes changes to support new features in MongoDB 2.4.
13941436

13951437
Important 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.

doc/examples/authentication.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Python 2, to be used in a MongoDB URI. For example, in Python 3::
2323
>>> MongoClient('mongodb://%s:%s@127.0.0.1' % (username, password))
2424
...
2525

26+
.. _scram_sha_256:
27+
2628
SCRAM-SHA-256 (RFC 7677)
2729
------------------------
2830
.. versionadded:: 3.7
@@ -116,6 +118,8 @@ will be "default_db"::
116118
>>> print(db.name)
117119
'default_db'
118120

121+
.. _mongodb_x509:
122+
119123
MONGODB-X509
120124
------------
121125
.. versionadded:: 2.6
@@ -150,7 +154,7 @@ do not have to specify a database in the URI::
150154
.. versionchanged:: 3.4
151155
When connected to MongoDB >= 3.4 the username is no longer required.
152156

153-
.. _use_kerberos:
157+
.. _gssapi:
154158

155159
GSSAPI (Kerberos)
156160
-----------------
@@ -219,6 +223,8 @@ Two extra ``authMechanismProperties`` are supported on Windows platforms:
219223
.. _pykerberos: https://pypi.python.org/pypi/pykerberos
220224
.. _winkerberos: https://pypi.python.org/pypi/winkerberos/
221225

226+
.. _sasl_plain:
227+
222228
SASL PLAIN (RFC 4616)
223229
---------------------
224230
.. versionadded:: 2.6
@@ -229,7 +235,7 @@ to an LDAP server. Using the PLAIN mechanism is very similar to MONGODB-CR.
229235
These examples use the $external virtual database for LDAP support::
230236

231237
>>> from pymongo import MongoClient
232-
>>> uri = "mongodb://user:password@example.com/?authMechanism=PLAIN&authSource=$external"
238+
>>> uri = "mongodb://user:password@example.com/?authMechanism=PLAIN"
233239
>>> client = MongoClient(uri)
234240
>>>
235241

@@ -239,7 +245,7 @@ the SASL PLAIN mechanism::
239245

240246
>>> import ssl
241247
>>> from pymongo import MongoClient
242-
>>> uri = "mongodb://user:password@example.com/?authMechanism=PLAIN&authSource=$external"
248+
>>> uri = "mongodb://user:password@example.com/?authMechanism=PLAIN"
243249
>>> client = MongoClient(uri,
244250
... ssl=True,
245251
... ssl_certfile='/path/to/client.pem',

0 commit comments

Comments
 (0)