Skip to content

PYTHON-6009 Remove deprecated Algorithm.RANGEPREVIEW and QueryType.RANGEPREVIEW in PyMongo 4.19.0 - #3121

Merged
blink1073 merged 2 commits into
mongodb:mainfrom
blink1073:PYTHON-6009
Oct 14, 2026
Merged

blink1073 merged 2 commits into
mongodb:mainfrom
blink1073:PYTHON-6009

Conversation

@blink1073

@blink1073 blink1073 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

PYTHON-6009

Changes in this PR

PyMongo deprecated the RANGEPREVIEW members of the encryption Algorithm and QueryType enums in 4.9, when RANGE became generally available. This PR removes them for the 4.19.0 release.

  • Removed the deprecated Algorithm.RANGEPREVIEW and QueryType.RANGEPREVIEW members.
  • Documented the removal in the 4.19.0 changelog.

Test Plan

  • Verified on both the synchronous and asynchronous code paths that the members are gone and every other enum member is unchanged.
  • Ran just typing and just lint-manual; both pass.
  • Added no new tests: nothing in the test suite references the removed members, so the verification above covers the removal.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)?
  • Is there test coverage? No new tests; see Test Plan.
  • Is any followup work tracked in a JIRA ticket? If so, add link(s). N/A

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

@blink1073
blink1073 marked this pull request as ready for review October 14, 2026 17:48
@blink1073
blink1073 requested a review from a team as a code owner October 14, 2026 17:48
@blink1073
blink1073 requested review from NoahStapp and a balanced review from Copilot October 14, 2026 17:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused API removal is complete, documented, and leaves no active references.

0 open findings

What changed in this PR

Removes obsolete RangePreview encryption enum members for PyMongo 4.19.

Changes:

  • Removed RANGEPREVIEW from Algorithm and QueryType.
  • Documented the removal in the changelog.
File Description
pymongo/​encryption_shared.py Removes the deprecated enum members.
doc/​changelog.rst Records the removal and links PYTHON-6009.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

NoahStapp
NoahStapp previously approved these changes Oct 14, 2026
@blink1073

Copy link
Copy Markdown
Member Author

@NoahStapp I had a merge conflict in the changelog

@blink1073
blink1073 requested a review from NoahStapp October 14, 2026 18:26
@blink1073
blink1073 merged commit b5a7f26 into mongodb:main Oct 14, 2026
36 of 37 checks passed
@blink1073
blink1073 deleted the PYTHON-6009 branch October 14, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants