Repository navigation
py(3.15): Fix the formatter tests, default to Python 3.15 - #581
Merged
Merged
Conversation
why: CPython 3.15.0 was released on 2026-10-09. mise resolves the bare `3.15` to the newest installed 3.15.x, so the pin needs no patch bumps. mise now uses Python 3.15 first, with 3.14 through 3.10 still installed. See also: - https://www.python.org/downloads/release/python-3150/ - https://docs.python.org/3.15/whatsnew/3.15.html
why: uv uses this as the default interpreter for `uv sync` and `uv run`. See also: - https://docs.python.org/3.15/whatsnew/3.15.html
why: Run the test job on the current CPython release. what: - replace 3.14 with 3.15 in the `build` job matrix of tests.yml - leave the `release` job on 3.14 The suite does not pass on 3.15 yet: `uv run py.test` reports 14 failures in tests/cli/test_formatter.py. See also: https://devguide.python.org/versions/
why: Python 3.15 made `argparse.HelpFormatter._theme` a read-only property (cpython#148827). The formatter tests injected their mock theme with `fmt._theme = ...`, so all 14 failed with "property '_theme' ... has no setter" (#580). The formatter itself only reads `_theme` and renders the same help on 3.14 and 3.15. what: - Read argparse's theme through a new `_example_theme()`, the one place that resolves it - Supply the tests' mock theme by overriding `_example_theme()` in a test subclass instead of assigning `_theme` - Correct the docstring: with `NO_COLOR` argparse's theme is empty strings, not None; None only happens below Python 3.14
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #581 +/- ##
=======================================
Coverage 83.72% 83.72%
=======================================
Files 32 32
Lines 4595 4595
Branches 928 928
=======================================
Hits 3847 3847
Misses 497 497
Partials 251 251 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tony
marked this pull request as ready for review
October 24, 2026 02:02
why: The release job pinned Python 3.14, but `uv sync` follows `.python-version`, which is 3.15, so the pin installed an interpreter the build never used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vcspull's test suite passes on Python 3.15, which becomes the default
interpreter and the version CI tests. The formatter tests assigned to
HelpFormatter._theme, which argparse 3.15 turned into a read-onlyproperty, so every test that built a formatter with a mock theme
failed (#580). vcspull itself already ran on 3.15:
vcspull sync --helpprinted the same colored examples there as on 3.14.Formatter:
VcspullHelpFormatter._example_theme()returnsargparse's theme, or None below 3.14, and
_fill_text()reads itthrough that method. Help output is unchanged.
Tests: the
_fill_textand example-colorizing tests pin a mocktheme by overriding
_example_theme()on a subclass instead ofwriting
_theme.Python 3.15 default:
.tool-versionslistspython 3.15 3.14 3.13 3.12 3.11 3.10,.python-versionis3.15,the test matrix runs 3.15 in place of 3.14, and the release job
builds on 3.15.
Packaging: the trove classifiers add Python 3.15, so PyPI lists
it as supported.
Changelog: a What's new entry, "Python 3.15 support".
Fixes #580