Repository navigation
PYTHON-6063 Remove PyPy support - #3119
Conversation
|
oops made this branch off of my previous branch hence the first commit not relating to this ticket >.< |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🟡 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.
|
|
||
| - 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. |
There was a problem hiding this comment.
I didn't add it because it looked like we historically don't add ticket numbers to stuff like this
mongo-python-driver/doc/changelog.rst
Line 128 in ed74401
| # 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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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!

PYTHON-6063
Changes in this PR
Test Plan
Checklist
Checklist for Author
Checklist for Reviewer