Repository navigation
Drop support for Python 3.10 - #1061
Conversation
Python 3.10 reached its end of life on 2026-10-01. Require Python 3.11
or newer: drop the 3.10 classifier and CI job, target py311 in ruff,
and install pyreqwest in the tests extra without its now always-true
python_version >= '3.11' marker. setup.cfg, which mirrors
pyproject.toml, gets the same changes.
Nothing in vcr/ or tests/ was specific to Python 3.10. With the new
target, ruff's UP042 wants RecordMode to subclass enum.StrEnum rather
than (str, Enum). Silence it instead: StrEnum would make str() and
format() of a member return its value ("once") instead of
"RecordMode.ONCE", which users of vcr.mode could notice.
Also update the docs: the installation page still said Python 3.9+,
and the contributing guide had contributors install PyPy 3.10, which
can no longer install vcrpy.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
|
@kevin1024 @cclauss Friendly ping: could this be merged, or is anything still needed from my side? Thanks! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1061 +/- ##
==========================================
+ Coverage 92.45% 93.29% +0.83%
==========================================
Files 27 27
Lines 1988 2087 +99
Branches 254 267 +13
==========================================
+ Hits 1838 1947 +109
+ Misses 99 90 -9
+ Partials 51 50 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Move the changelog entry under Unreleased: 8.4.0 is out without it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
|
@kevin1024 The red |
|
Thanks @pylaterreur! Dropping a Python version means a major version bump for us, so I'm holding this for 9.0.0 along with the other breaking changes (#925, #1004). 8.5.0 goes out first with the current fixes and 3.14/3.15 support. Agree on keeping |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN
# Conflicts: # docs/changelog.rst
Python 3.10 reached its end of life on 2026-10-01. This drops it, as #953 did for 3.9.
pyproject.toml:requires-python = ">=3.11", drop the 3.10 classifier, and set ruff'starget-versiontopy311. Thetestsextra listspyreqwestwithout itspython_version >= '3.11'marker, which is now always true.3.10from the test matrix.vcr/record_mode.py: with the py311 target, ruff's UP042 suggests makingRecordMode(str, Enum)aStrEnum. I silenced it instead:StrEnumwould changestr()andformat()of the members, e.g.f"{vcr.mode.ONCE}"would giveonceinstead ofRecordMode.ONCE.repr(), equality with strings, hashing and pickling are the same either way. I can switch toStrEnumif you prefer.pypy3.10(nowpypy3.11).Nothing in
vcr/ortests/was specific to 3.10.Tests. I ran the workflow's steps locally on GitHub's CPython 3.11.17 and 3.13.16 builds, with the offline step in a network namespace, and ran master the same way on 3.11.17:
tests, this branchtests, mastertests, this branchThe offline failures are the known flaky
BrokenPipeErrors in tests that POST to the local httpbin (#1059, kevin1024/pytest-httpbin#101). Run 25 times each, alternating, those tests failed in 20 of 25 runs on both this branch and master.tests-niquestsfails on the same tests as on master (the urllib3-future problem #1056 fixes), apart from those flaky uploads. Skips and installed packages are identical to master.pre-commitand codespell pass. The built wheel's metadata differs from master's only inRequires-Python: >=3.11, the classifier and thepyreqwestmarker. pip installs it on 3.11 and refuses it on 3.10 (requires a different Python: 3.10.21 not in '>=3.11'). The docs build with the same Sphinx warnings as on master.This overlaps with #1058 in
docs/installation.rst(same sentence) and the changelog: whichever is merged second needs a rebase, keeping "3.11+" and both changelog entries.🤖 Generated with Claude Code
https://claude.ai/code/session_01GwUvhmzgfkiZ6vo4uGyesN