Repository navigation
fix(ci): replace poetry with uv to fix python 3.8 builds - #32
Merged
Merged
Conversation
Poetry 2.x can no longer seed a Python 3.8 virtualenv. `pipx install poetry` resolves against the runner's system interpreter, so CI gets Poetry 2.5.1 (requires >=3.10) on every matrix leg; its bundled virtualenv seeder no longer ships pip/setuptools wheels for 3.8 and `poetry install` exits 1 in the 3.8 leg on all branches. uv manages interpreters itself, so it can create 3.8 environments and setup-python is no longer needed: - pyproject.toml: PEP 621 metadata, uv_build backend, flat module layout - uv.lock replaces poetry.lock, CI runs `uv sync --frozen` - publish via `uv build` and pypa/gh-action-pypi-publish - run coverage before publishing, disable strategy fail-fast
hvalev
force-pushed
the
fix/uv-migration
branch
from
October 17, 2026 20:27
7b21026 to
291ffaa
Compare
This was referenced Oct 17, 2026
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.
Why
CI has been red on every branch since June, including
main(e52fef1): theTest with different Python versions (3.8)job fails at step 6, "Install dependencies" (poetry install, exit 1). This is what makes #30 and #31 show up asunstable— their bumps are correct, they just inherit the broken leg.Root cause:
sudo apt install pipxinstalls pipx against the runner's system Python, sopipx install poetryresolves the newest Poetry that pipx's interpreter accepts — currently Poetry 2.5.1, which requires>=3.10. Steps 1-5 stay green on the 3.8 leg, then Poetry 2.x cannot seed a 3.8 virtualenv:Reproduced locally: Poetry 1.8.5 under real 3.8 installs fine, Poetry 2.5.1 targeting a 3.8 env exits 1. So the matrix is not the problem - the toolchain above it is.
What
Switch the toolchain to uv. uv manages its own interpreters and still creates 3.8 environments, so the matrix keeps 3.8 and
actions/setup-pythondisappears entirely.pyproject.toml: PEP 621 metadata +uv_build(module-root = ""for the flat layout); dev deps move to[dependency-groups]with the same ranges as the old^0.9/^8.0/^5.0uv.lockreplacespoetry.lock; CI runsuv sync --frozen+uv run ruff/pytestuv build+pypa/gh-action-pypi-publish, reusing the existingPYPI_PASSWORDsecretubuntu-22.04->ubuntu-24.04, pinned rather thanubuntu-latest: thelatestlabel starts migrating to Ubuntu 26.04 on 19 Oct 2026 ([Ubuntu]ubuntu-latestlabel will use Ubuntu 26.04 in November 2026 actions/runner-images#14748). uv supplies the interpreters, so the newer image no longer costs us 3.8strategy.fail-fast: false, so one red leg no longer cancels its siblingsVerification
uv sync --frozen+ruff check .+pytestlocally on 3.8, 3.9, 3.10, 3.11, 3.12, 3.13 - all green (18 tests).Artifacts match the old build:
py_markdown_table-1.3.0-py3-none-any.whland.tar.gz, wheel ships onlypy_markdown_table/(tests excluded, as in #11),License-Expression: MIT,LICENSEincluded in both.Two judgement calls, one line each to revert: the deprecated
License :: OSI Approved :: MIT Licenseclassifier is dropped in favour oflicense/license-files(PEP 639), and the coverage step moved ahead of the publish step.Note:
astral-sh/setup-uvpublishes point tags only (no floatingv10), so the action is pinned tov10.3.0.