Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
NoahStapp
marked this pull request as ready for review
September 16, 2026 18:12
NoahStapp
requested review from
blink1073 and
sleepyStick
and
a lite review from Copilot
and removed request for
blink1073
September 16, 2026 18:12
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The refactor spans shared, synchronous, and asynchronous cursor behavior and warrants final human review.
Pull request overview
Consolidates shared non-I/O cursor behavior into _AgnosticCursor, reducing duplication between synchronous and asynchronous implementations.
Changes:
- Centralizes cursor configuration, cloning, validation, and utility methods.
- Updates synchronous and asynchronous cursors to use shared behavior.
- Centralizes session handling in the agnostic base.
File summaries
| File | Description |
|---|---|
pymongo/synchronous/cursor.py |
Uses shared cursor logic. |
pymongo/synchronous/cursor_base.py |
Delegates session handling to the shared base. |
pymongo/cursor_shared.py |
Adds the shared cursor implementation. |
pymongo/asynchronous/cursor.py |
Uses shared cursor logic. |
pymongo/asynchronous/cursor_base.py |
Delegates session handling to the shared base. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
blink1073
reviewed
Sep 16, 2026
| async for doc in collection.find(): | ||
| print(doc) | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
Nit, this extra line should be removed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…gnosticCursor
PYTHON-6022
Changes in this PR
See ticket.
Test Plan
Existing tests.
Checklist
Checklist for Author
[ ] Did you update the changelog (if necessary)?[ ] Is any followup work tracked in a JIRA ticket? If so, add link(s).Checklist for Reviewer