Skip to content

PYTHON-6175 Skip subinterpreter tests on gevent - #3157

Merged
NoahStapp merged 2 commits into
mongodb:mainfrom
NoahStapp:PYTHON-6175
Oct 28, 2026
Merged

NoahStapp merged 2 commits into
mongodb:mainfrom
NoahStapp:PYTHON-6175

Conversation

@NoahStapp

Copy link
Copy Markdown
Contributor

PYTHON-6175

Changes in this PR

Skip subinterpreter tests on gevent. Gevent does not support Python subinterpreters.

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?

@NoahStapp
NoahStapp requested a review from a team as a code owner October 28, 2026 15:59
@NoahStapp
NoahStapp requested review from WaVEV and a balanced review from Copilot October 28, 2026 15:59

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

No active review issues are reported for the gevent-related subinterpreter test skips.

No open issues 🎉

What changed in this PR

This PR updates PyMongo’s test suite to skip subinterpreter tests when gevent monkey-patching is active, avoiding hangs caused by gevent’s lack of subinterpreter support.

Changes:

  • Add a gevent detection helper and conditional skip to the asynchronous test and its synchronous counterpart.
  • Include a skip message explaining why greenlet-based execution would block the test.
File Description
test/​test_subinterpreters.py Adds the gevent skip to the synchronous subinterpreter test.
test/​asynchronous/​test_subinterpreters.py Adds the gevent skip to the asynchronous source test.

Review effort: Balanced

@NoahStapp
NoahStapp requested review from sleepyStick and removed request for WaVEV October 28, 2026 18:42
@NoahStapp
NoahStapp merged commit 05bbce0 into mongodb:main Oct 28, 2026
80 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