Skip to content

python 3.15.0rc2: align python-feedstock with conda-forge - #256

Open
skupr-anaconda wants to merge 9 commits into
masterfrom
PKG-15601-cf-align
Open

skupr-anaconda wants to merge 9 commits into
masterfrom
PKG-15601-cf-align

Conversation

@skupr-anaconda

@skupr-anaconda skupr-anaconda commented Sep 4, 2026 •

Copy link
Copy Markdown

Destination channel: ad-testing/label/py315

Links

Explanation of changes:

Align the 3.15.0rc2 recipe with conda-forge main, reconstructed on origin/master after #257. Conflict merge 2a733207 (stray {% endif %}) was discarded.

Outputs / install split

  • New libpython (install_shared.sh) and libpython-static (install_static.sh). Deleted unused build_static.sh / build_static.bat.
  • python does not install libpython*.so/.dylib; tests assert those files are absent. Shared libpython is the libpython output.
  • CF Add a libpython3.dylib to support ABI3 applications conda-forge/python-feedstock#885: osx libpython3.dylib stable-ABI reexport in install_shared.sh (blob 5dafbd13). Tests: libpython3${SHLIB_EXT} on unix release; libpython3.dylib on osx.
  • CF add run-export to libpython conda-forge/python-feedstock#928: libpython unix weak run_exports pin_subpackage("libpython", min_pin="x.x", max_pin="x").
  • cpython noarch metapackage; python-freethreading / python-gil / python-jit kept. python_site_packages_path set. ignore_run_exports_from cxx on libpython outputs (unix). libpython-static force_use_keys: freethreading, build_type.

CBC / variants (recipe/conda_build_config.yaml)

  • gil_type → freethreading: yes/no and PY_FREETHREADING. FT is built on all platforms (s390x / osx-64 skip removed).
  • build_type: release only. Unix debug is not in this PR — exclusive to #258 / PKG-2624.
  • Still clobber aggregate python/numpy/is_freethreading/is_python_min; tk 9.0; osx clang 21.

recipe/meta.yaml

  • build_number 1.
  • source: is url + sha256 + patches only (no from_source_control / git_url wrapper).
  • Drop gil_type, PY_GIL_DISABLED, bootstrap, linkage_nature.
  • Win FT patches 0026 and 0030 wrapped in {% if freethreading == "yes" %}.
  • Patch list matches master numbering: 0028 conda-site.pth, 0029 zlib-ng, 0030 xxlimited. 0023-branding.patch always applied.
  • CMake tests use Python_FIND_ABI (cmake_test_args). Win import-lib tests cover both lib\ and libs\ (CFEP-27 / CF keep import libraries in libs to help meson and other build systems conda-forge/python-feedstock#918).
  • License stays PSF-2.0. Dummy channel_targets tuple for the linter; 'conda-forge' in channel_targets is false so CF skip_compile_pyc / branding / downstreams jinja does not fire.

Build scripts

  • build_base.sh: shared vs static split (SYSCONFIG / build-details.json from shared build, CF LDLIBRARY is set to libpython3.9a although no static lib is included in mambaforge for Linux conda-forge/python-feedstock#565). llvm-tools-21 via $HOST-llvm-ar → llvm-ar-$LLVM_VER. Dropped dead --with-tcltk-includes / --with-tcltk-libs (unrecognized in 3.15.0rc2; _tkinter via pkg-config). Dropped CentOS OLD_HOST / conda_cos6 / conda_cos7 sysconfig clones; system-gcc rewrite uses $HOST. JIT still off for debug, FT, and non-*-64.
  • build_base.bat: PY_GIL_DISABLED → PY_FREETHREADING. Win tk still TclVersion=%tk% / TkVersion=%tk% (tk 9). CF cross MSBuild block left commented (AR native workers).

Tests / other

  • Prefix-replacement: CF case $PKG_NAME (static or shared), not rm *.a then relink.
  • run_test_jit.py: skip (exit 0) when this interpreter was built without JIT; fail if JIT exists but is not enabled. python-jit still skipped for FT.
  • .gitignore: drop .vscode/.

Frozen AR-delta vs conda-forge (intentionally not copied)

  • tk 9.0 from pkgs/main (not CF 8.6 / %THREAD% tkinter lib).
  • llvm-tools-21 (not unversioned llvm-tools).
  • No _python_rc; no channel_sources: python_rc / python_debug zip.
  • Pinned aggregate host deps; msys2-gcc-libs; no binutils_impl / patch / m2-patch.
  • downstreams commented; cmake-no-system / ninja-base / make.
  • Keep 0023 branding, 0029 zlib-ng, 0030 xxlimited; linux sysroot missing_dso whitelist.

Notes:

  • Upload dest is ad-testing/label/py315 only. Do not merge to pkgs/main.
  • Human review/merge only when PBP is green.
  • Linter parsing_jinja_failure is skipped (freethreading / dummy channel_targets). Graph generate must succeed; the linter skip may stay red.
  • Debug builds are off here. Work them on #258; they will not go to pkgs/main.
  • Linux libpython3.so is empty upstream (cpython#104612); we follow CF and only test libpython3${SHLIB_EXT} on unix release.

@skupr-anaconda skupr-anaconda self-assigned this Sep 4, 2026
skupr-anaconda added a commit that referenced this pull request Sep 21, 2026
Replay #256 topology on origin/master without merge 2a73320.
Keep master patch numbering (0028 site.pth, 0029 zlib-ng, 0030 xxlimited).
Wrap win FT patches in freethreading jinja; add CF conda-forge#928 libpython
unix weak run_exports.

Refs: PKG-15601
@skupr-anaconda

skupr-anaconda commented Sep 23, 2026 •

Copy link
Copy Markdown
Author

Interesting, there is a new vendored d3-flame-graph in v3.15.0rc2: CPython stdlib profiling/sampling/_vendor/. . The upstream source is this https://github.com/spiermar/d3-flame-graph

@skupr-anaconda skupr-anaconda changed the title PKG-15601 — align python-feedstock with conda-forge python 3.15.0rc2: align python-feedstock with conda-forge Sep 23, 2026
skupr-anaconda added a commit that referenced this pull request Sep 24, 2026
PKG-2624 spike stacked on #256. Drop release variants so this graph
uploads only to ad-testing/label/py315-debug, and gate the d ABI with
unconditional tests instead of PY_INTERP_DEBUG getenv.

Windows skipped. Do not merge to pkgs/main.
skupr-anaconda added a commit that referenced this pull request Sep 25, 2026
Resolve #258 vs #256. Drop libexpat pins (expat-feedstock#31). Skip
win debug CMake FindPython. Assert _tkinter_d.lib for GIL and FT.
@skupr-anaconda

skupr-anaconda commented Sep 28, 2026 •

Copy link
Copy Markdown
Author

@ifitchet @cbouss

Artifact compare vs conda-forge python 3.15.0rc2

Staging: https://staging.continuum.io/pbp/fs/python-feedstock/pr256/cffd5c1
Pairs: GIL _101_cp315, FT _1_cp315t on linux-64, linux-aarch64, osx-arm64, win-64, noarch.

osx-64 is out of scope. win-arm64 is not in this graph (recipe is ARM64-ready; PBP has no win-arm64 worker yet).

Same

  • Same outputs, same extension-module names.
  • Unix python: ~1164/2814 files hash-identical (stdlib .py, headers, data).
  • Win python: 1953/2013 GIL, 1946/2009 FT hash-identical.
  • Remaining Unix “diffs” are almost all same-size .pyc (magic 520e0d0a, timestamp only).
  • Empty on both sides: win libpython / libpython-static, noarch cpython / python-gil / python-freethreading.
  • python-jit payloads match.

Not the same (review these)

What Staging conda-forge Action
Linux linker-compat dir compiler_compat/{ld,README} share/python_compiler_compat/ It's historical. Optional: move to CF path
GIL conda-site.pth missing present Keep missing. Do not restore CFEP-65 lib/python/site-packages (numba failure)
FT conda-site.pth 1 line 2 lines Keep 1 line
platform.py / sys.version Anaconda branding conda-forge branding Keep 0023-branding.patch
_tkinter libtcl9tk9.0 libtk8.6 Keep tk 9
osx-arm64 libpython*.dylib 11.3 MB + __llvm_prf_* 6.6 MB, no PGO sections Look — leftover PGO on the shared dylib

Shebangs / _sysconfig* / conda-meta differ by prefix (croot/ vs conda-bld/). Cannot match across CIs.

Why binaries differ (do not “fix” to CF)

  • tk 9 vs 8.6, glibc 2.28 vs 2.17, libgcc 14 vs 15, libffi 3.4 vs 3.7, sqlite vs libsqlite, xz vs liblzma, no _python_rc, license PSF-2.0 vs Python-2.0.
  • linux-64 CFLAGS: -march=x86-64-v2 (aggregate) vs CF -march=nocona. .comment: gcc 14.3 vs 15.3.
  • linux pyconfig.h: extra HAVE_* (statx, getrandom, copy_file_range, …) from el8 vs cos7. osx: only HAVE_READLINE_READLINE_H.
  • linux python3.15 ~40.4 vs 40.3 MB (DWARF, not a file-list bug). Win .pyd ~8 KB larger (MSVC + tk 9).

osx-arm64 libpython (the one real size bug)

python3.15 is fine (~6.57 MB both). libpython3.15.dylib is not:

  • Staging __TEXT,__text 6.46 MB vs CF 3.86 MB.
  • Staging has __llvm_prf_cnts/data/names/vnds (~2.0 MB). CF has none.

Cause: both configures get --enable-optimizations, but only the static tree runs make profile-opt. Shared make leaves PGO instrumentation in the dylib that install_shared.sh ships. Same story for libpython3.15.nolto.a (21.5 vs 14.6 MB).

Fix (follow-up, not required for file-list parity): do not pass --enable-optimizations into the shared configure, or run/strip PGO on that tree before cp libpython*.dylib.

Bottom line

File names: aligned except linux compiler_compat/ and GIL conda-site.pth.
File bytes: will never match CF while we keep tk 9, glibc 2.28, x86-64-v2, branding, and PBP prefixes. That is the frozen AR-delta, not a regression.

Optional in this PR: relocate compiler_compat. Do not chase CF bytes. Worth a small follow-up for the osx shared-lib PGO leftover.

@skupr-anaconda

skupr-anaconda commented Sep 28, 2026 •

Copy link
Copy Markdown
Author

Artifact compare vs pkgs/main python 3.14.7

Staging: https://staging.continuum.io/pbp/fs/python-feedstock/pr256/cffd5c1 (3.15.0rc2)
Main: https://repo.anaconda.com/pkgs/main (3.14.7) · recipe main-3.14
Pairs: GIL _101, FT _1 on linux-64, osx-arm64, win-64. Paths version-normalized (3.14/3.15 → X) before set-diff.

osx-64 is out of scope. win-arm64 is on 3.14.7 main, not on this graph (recipe is ARM64-ready).

Same

  • Unix compiler_compat/{ld,README} (both AR historical path).
  • libpython-static: same 3 files (libpython3.X.a, .nolto.a, osx config .a).
  • Host ABI family: tk 9.0.4, glibc 2.28, libffi 3.4, libgcc 14, openssl 3.5.x.
  • Same extension names except the 3.15 stdlib adds below.
  • Win: same ~37 .pyd names (after the CFEP-27 path rewrite).

Not the same (review these)

What Staging 3.15 pkgs/main 3.14.7 Action
Shared libpython new output; python has no .so/.dylib so/dylib inside python; no libpython pkg Keep CF-align split
GIL conda-site.pth missing present Keep missing (numba / CFEP-65)
bin/python3.1 absent present 3.14 conda#10969 workaround; optional
_sysconfigdata_*_conda_cos6_* absent present Keep dropped CentOS clones
sre_{compile,parse,constants}.py absent present Expected — removed upstream in 3.15
_asyncio*.so/.pyd absent present Expected — folded into interpreter in 3.15
Lib/profiling/sampling/ (~81 files) present absent Expected — new in 3.15
_math_integer, xxlimited_3_13 present absent Expected — new 3.15 modules
Win layout lib/python/ + lib-dynload/ Lib/ + DLLs/ Keep CFEP-27
cpython noarch present absent Keep CF-align metapackage
win-arm64 no artifacts GIL + FT on main PBP pool, not recipe

Shebangs / _sysconfig* / conda-meta differ by prefix and by version. Cannot match across CIs or minors.

Why binaries differ (do not “fix” to 3.14)

  • Different CPython (3.15.0rc2 ≠ 3.14.7). Interpreter / .so bytes will never match.
  • Pin floors only: libexpat 2.8.5 vs 2.8.2, sqlite 3.53.4 vs 3.53.2, ncurses 6.6 vs 6.5, openssl 3.5.8 vs 3.5.7. Same family as 3.14.7, not CF 8.6/glibc 2.17.
  • C-API headers renamed (lock.h → pylock.h, typeslots.h → slots.h).
  • pkgconfig filenames carry the version (python-3.15*.pc vs python-3.14*.pc).

win-arm64 (recipe yes, this graph no)

build_base.bat already sets PLATFORM=ARM64 / BUILD_PATH=arm64 (arm64t for FT) — the 3.14 #240 port. No extra LLVM override (3.15 upstream is 21).

PBP /check-queue lists win-amd64 only. Perseverance-skills: win-arm64 “(soon)”. 3.14.7 on main proves host deps work (ucrt, vc14, tk 9, openssl 3.5). This SHA never scheduled that subdir.

Bottom line

File names (Unix, version-normalized): aligned except CF-align split (libpython out of python), dropped cos6 sysconfig / python3.1, and 3.15 stdlib adds (profiling/, _math_integer).
File bytes: will never match 3.14.7 — different interpreter. That is expected, not a #256 regression.

Win is a layout rewrite (CFEP-27), not missing modules. Optional later: win-arm64 once PBP has a worker. Do not chase 3.14 paths or CF bytes.

Replay #256 topology on origin/master without merge 2a73320.
Keep master patch numbering (0028 site.pth, 0029 zlib-ng, 0030 xxlimited).
Wrap win FT patches in freethreading jinja; add CF conda-forge#928 libpython
unix weak run_exports.

Refs: PKG-15601
Keep build_type: release only in conda_build_config.yaml. Debug
interpreter remains a PKG-2624 spike, not this CF-align PR.

Refs: PKG-15601
Auto-bump must track every output from the CF-align split.

Refs: PKG-15601
Debug variants stay on ad-testing/label/py315. Disable before any
pkgs/main / stable 3.15.0+ release (PKG-2624).

Refs: PKG-15601
Debug builds are exclusive to python-feedstock#258 / PKG-2624.

Refs: PKG-15601
pyexpat overlinks libexpat 2.8.5; host expat has no run_exports, so
the python output never got a run req. Same fix as #258.

Refs: PKG-15601
@skupr-anaconda
skupr-anaconda changed the base branch from master to PKG-15601-libpython-split September 28, 2026 16:00
@skupr-anaconda

Copy link
Copy Markdown
Author

Review #259 first (C16+C17 libpython split vs master).

This PR (#256) is now based on PKG-15601-libpython-split so Files should be remainder-only (FT CBC / cpython / CF). Do not merge this before #259. After #259 merges, retarget this PR back to master.

Dest remains ad-testing/label/py315. Do not publish 3.15 to pkgs/main (PKG-15601 PBC).

Base automatically changed from PKG-15601-libpython-split to master October 1, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant