From e2107c22dd18d65dceb24f22541d59f0dad2c732 Mon Sep 17 00:00:00 2001 From: "mongodb-dbx-release-bot[bot]" <167856002+mongodb-dbx-release-bot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 17:31:27 +0000 Subject: [PATCH 1/3] Prep branch v4.15 Signed-off-by: mongodb-dbx-release-bot[bot] <167856002+mongodb-dbx-release-bot[bot]@users.noreply.github.com> --- .github/workflows/release-python.yml | 2 +- pymongo/_version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 9cce310d91..cbb2322fe8 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -16,7 +16,7 @@ env: # Changes per repo PRODUCT_NAME: PyMongo # Changes per branch - EVERGREEN_PROJECT: mongo-python-driver + EVERGREEN_PROJECT: mongo-python-driver-release # Constant # inputs will be empty on a scheduled run. so, we only set dry_run # to 'false' when the input is set to 'false'. diff --git a/pymongo/_version.py b/pymongo/_version.py index c6ba82ab13..88ad5e2056 100644 --- a/pymongo/_version.py +++ b/pymongo/_version.py @@ -18,7 +18,7 @@ import re from typing import List, Tuple, Union -__version__ = "4.16.0.dev0" +__version__ = "4.15.1.dev0" def get_version_tuple(version: str) -> Tuple[Union[int, str], ...]: From bc4ee39aac5b013cf1b392c4cb76639517d8e218 Mon Sep 17 00:00:00 2001 From: "mongodb-dbx-release-bot[bot]" <167856002+mongodb-dbx-release-bot[bot]@users.noreply.github.com> Date: Thu, 11 Sep 2025 05:32:34 -0500 Subject: [PATCH 2/3] PYTHON-5540 Fix usage of text_opts for older versions of pymongocrypt (#2525) [v4.15] (#2526) Co-authored-by: Steven Silvester --- pymongo/asynchronous/encryption.py | 3 ++- pymongo/synchronous/encryption.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pymongo/asynchronous/encryption.py b/pymongo/asynchronous/encryption.py index b302631108..662f2abd5b 100644 --- a/pymongo/asynchronous/encryption.py +++ b/pymongo/asynchronous/encryption.py @@ -935,7 +935,8 @@ async def _encrypt_helper( contention_factor=contention_factor, range_opts=range_opts_bytes, is_expression=is_expression, - text_opts=text_opts_bytes, + # For compatibility with pymongocrypt < 1.16: + **{"text_opts": text_opts_bytes} if text_opts_bytes else {}, ) return decode(encrypted_doc)["v"] diff --git a/pymongo/synchronous/encryption.py b/pymongo/synchronous/encryption.py index 752026af84..518a16ff2d 100644 --- a/pymongo/synchronous/encryption.py +++ b/pymongo/synchronous/encryption.py @@ -928,7 +928,8 @@ def _encrypt_helper( contention_factor=contention_factor, range_opts=range_opts_bytes, is_expression=is_expression, - text_opts=text_opts_bytes, + # For compatibility with pymongocrypt < 1.16: + **{"text_opts": text_opts_bytes} if text_opts_bytes else {}, ) return decode(encrypted_doc)["v"] From ebe8bfb564c3c6f42d108ab1b4012a2bf38a7cd0 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 11 Sep 2025 15:41:31 -0500 Subject: [PATCH 3/3] PYTHON-5542 Prepare for 4.15.1 Release (#2527) --- doc/changelog.rst | 18 ++++++++++++++++++ pymongo/_version.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index 64c61e5877..cf84843eb7 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,6 +1,24 @@ Changelog ========= +Changes in Version 4.15.1 (2025/09/11) +-------------------------------------- + +Version 4.15.1 is a bug fix release. + + - Fixed a bug in :meth:`~pymongo.synchronous.encryption.ClientEncryption.encrypt` and :meth:`~pymongo.asynchronous.encryption.AsyncClientEncryption.encrypt` + that would cause a ``TypeError`` when using ``pymongocrypt<1.16`` by passing an unsupported ``type_opts`` parameter even if + Queryable Encryption text queries beta was not used. + +Issues Resolved +............... + +See the `PyMongo 4.15.1 release notes in JIRA`_ for the list of resolved issues +in this release. + +.. _PyMongo 4.15.1 release notes in JIRA: https://jira.mongodb.org/secure/ReleaseNote.jspa?projectId=10004&version=46486 + + Changes in Version 4.15.0 (2025/09/10) -------------------------------------- diff --git a/pymongo/_version.py b/pymongo/_version.py index 88ad5e2056..7abecf4416 100644 --- a/pymongo/_version.py +++ b/pymongo/_version.py @@ -18,7 +18,7 @@ import re from typing import List, Tuple, Union -__version__ = "4.15.1.dev0" +__version__ = "4.15.1" def get_version_tuple(version: str) -> Tuple[Union[int, str], ...]: