Skip to content

Drop support for Python 3.10 - #7093

Merged
snejus merged 8 commits into
masterfrom
drop-python-310-support
Oct 21, 2026
Merged

snejus merged 8 commits into
masterfrom
drop-python-310-support

Conversation

@snejus

@snejus snejus commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Depends on: #7094

Summary

Drops Python 3.10 (EOL this month) and makes 3.11 the minimum supported version.

  • pyproject.toml: requires-python = ">=3.11,<3.15", 3.10 classifier removed, ruff target-version = "py311".
  • CI, lint, integration and release workflows move to 3.11; the test matrix is now 3.11-3.14 and IS_MAIN_PYTHON tracks 3.11.
  • Replace typing_extensions backports with the stdlib equivalents now available: Self, Never, ParamSpec, TypeVarTuple, Unpack, NotRequired, plus StrEnum for DuplicateAction and datetime.UTC in extra/release.py. beets/util/pipeline.py also switches Unpack[A] to the native *A syntax. typing_extensions stays where 3.11 isn't enough - TypeVar defaults, override, TypedDict.
  • Drop the tomli release dependency: extra/release.py uses stdlib tomllib.
  • beets/dbcore/db.py: remove the dead sys.version_info >= (3, 8) and sqlite_version_info >= (3, 8, 3) guard, so create_function(deterministic=True) is now unconditional.
  • uv.lock refresh. Most of the churn is 39 python_full_version < '3.11' marker splits collapsing into single resolutions. Ruff goes 0.16.0 -> 0.17.0, which is why two stale # noqa: E501 comments disappear.

Dependency upgrades

image

Copilot AI balanced review requested due to automatic review settings October 10, 2026 08:55
@snejus
snejus requested review from a team, asardaes and semohr as code owners October 10, 2026 08:55

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@snejus
snejus force-pushed the drop-python-310-support branch from 07e9bc0 to d7f3d3e Compare October 10, 2026 08:56
@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.49%. Comparing base (87c9fa9) to head (b7ebf6d).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
extra/release.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7093      +/-   ##
==========================================
- Coverage   80.66%   80.49%   -0.18%     
==========================================
  Files         149      149              
  Lines       21255    21243      -12     
  Branches     3282     3281       -1     
==========================================
- Hits        17146    17099      -47     
- Misses       3278     3315      +37     
+ Partials      831      829       -2     
Files with missing lines Coverage Δ
beets/dbcore/db.py 94.71% <100.00%> (+0.13%) ⬆️
beets/importer/actions.py 96.96% <100.00%> (ø)
beets/importer/state.py 94.73% <100.00%> (-0.10%) ⬇️
beets/library/models.py 88.42% <100.00%> (-0.02%) ⬇️
beets/plugins.py 89.51% <100.00%> (-0.05%) ⬇️
beets/ui/commands/modify.py 94.44% <100.00%> (-0.06%) ⬇️
beets/util/__init__.py 82.89% <ø> (-0.04%) ⬇️
beets/util/pipeline.py 91.96% <100.00%> (ø)
beetsplug/_utils/musicbrainz.py 96.81% <ø> (-0.01%) ⬇️
beetsplug/_utils/playcount.py 94.82% <100.00%> (-0.09%) ⬇️
... and 6 more

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@snejus
snejus force-pushed the drop-python-310-support branch 3 times, most recently from 4f79bda to 817b7ab Compare October 10, 2026 16:55
@snejus
snejus changed the base branch from master to fix-config-usage-in-tests October 10, 2026 20:33
@snejus
snejus force-pushed the drop-python-310-support branch from 817b7ab to 35035ff Compare October 10, 2026 20:33
@snejus snejus mentioned this pull request Oct 20, 2026
1 of 3 tasks
@snejus
snejus force-pushed the fix-config-usage-in-tests branch from 5a77778 to 2d5b034 Compare October 20, 2026 06:14
@snejus
snejus force-pushed the drop-python-310-support branch from 35035ff to 722d865 Compare October 20, 2026 06:14
Base automatically changed from fix-config-usage-in-tests to master October 21, 2026 17:46
@snejus
snejus force-pushed the drop-python-310-support branch from 722d865 to e507549 Compare October 21, 2026 17:47
Since tomli dependency is removed, the following does not fail any more:

release = pytest.importorskip("extra.release")
@snejus
snejus force-pushed the drop-python-310-support branch from e507549 to b7ebf6d Compare October 21, 2026 18:03
@snejus
snejus merged commit 9c1e95b into master Oct 21, 2026
21 checks passed
@snejus
snejus deleted the drop-python-310-support branch October 21, 2026 18:55
snejus added a commit that referenced this pull request Oct 22, 2026
Depends on: #7093

## Summary

Clears out the warnings the test suite emits under Python 3.14, so the
output is readable again and real warnings stand out.

- **`codecs.open` removed** (`beetsplug/edit.py:429`,
`beetsplug/export.py:210`) - deprecated since 3.11, plain `open()` with
`encoding=` is the drop-in replacement. Same in
`test/plugins/test_edit.py`.
- **Class-scoped fixtures declared as `@classmethod`** across 8 test
modules - pytest warns when a `scope="class"` fixture is defined as an
instance method, since there is no per-test instance to bind to.
`self.X` references become `cls.X`.
- **`test_bpd.py` fork handling** - 3.14 defaults to `forkserver` on
Linux, but the BPD server subprocess needs to inherit the parent's
patched `gstplayer` and mock state, so the start method is now forced to
`fork` unconditionally. Under `pytest-xdist` the parent is
multi-threaded, which 3.14 warns about; ignored at module level with a
comment explaining why it's safe here.
- **Warnings we can't fix are ignored narrowly** - `asyncio` policy
deprecations pinned in `setup.cfg`, `pathlib.PurePath.as_uri()` on the
one `test_thumbnails.py` test that exercises it, and legacy string-field
deprecations in `test/autotag/test_hooks.py` where the deprecated fields
are the thing under test.
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.

2 participants