Skip to content

Use setup-python v5 in the PyPI publish job - #133

Merged
deathbird merged 2 commits into
develfrom
fix-publish-setup-python
Nov 13, 2026
Merged

deathbird merged 2 commits into
develfrom
fix-publish-setup-python

Conversation

@deathbird

@deathbird deathbird commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

The 3.8.0 tag run passed all tests but the publish-pypi job failed before building (run):

Run actions/setup-python@v1
##[error]Version 3.9 with arch x64 not found

The job ran on ubuntu-latest, which is now Ubuntu 26.04 (Image: ubuntu-26.04 in the log). Python 3.9 isn't preinstalled there, and actions/python-versions has no 3.9 build for 26.04 either (3.9.25 is built for 22.04 and 24.04 only), so upgrading setup-python alone would not fix it.

Changes to the publish-pypi job:

  • runs-on: ubuntu-24.04 instead of ubuntu-latest, so Python 3.9 can be installed and the sdist is built as for previous releases.
  • actions/setup-python@v1 → @v5, which downloads versions that aren't preinstalled.
  • pypa/gh-action-pypi-publish@master → @release/v1. master is sunset (no commits since Feb 2024, prints a deprecation warning). release/v1 accepts the same user/password inputs and runs twine check before uploading; an sdist of this repo built on Python 3.9 passes it.

Nothing was uploaded to PyPI, so after merging, master can be fast-forwarded and the 3.8.0 tag moved to it to publish (a re-run of the failed job would use the old workflow at the tag's commit).

The publish job only runs on tag pushes, so this PR's CI does not exercise it.

Not changed here: other Node 20 deprecation warnings (actions/checkout@v2), and publish-pypi not waiting for the py3.7/3.11/3.12 test jobs.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NHUSdpfx9GTG3gM1CaYHhR

deathbird and others added 2 commits November 13, 2026 14:07
ubuntu-latest no longer ships Python 3.9, and setup-python v1 can only
use preinstalled versions, so publishing 3.8.0 failed with "Version 3.9
with arch x64 not found". v5 downloads the version when it is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NHUSdpfx9GTG3gM1CaYHhR
The failed 3.8.0 job ran on ubuntu-26.04, which ubuntu-latest now
points to, and actions/python-versions has no Python 3.9 build for it
(3.9.25: 22.04 and 24.04 only), so setup-python v5 alone would still
fail. Pin the job to ubuntu-24.04.

Also move pypa/gh-action-pypi-publish from the sunset master branch to
release/v1. release/v1 runs twine check before uploading; a 3.9 sdist
of this repo passes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NHUSdpfx9GTG3gM1CaYHhR
@deathbird
deathbird merged commit 55901f7 into devel Nov 13, 2026
9 checks passed
@deathbird
deathbird deleted the fix-publish-setup-python branch November 13, 2026 13:12
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