Skip to content

PYTHON-5974 - Fix Python 3.12 check for overload test bounds - #2978

Merged
NoahStapp merged 5 commits into
mongodb:mainfrom
NoahStapp:PYTHON-5974
Aug 5, 2026
Merged

PYTHON-5974 - Fix Python 3.12 check for overload test bounds#2978
NoahStapp merged 5 commits into
mongodb:mainfrom
NoahStapp:PYTHON-5974

Conversation

@NoahStapp

Copy link
Copy Markdown
Contributor

PYTHON-5974

Changes in this PR

Fix the <= 3.12 check in the test.

Test Plan

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?

Copilot AI review requested due to automatic review settings August 5, 2026 18:52
@NoahStapp
NoahStapp requested a review from a team as a code owner August 5, 2026 18:52
@NoahStapp
NoahStapp requested review from blink1073 and sleepyStick and removed request for sleepyStick August 5, 2026 18:52

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.

Pull request overview

Fixes a Python version guard in the client backpressure overload timing test so that the “Windows + Python 3.12.x” slack logic correctly applies to all 3.12 micro versions (not just 3.12.0), aligning the test’s bounds with intended behavior across supported runtimes.

Changes:

  • Update the version comparison from sys.version_info <= (3, 12) (which excludes 3.12.1+) to sys.version_info < (3, 13) in the overload timing bound logic.
  • Apply the same fix to both the asynchronous and generated synchronous variants of the test.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/test_client_backpressure.py Fix Windows/Python version bound check so 3.12.x is handled correctly in timing slack logic.
test/asynchronous/test_client_backpressure.py Same fix in the async source test to ensure consistent behavior for asyncio timing resolution on 3.12.x.

@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

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@NoahStapp
NoahStapp merged commit d03d621 into mongodb:main Aug 5, 2026
85 of 86 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