Skip to content

PYTHON-5713 Allow using OP_MSG exclusively#2799

Merged
sleepyStick merged 18 commits into
mongodb:masterfrom
sleepyStick:PYTHON-5713
Jun 8, 2026
Merged

PYTHON-5713 Allow using OP_MSG exclusively#2799
sleepyStick merged 18 commits into
mongodb:masterfrom
sleepyStick:PYTHON-5713

Conversation

@sleepyStick

Copy link
Copy Markdown
Contributor

PYTHON-5713

Changes in this PR

  • handshake now always uses OP_MSG (and not OP_QUERY)
  • if server max wire version doesn't support OP_MSG, a ConfigurationError is raised

Test Plan

  • updated tests in test_handshake.py
  • added a new test for the ConfigurationError in test_handshake.py

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)?
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s).

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?

@codecov-commenter

codecov-commenter commented May 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.82540% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pymongo/asynchronous/cursor.py 92.30% 0 Missing and 1 partial ⚠️
pymongo/synchronous/cursor.py 92.30% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@sleepyStick sleepyStick marked this pull request as ready for review June 8, 2026 18:50
@sleepyStick sleepyStick requested a review from a team as a code owner June 8, 2026 18:50
@sleepyStick sleepyStick requested a review from sophiayangDB June 8, 2026 18:50

@blink1073 blink1073 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@sleepyStick sleepyStick merged commit e9058e3 into mongodb:master Jun 8, 2026
87 of 89 checks passed
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