@@ -13,19 +13,45 @@ PyMongo 4.2 brings a number of improvements including:
1313 changes may be made before the final release. See :ref: `automatic-queryable-client-side-encryption ` for example usage.
1414- Provisional (beta) support for :func: `pymongo.timeout ` to apply a single timeout
1515 to an entire block of pymongo operations.
16+ - Added the ``timeoutMS `` URI and keyword argument to :class: `~pymongo.mongo_client.MongoClient `.
1617- Added the :attr: `pymongo.errors.PyMongoError.timeout ` property which is ``True `` when
1718 the error was caused by a timeout.
18- - Added ``check_exists `` option to :meth: `~pymongo.database.Database.create_collection `
19+ - Added the ``check_exists `` argument to :meth: `~pymongo.database.Database.create_collection `
1920 that when True (the default) runs an additional ``listCollections `` command to verify that the
2021 collection does not exist already.
22+ - Added the following key management APIs to :class: `~pymongo.encryption.ClientEncryption `:
23+
24+ - :meth: `~pymongo.encryption.ClientEncryption.get_key `
25+ - :meth: `~pymongo.encryption.ClientEncryption.get_keys `
26+ - :meth: `~pymongo.encryption.ClientEncryption.delete_key `
27+ - :meth: `~pymongo.encryption.ClientEncryption.add_key_alt_name `
28+ - :meth: `~pymongo.encryption.ClientEncryption.get_key_by_alt_name `
29+ - :meth: `~pymongo.encryption.ClientEncryption.remove_key_alt_name `
30+ - :meth: `~pymongo.encryption.ClientEncryption.rewrap_many_data_key `
31+ - :class: `~pymongo.encryption.RewrapManyDataKeyResult `
32+
33+ - Support for the ``crypt_shared `` library to replace ``mongocryptd `` using the new
34+ ``crypt_shared_lib_path `` and ``crypt_shared_lib_required `` arguments to
35+ :class: `~pymongo.encryption_options.AutoEncryptionOpts `.
2136
2237Bug fixes
2338.........
2439
2540- Fixed a bug where :meth: `~pymongo.collection.Collection.estimated_document_count `
2641 would fail with a "CommandNotSupportedOnView" error on views (`PYTHON-2885 `_).
2742- Fixed a bug where invalid UTF-8 strings could be passed as patterns for :class: `~bson.regex.Regex `
28- objects (`PYTHON-3048 `_). :func: `bson.encode ` now correctly raises :class: `bson.errors.InvalidStringData `.
43+ objects. :func: `bson.encode ` now correctly raises :class: `bson.errors.InvalidStringData ` (`PYTHON-3048 `_).
44+ - Fixed a bug that caused ``AutoReconnect("connection pool paused") `` errors in the child
45+ process after fork (`PYTHON-3257 `_).
46+ - Fixed a bug where :meth: `~pymongo.collection.Collection.count_documents ` and
47+ :meth: `~pymongo.collection.Collection.distinct ` would fail in a transaction with
48+ ``directConnection=True `` (`PYTHON-3333 `_).
49+ - GridFS no longer uploads an incomplete files collection document after encountering an
50+ error in the middle of an upload fork. This results in fewer
51+ :class: `~gridfs.errors.CorruptGridFile ` errors (`PYTHON-1552 `_).
52+ - Renamed PyMongo's internal C extension methods to avoid crashing due to name conflicts
53+ with mpi4py and other shared libraries (`PYTHON-2110 `_).
54+ - Fixed tight CPU loop for network I/O when using PyOpenSSL (`PYTHON-3187 `_).
2955
3056Unavoidable breaking changes
3157............................
@@ -38,6 +64,11 @@ Unavoidable breaking changes
3864 Users of the Stable API with estimated_document_count are recommended to upgrade
3965 their server version to 5.0.9+ or set :attr: `pymongo.server_api.ServerApi.strict `
4066 to ``False `` to avoid encountering errors (`PYTHON-3167 `_).
67+ - Removed generic typing from :class: `~pymongo.client_session.ClientSession ` to improve
68+ support for Pyright (`PYTHON-3283 `_).
69+ - Added ``__all__ `` to the bson, pymongo, and gridfs packages. This could be a breaking
70+ change for apps that relied on ``from bson import * `` to import APIs not present in
71+ ``__all__ `` (`PYTHON-3311 `_).
4172
4273.. _count : https://mongodb.com/docs/manual/reference/command/count/
4374
@@ -50,6 +81,13 @@ in this release.
5081.. _PYTHON-3048 : https://jira.mongodb.org/browse/PYTHON-3048
5182.. _PYTHON-2885 : https://jira.mongodb.org/browse/PYTHON-2885
5283.. _PYTHON-3167 : https://jira.mongodb.org/browse/PYTHON-3167
84+ .. _PYTHON-3257 : https://jira.mongodb.org/browse/PYTHON-3257
85+ .. _PYTHON-3333 : https://jira.mongodb.org/browse/PYTHON-3333
86+ .. _PYTHON-1552 : https://jira.mongodb.org/browse/PYTHON-1552
87+ .. _PYTHON-2110 : https://jira.mongodb.org/browse/PYTHON-2110
88+ .. _PYTHON-3283 : https://jira.mongodb.org/browse/PYTHON-3283
89+ .. _PYTHON-3311 : https://jira.mongodb.org/browse/PYTHON-3311
90+ .. _PYTHON-3187 : https://jira.mongodb.org/browse/PYTHON-3187
5391.. _PyMongo 4.2 release notes in JIRA : https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=33196
5492.. _Queryable Encryption : automatic-queryable-client-side-encryption
5593
0 commit comments