Skip to content

fix(release): pin Python for the PyPI distribution build - #3796

Merged
Daniel Meppiel (danielmeppiel) merged 2 commits into
mainfrom
danielmeppiel-pypi-build-python
Nov 17, 2026
Merged

Daniel Meppiel (danielmeppiel) merged 2 commits into
mainfrom
danielmeppiel-pypi-build-python

Conversation

@danielmeppiel

Copy link
Copy Markdown
Collaborator

Description

Fixes forward from #3794. The first publish-existing-tag recovery for v0.36.0 (run 44151877367) passed tag resolution and checked out v0.36.0. Build PyPI Distributions then failed:

error: the configured Python interpreter version (3.14) is newer than PyO3's maximum supported version (3.13)
error: Failed to build `pydantic-core==2.33.2`

That job never set up Python, so uv chose the runner image's newest interpreter. The bug predates #3794 and would also break the next normal tag publish. Fix: pass python-version: ${{ env.PYTHON_VERSION }} (3.12, as every other job uses) to setup-uv. test_pypi_publisher_only_downloads_and_publishes now pins it.

After merge: re-dispatch publish-existing-tag for v0.36.0.

Issue and approved scope

Issue: Refs #3581

Human scope-approval comment: #3581 (comment). This is a named release fix that follows #3794 (milestone 0.36.1).

Does this PR complete the issue, or what remains? Partial. It is a release-path fix only.

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Maintenance / refactor

Testing

  • Tested locally
  • All existing tests pass
  • Added tests for new functionality (if applicable)
Command Result
pytest tests/unit/test_security_workflow_contracts.py -p no:xdist 4 passed
actionlint .github/workflows/build-release.yml clean
ruff check / ruff format --check on the changed test clean

Spec conformance (OpenAPM v0.1)

  • N/A -- this PR does not change OpenAPM-observable behaviour.

Build PyPI Distributions never set up Python, so uv chose the runner's
newest interpreter (3.14), where locked pydantic-core has no wheel and
fails to compile. Recovery run 44151877367 failed this way; the next tag
publish would have too. Pin it to PYTHON_VERSION through setup-uv.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 17, 2026 18:51

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.

🔵 Needs a closer look

Only static workflow checks cover the irreversible PyPI recovery path; a release operator should validate the tagged Python 3.12 build before publication.

No open issues 🎉

What changed in this PR

Pins the PyPI distribution build to the workflow's Python 3.12 setting, preventing normal release and tag-recovery builds from selecting an interpreter incompatible with locked native dependencies.

Changes:

  • Passes PYTHON_VERSION to setup-uv in the distribution-build job.
  • Adds a regression assertion for the interpreter setting.
  • Updates the existing changelog entry to include this follow-up fix.
File Description
tests/​unit/​test_security_workflow_contracts.py Asserts that the distribution builder pins Python through setup-uv.
CHANGELOG.md Adds this PR to the related release-publication fix entry.
.github/​workflows/​build-release.yml Pins the PyPI build interpreter to PYTHON_VERSION.

Review effort: Balanced

@danielmeppiel
Daniel Meppiel (danielmeppiel) merged commit 42afa91 into main Nov 17, 2026
23 checks passed
@danielmeppiel
Daniel Meppiel (danielmeppiel) deleted the danielmeppiel-pypi-build-python branch November 17, 2026 19:06
Daniel Meppiel (danielmeppiel) added a commit that referenced this pull request Nov 19, 2026
* docs(changelog): make 0.36.0 onwards legible and concise

Rewrites [Unreleased], [0.36.1] and [0.36.0] as one short line per user-visible change, with Highlights and a Breaking changes and upgrade notes list per version, grouped PRs and internal-only entries dropped (#3637, #3771, #3794, #3796, #3877). Credits, PR references, the 0.36.1 issue closures and the live Azure DevOps caveat are kept. Sections from 0.35.1 down are unchanged. The changelog instructions now describe this style.

Co-authored-by: Copilot App <[email protected]>

* chore(lock): record the new changelog instructions hash

Co-authored-by: Copilot App <[email protected]>

* docs: note the shared .mcp.json and VS Code Local mode in 0.37 upgrade notes

Co-authored-by: Copilot App <[email protected]>

* docs(changelog): restore accuracy qualifiers flagged in review

Restores the static env caveat for .mcp.json, the pack default-format
qualifier, Copilot CLI scope for COPILOT_HOME, the 0.36.1 frozen-lockfile
recovery step, and the bundle install --target qualifier.

Co-authored-by: Copilot App <[email protected]>

---------

Co-authored-by: danielmeppiel <[email protected]>
Co-authored-by: Copilot App <[email protected]>
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