Sourced from pymongo's changelog.
Changes in Version 4.16.0 (2026/01/07)
PyMongo 4.16 brings a number of changes including:
- Removed invalid documents from :class:
bson.errors.InvalidDocumenterror messages as doing so may leak sensitive user data. Instead, invalid documents are stored in :attr:bson.errors.InvalidDocument.document.- PyMongo now requires
dnspython>=2.6.1, sincednspython1.0 is no longer maintained. The minimum version is2.6.1to account forCVE-2023-29483 <https://www.cve.org/CVERecord?id=CVE-2023-29483>_.- Removed support for Eventlet. Eventlet is actively being sunset by its maintainers and has compatibility issues with PyMongo's dnspython dependency.
- Use Zstandard support from the standard library for Python 3.14+, and use
backports.zstdfor older versions.- Fixed return type annotation for
find_one_and_*methods on :class:~pymongo.asynchronous.collection.AsyncCollectionand :class:~pymongo.synchronous.collection.Collectionto includeNone.- Added support for NumPy 1D-arrays in :class:
bson.binary.BinaryVector.- Prevented :class:
~pymongo.encryption.ClientEncryptionfrom loading the crypt shared library to fix "MongoCryptError: An existing crypt_shared library is loaded by the application" unless the linked library search path is set.Changes in Version 4.15.5 (2025/12/02)
Version 4.15.5 is a bug fix release.
- Fixed a bug that could cause
AutoReconnect("connection pool paused")errors when cursors fetched more documents from the database after SDAM heartbeat failures.Changes in Version 4.15.4 (2025/10/21)
Version 4.15.4 is a bug fix release.
- Relaxed the callback type of :meth:
~pymongo.asynchronous.client_session.AsyncClientSession.with_transactionto allow the broader Awaitable type rather than only Coroutine objects.- Added the missing Python 3.14 trove classifier to the package metadata.
Issues Resolved ...............
See the
PyMongo 4.15.4 release notes in JIRA_ for the list of resolved issues in this release... _PyMongo 4.15.4 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=47237
Changes in Version 4.15.3 (2025/10/07)
Version 4.15.3 is a bug fix release.
- Fixed a memory leak when raising :class:
bson.errors.InvalidDocumentwith C extensions.- Fixed the return type of the :meth:
~pymongo.asynchronous.collection.AsyncCollection.distinct,
... (truncated)
3290101
Prepare 4.16.0 release (#2672)1be94d2
PYTHON-5685 Fix unified spec sync metadata for csot and sessions tests
(#2669)6585d9c
PYTHON-2442: Refactor: use _asdict() in _options_dict() (#2670)fdb1f7e
PYTHON-5677 Prevent ClientEncryption from loading crypt shared library
(#2659)0cd9763
Bump zizmorcore/zizmor-action from
cb3d8e846e148d1111d90b03375b9c03deceda37 t...2f263d4
PYTHON-5680 Fix handling of expectedDocuments in Unified Test Runner (#2665)e9658b2
Add 4.15.5 release date to changelog (#2666)10dd204
Update coverage[toml] requirement from <=7.10.6,>=5 to
>=5,<=7.10.7 (#2662)1300677
[Spec Resync] 12-22-2025 (#2663)18c1f14
PYTHON-5529 Introduce optin setting to await for MinPoolSize population
(#2664)