Skip to content

Add python3.14 package (side-by-side with python3)#16856

Open
ihvo wants to merge 5 commits intomicrosoft:3.0-devfrom
ihvo:ihvo/ihar-voitka/publish-python-3.14-package
Open

Add python3.14 package (side-by-side with python3)#16856
ihvo wants to merge 5 commits intomicrosoft:3.0-devfrom
ihvo:ihvo/ihar-voitka/publish-python-3.14-package

Conversation

@ihvo
Copy link
Copy Markdown

@ihvo ihvo commented Apr 24, 2026

Merge Checklist
  • The toolchain has been rebuilt successfully (or no changes were made to it) — no toolchain changes
  • The toolchain/worker package manifests are up-to-date — python3.14 is a new user-facing package, not a toolchain component
  • Any updated packages successfully build — awaiting source-server upload of Python-3.14.4.tar.xz (see Follow-ups)
  • Packages depending on static components modified in this PR have had their Release tag incremented — N/A
  • Package tests (%check section) — %check section present (python3.14 -m test --exclude test_socket)
  • All package sources are available — Python-3.14.4.tar.xz needs to be uploaded to the source server by an Azure Linux maintainer
  • cgmanifest files are up-to-date and sorted — new entry added under ./cgmanifest.json in alphabetical position
  • LICENSE-MAP files are up-to-date — python3.14 added to Source project group in both licenses.json and LICENSES-MAP.md
  • All source files have up-to-date hashes in the *.signatures.json files — SHA-256 for Python-3.14.4.tar.xz verified against python.org release page
  • sudo make go-tidy-all and sudo make go-test-coverage pass — no Go changes
  • Documentation has been updated to match any changes to the build system — N/A

Summary

Ship Python 3.14.4 as a new side-by-side package under SPECS/python3.14/, following the SPECS/nodejs24/ precedent for parallel major-version packages. The default python3 (3.12) package is not modified; it continues to receive upstream-backed security patches until Python 3.12 EOL (2028-10). Consumers opt in to 3.14 explicitly via Requires: python3.14 or /usr/bin/python3.14.

Change Log
  • New SPECS/python3.14/python3.14.spec — Version 3.14.4, Release 1.

  • Strictly versioned filesystem layout. %install removes the unversioned /usr/bin/python3, python3-config, pydoc3, idle3, libpython3.so, python3.pc, python3-embed.pc and man1/python3.1* so the package has zero file-level collision with python3 (3.12) — no Conflicts: line needed (unlike nodejs24, which has to conflict with nodejs on /usr/bin/node).

  • Only versioned Provides: (python(abi) = 3.14, python314, python3.14-docs). No Provides: python, python-sqlite, /bin/python, /bin/python3 — those remain owned by the default python3 package.

  • Drops the lib2to3-based tools subpackage (lib2to3 / /usr/bin/2to3 removed in Python 3.13, PEP 594).

  • No CVE patches carried. Every patch on the current SPECS/python3/ (3.12) fork has a 3.14-branch backport that merged in python/cpython before 3.14.4's release on 2026-04-07:

    CVE gh-issue 3.14 backport PR Merged
    CVE-2026-0672 gh-143919 [3.14] gh-143919: Reject control characters in http cookies python/cpython#144089 2026-01-23
    CVE-2026-0865 gh-143916 [3.14] gh-143916: Reject control characters in wsgiref.headers.Headers (GH-143917) python/cpython#143972, #144761 2026-01-17, 02-21
    CVE-2026-1299 gh-144125 [3.14] gh-144125: email: verify headers are sound in BytesGenerator python/cpython#144182 2026-01-25
    CVE-2026-4519 gh-143930 [3.14] gh-143930: Reject leading dashes in webbrowser URLs python/cpython#146214, #148042 2026-03-23, 04-03

    All CVE-2025-* patches on the 3.12 fork are older still and were already in 3.14.0 (GA 2025-10). cgi3.patch is dropped because the cgi module was removed in 3.13 (PEP 594).

  • cgmanifest.json: adds python3.14 / 3.14.4 entry (alphabetically sorted; python3-* sorts before python3.14 in ASCII).

  • LICENSES-AND-NOTICES/SPECS/data/licenses.json and LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md: adds python3.14 under the Source project group (License: PSF, same as upstream CPython; %changelog boilerplate uses the "Initial Azure Linux import from the source project" phrasing that the spec_source_attributions classifier expects).

Does this affect the toolchain?

NO. Toolchain still ships python3-3.12.9-10 — unchanged. python3.14 is a new user-facing package.

Associated issues

None. Per CONTRIBUTING.md, a GitHub issue is only required when graduating a package from SPECS-EXTENDED to SPECS; this is a brand-new addition directly to SPECS/, following the nodejs24 precedent.

Links to CVEs

N/A for this PR — no CVE patches carried. See Change Log for the upstream verification table.

Follow-ups
  1. Source server upload (blocking)Python-3.14.4.tar.xz (sha256 d923c51303e38e249136fc1bdf3568d56ecb03214efdef48516176d3d7faaef8) and the existing pathfix.py (sha256 7a2ff222346d3c95b08814e3372975823e099c17dddaa73a459a3d840e6e9c1b, identical to the SPECS/python3/ one) need to be in azurelinuxsrcstorage. Requesting an Azure Linux maintainer's help per CONTRIBUTING.md.
  2. Sequential PR#2 — golden container — follow-up PR will add .pipelines/containerSourceData/python3.14/ for the mcr.microsoft.com/azurelinux/base/python:3.14 golden container. Tag-policy decision for that PR: the floating :3 tag stays frozen at 3.12 until Python 3.12 EOL (2028-10). Opens once PR#1 merges and python3.14 RPMs are available in packages.microsoft.com/azurelinux/3.0/prod/base/.
Test Methodology

Local build not yet run (awaiting source-server upload of Python-3.14.4.tar.xz). Will update with pipeline build ID / local artifact path once CI kicks in or the source is available. toolkit/scripts/license_map.py verified to pass locally after the license-attribution changelog fix.

Directory-naming note: went with python3.14 (dot-separated, mirrors /usr/bin/python3.14 and Fedora/RHEL SxS convention) rather than python314 (nodejs24 style). Happy to rename if the team prefers — mechanical find-replace.

@ihvo ihvo requested a review from a team as a code owner April 24, 2026 02:29
@microsoft-github-policy-service microsoft-github-policy-service Bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Apr 24, 2026
Ship Python 3.14.4 as a new SxS package under SPECS/python3.14/. The default
python3 (3.12) package is not modified; python3.14 installs strictly under
versioned paths (/usr/bin/python3.14, /usr/lib/python3.14/,
libpython3.14.so.1.0) and removes unversioned symlinks/pkgconfig/man pages in
%install so it cannot collide with python3.

Follows the SPECS/nodejs24 precedent for side-by-side major-version packages.

CVE patches triaged against the python3 (3.12) set: cgi3.patch dropped (cgi
removed in 3.13, PEP 594); all CVE-2025-* patches dropped (fixed upstream in
3.14.4, GA 2026-04-07); CVE-2026-0672, CVE-2026-0865, CVE-2026-1299 and
CVE-2026-4519 carried since their fixes post-date 3.14.4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ihvo ihvo force-pushed the ihvo/ihar-voitka/publish-python-3.14-package branch from 7e78f17 to c8675c3 Compare April 24, 2026 02:34
Switch the %changelog %changelog boilerplate from "Original version for
Azure Linux" (which spec_source_attributions classifies as the "Microsoft"
origin) to "Initial Azure Linux import from the source project (license:
same as \"License\" tag)." so it matches the "Source project" regex and
aligns with the licenses.json / LICENSES-MAP.md entry added for python3.14.

Reported by the "Spec License Map Check" CI job on PR microsoft#16856.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ihvo
Copy link
Copy Markdown
Author

ihvo commented Apr 24, 2026

Updated — a few follow-up commits cleaned the PR up:

  • 15ccce43c%changelog boilerplate switched to "Initial Azure Linux import from the source project (license: same as "License" tag)." so it matches the "Source project" origin regex in spec_source_attributions.py; Spec License Map Check now passes locally.
  • 10ed2bc0c — dropped all four carried CVE patches. Verified every one has a 3.14-branch backport PR that merged in python/cpython before 3.14.4's release on 2026-04-07 (CVE-2026-0672 → #144089, CVE-2026-0865 → #143972+#144761, CVE-2026-1299 → #144182, CVE-2026-4519 → #146214+#148042). Full table in the PR description.
  • 06cf8ea61 — dropped the pathfix.py Source1 along with the file, %install copy, and devel-subpackage entry. Nothing in Azure Linux's build pipeline invokes a versioned pathfixN.N.py, so it was vestigial.

Blocking source-server upload request — only one file left: Python-3.14.4.tar.xz (sha256 d923c51303e38e249136fc1bdf3568d56ecb03214efdef48516176d3d7faaef8, verified against python.org's release page). Per CONTRIBUTING.md, only an Azure Linux maintainer can push to azurelinuxsrcstorage. Could someone with source-server access help upload, or point me at the right internal channel? Happy to re-trigger CI once it's available.

Ihar Voitka and others added 3 commits April 23, 2026 19:49
Verified against python/cpython that every CVE patch on the 3.12 fork has a
3.14-branch backport PR that merged before 3.14.4's release on 2026-04-07:

  CVE-2026-0672 → PR python/cpython#144089 (merged 2026-01-23)
  CVE-2026-0865 → PRs python/cpython#143972 + #144761 (merged 2026-01-17 / 02-21)
  CVE-2026-1299 → PR python/cpython#144182 (merged 2026-01-25)
  CVE-2026-4519 → PRs python/cpython#146214 + #148042 (merged 2026-03-23 / 04-03)

The CVE-2025-* patches are even older and were already in 3.14.0 (GA 2025-10).
Carrying patches we don't need adds hunk-maintenance cost, rebase risk, and
auditor confusion with no upside.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The pathfix.py Source1 is committed directly under SPECS/python3/ — the
srpmpacker resolves sources from the local spec dir before reaching to
azurelinuxsrcstorage. Missing the local copy was the reason the
"Source Signature Check (SPECS)" CI was 404'ing on pathfix.py; the file is
byte-identical to SPECS/python3/pathfix.py, so the existing signatures.json
sha is already correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Nothing in Azure Linux's build pipeline invokes a versioned pathfixN.N.py —
the file is a vestige from the era when CPython shipped pathfix.py in its
own source tarball. Carrying it for 3.14 adds a build-time source fetch and
a devel-subpackage file with no downstream consumer.

Removes Source1, the %install cp from %{SOURCE1}, the %files devel entry,
the local pathfix.py payload and its signatures.json hash.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.0-dev PRs Destined for AzureLinux 3.0 Packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant