Skip to content

PYTHON-6063 Remove PyPy support - #3119

Merged
sleepyStick merged 6 commits into
mongodb:mainfrom
sleepyStick:PYTHON-6063
Oct 14, 2026
Merged

sleepyStick merged 6 commits into
mongodb:mainfrom
sleepyStick:PYTHON-6063

Conversation

@sleepyStick

Copy link
Copy Markdown
Contributor

PYTHON-6063

Changes in this PR

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?

@sleepyStick

Copy link
Copy Markdown
Contributor Author

oops made this branch off of my previous branch hence the first commit not relating to this ticket >.<

@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sleepyStick
sleepyStick marked this pull request as ready for review October 14, 2026 02:01
@sleepyStick
sleepyStick requested a review from a team as a code owner October 14, 2026 02:01
@sleepyStick
sleepyStick requested review from aclark4life and a balanced review from Copilot October 14, 2026 02:01

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.

🟡 Changes recommended

Removing the last @flaky use leaves an unused import that will fail linting.

1 open finding
What changed in this PR

Removes PyPy support across packaging, runtime accommodations, tests, documentation, and Evergreen CI.

Changes:

  • Declares CPython 3.11+ as the supported interpreter range.
  • Removes PyPy-specific workarounds and test skips.
  • Removes PyPy CI tasks and regenerates Evergreen configuration.
File Description
README.md Documents CPython-only support.
CONTRIBUTING.md Updates interpreter and CI guidance.
pyproject.toml Removes the PyPy classifier.
_setup.py Enables extension builds except on GraalPy.
doc/​changelog.rst Announces removal of PyPy support.
bson/​codec_options.py Generalizes implementation-specific commentary.
pymongo/​common.py Generalizes implementation-specific commentary.
pymongo/​network_layer.py Removes PyPy socket handling.
pymongo/​pool_options.py Removes PyPy-specific metadata formatting.
pymongo/​asynchronous/​pool.py Updates race-condition commentary.
pymongo/​synchronous/​pool.py Mirrors pool commentary update.
.evergreen/​scripts/​setup-uv-python.sh Removes PyPy examples.
.evergreen/​scripts/​setup_tests.py Enables coverage without implementation filtering.
.evergreen/​scripts/​generate_config.py Removes PyPy task generation and filtering.
.evergreen/​scripts/​generate_config_utils.py Removes PyPy interpreter definitions.
.evergreen/​generated_configs/​variants.yml Regenerates CPython-only variants.
.evergreen/​generated_configs/​tasks.yml Regenerates CPython-only tasks.
test/​helpers_shared.py Removes obsolete PyPy commentary.
test/​unified_format.py Removes PyPy-specific CSOT skips.
test/​test_client.py Removes PyPy skips and GC workaround.
test/​test_collection.py Removes obsolete GC commentary.
test/​test_compression_support.py Assumes tracemalloc availability.
test/​test_discovery_and_monitoring.py Removes PyPy flakiness marking.
test/​test_load_balancer.py Simplifies explicit collection.
test/​test_logger.py Generalizes cleanup commentary.
test/​test_monitor.py Removes a PyPy skip.
test/​test_network_layer.py Updates Windows-specific commentary.
test/​test_session.py Enforces session pooling on supported interpreters.
test/​test_ssl.py Removes PyPy SSL skips.
test/​test_streaming_protocol.py Uses the standard heartbeat timeout.
test/​test_transactions.py Removes a PyPy TLS skip.
test/​asynchronous/​unified_format.py Removes async PyPy CSOT skips.
test/​asynchronous/​test_async_network_layer.py Updates Windows-specific commentary.
test/​asynchronous/​test_client.py Removes async PyPy skips and workaround.
test/​asynchronous/​test_collection.py Removes obsolete GC commentary.
test/​asynchronous/​test_discovery_and_monitoring.py Removes PyPy flakiness marking.
test/​asynchronous/​test_load_balancer.py Simplifies explicit collection.
test/​asynchronous/​test_logger.py Generalizes cleanup commentary.
test/​asynchronous/​test_monitor.py Removes a PyPy skip.
test/​asynchronous/​test_session.py Enforces session pooling on supported interpreters.
test/​asynchronous/​test_ssl.py Removes async PyPy SSL skips.
test/​asynchronous/​test_streaming_protocol.py Uses the standard heartbeat timeout.
test/​asynchronous/​test_transactions.py Removes an async PyPy TLS skip.

🧠 Review effort: Balanced


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

Comment thread test/asynchronous/test_discovery_and_monitoring.py
Comment thread doc/changelog.rst

- Added support for Python 3.15.
- Dropped support for Python 3.9 and 3.10 and PyPy 3.9 and 3.10 (PYTHON-6138).
- Dropped support for Python 3.9 and 3.10.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't add it because it looked like we historically don't add ticket numbers to stuff like this

- Dropped support for MongoDB 4.2.
for example

Comment thread bson/codec_options.py Outdated
# raises TypeError or just returns False for such aliases is inconsistent
# across Python implementations (e.g. PyPy vs CPython), so check the
# origin proactively instead of relying on catching the error.
# across Python versions, so check the origin proactively instead of

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.

versions != implementations (3.14/3.15 vs CPython/PyPy). Probably still true if we say "across Python implementations" though the implementation we were referring to was PyPy.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i'm aware that versions != implementations,, i wanted to remove/rework anything relating to PyPy (including this comment)
I've changed the comment to be more clear and up-to-date in d7432d2 lmk what you think!

@sleepyStick
sleepyStick merged commit a740cdf into mongodb:main Oct 14, 2026
86 of 88 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