From 59f1d529f703cf95dc10d3a162cc8f8c290d6ac2 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 14 Oct 2026 13:21:13 +0000 Subject: [PATCH] PYTHON-6009 Remove deprecated Algorithm.RANGEPREVIEW and QueryType.RANGEPREVIEW --- doc/changelog.rst | 3 +++ pymongo/encryption_shared.py | 15 --------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/doc/changelog.rst b/doc/changelog.rst index cea0a44699..5fc4a9a99e 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -11,6 +11,8 @@ PyMongo 4.19 brings a number of changes including: - Added support for Python 3.15. - Dropped support for Python 3.9 and 3.10 and PyPy 3.9 and 3.10 (PYTHON-6138). +- Removed the deprecated ``Algorithm.RANGEPREVIEW`` and + ``QueryType.RANGEPREVIEW`` members (`PYTHON-6009`_). - Added support for running the synchronous and asynchronous clients in subinterpreters, including inside ``concurrent.futures.InterpreterPoolExecutor`` (Python 3.14+). Only in @@ -77,6 +79,7 @@ Bug fixes .. _PYTHON-6040: https://jira.mongodb.org/browse/PYTHON-6040 .. _PYTHON-6111: https://jira.mongodb.org/browse/PYTHON-6111 .. _PYTHON-6163: https://jira.mongodb.org/browse/PYTHON-6163 +.. _PYTHON-6009: https://jira.mongodb.org/browse/PYTHON-6009 Changes in Version 4.18.2 (2026/09/24) -------------------------------------- diff --git a/pymongo/encryption_shared.py b/pymongo/encryption_shared.py index 744da825c7..08c65510d0 100644 --- a/pymongo/encryption_shared.py +++ b/pymongo/encryption_shared.py @@ -90,13 +90,6 @@ class Algorithm(str, enum.Enum): .. versionadded:: 4.9 """ - RANGEPREVIEW = "RangePreview" - """**DEPRECATED** - RangePreview. - - .. note:: Support for RangePreview is deprecated. Use :attr:`Algorithm.RANGE` instead. - - .. versionadded:: 4.4 - """ STRING = "String" """String. @@ -126,14 +119,6 @@ class QueryType(str, enum.Enum): .. versionadded:: 4.9 """ - RANGEPREVIEW = "RangePreview" - """**DEPRECATED** - Used to encrypt a value for a rangePreview query. - - .. note:: Support for RangePreview is deprecated. Use :attr:`QueryType.RANGE` instead. - - .. versionadded:: 4.4 - """ - PREFIX = "prefix" """Used to encrypt a value for a prefix query.