We are pleased to announce the 4.18.0 release of PyMongo - MongoDB’s Python Driver.
Changes in 4.18.0
PyMongo 4.18 brings a number of changes including:
- Dropped support for MongoDB 4.2. Added support for MongoDB 9.0.
- Improved performance for MongoDB 9.0’s Intelligent Workload Management (IWM) by only retrying overload errors when expected to not worsen server conditions.
- Added general availability support for Queryable Encryption prefix, suffix, and substring queries against MongoDB 9.0+ (requires libmongocrypt 1.20.0 or later).
- Added
srvAllowedHostsSuffixas a URI option and keyword argument toMongoClient. When connecting viamongodb+srv://, this option overrides the default requirement that SRV-returned hosts share the same parent domain as the seed hostname, allowing hosts under a different domain suffix to be accepted. The suffix must not be a public suffix (per the Public Suffix List). - Improved TLS connection performance by reusing TLS sessions across connections to the same server.
- PyPy support is deprecated and will be removed in a future release.
Unavoidable breaking changes
- Aggregation helpers now raise ConfigurationError when passed an aggregate or pipeline keyword argument. Previously these silently replaced the target namespace and pipeline.
- operation_id is now stable across a logical operation’s retry attempts and no longer equals the per-attempt request_id.
Issues Resolved
See the PyMongo 4.18 release notes in JIRA for the list of resolved issues in this release.