Skip to content

PKG-2624 - Py_DEBUG spike (stacked on #256) - #258

Open
skupr-anaconda wants to merge 23 commits into
PKG-15601-cf-alignfrom
PKG-2624-debug-spike
Open

skupr-anaconda wants to merge 23 commits into
PKG-15601-cf-alignfrom
PKG-2624-debug-spike

Conversation

@skupr-anaconda

Copy link
Copy Markdown

Destination channel: ad-testing/label/py315-debug

Links

Explanation of changes:

  • Unix --with-pydebug spike only (Py_DEBUG, d in sys.abiflags). Not -X dev. Not Windows _d.lib.
  • CBC: build_type: debug # [not win] only; freethreading: yes/no. No release on this graph.
  • abs.yaml uploads to ad-testing/label/py315-debug. Release 3.15 stays on python 3.15.0rc2: align python-feedstock with conda-forge #256 → ad-testing/label/py315. Do not zip channel_targets (F94).
  • Unconditional ABI probes in meta.yaml + run_test.py (do not rely on PY_INTERP_DEBUG getenv).
  • Runbook: recipe/DEBUG.md.
  • Windows: zero variants; empty/skip win PBP tasks are expected.

Notes:

  • Do not merge to pkgs/main. Human-only. PKG-2624 is closed (no market); this is a time-boxed technical spike.
  • Do not reopen/transition PKG-2624 unless asked.
  • Numpy / pybind11 debug extension chain is out of scope.
  • gdb/lldb + /debug-elf are local/runbook only, not a PBP gate.
  • If python 3.15.0rc2: align python-feedstock with conda-forge #256 rebases, rebase this spike onto it. Do not merge either PR to pkgs/main.

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
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.
@package-build-platform

Copy link
Copy Markdown
Failed to submit graph for 196ccaa

Message:
Failed to run command: 'pbp generate from-feedstock --output /tmp/tmpgdnd9p1m/python-feedstock.yaml --custom-metadata-file /tmp/tmpgdnd9p1m/custom_metadata.yaml --release-name python-feedstock-258-196ccaa43152a5b7627f188c7e56bd706046847d python-feedstock/recipe', with error: 'INFO:root:Found feedstock python-feedstock at /tmp/tmpgdnd9p1m/python-feedstock/recipe
INFO:root:Build/Test graph from python-feedstock
Created by sbx_user1051 on 2026-09-24 10:22:39
Command line: /opt/conda/envs/webhook-listener/bin/pbp generate from-feedstock --output /tmp/tmpgdnd9p1m/python-feedstock.yaml --custom-metadata-file /tmp/tmpgdnd9p1m/custom_metadata.yaml --release-name python-feedstock-258-196ccaa43152a5b7627f188c7e56bd706046847d python-feedstock/recipe

INFO:root:Found abs.yaml in /tmp/tmpgdnd9p1m/python-feedstock
INFO:pbpcli.utils.common:Setting env var: ANACONDA_ROCKET_ENABLE_PY315 = True.
INFO:root:Creating graph from feedstock at: python-feedstock
INFO:pbpcli.utils.common:Setting env var: CONDA_SUBDIR = linux-64.
INFO:pbpcli.utils.expand_variants:Elapsed time for get_package_variants: 0.11 seconds
INFO:pbpcli.utils.expand_variants:Matrix vars: 3 unchanging vars:(477), changing vars (3): ['blas_impl', 'cuda_compiler_version', 'freethreading']
INFO:pbpcli.utils.expand_variants:Elapsed time for preparation for render: 0.00 seconds
INFO:pbpcli.utils.common:Setting env var: CONDA_PKGS_DIRS = /tmp/conda_pkgs_6wdy69q9.
/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/environ.py:547: UserWarning: The environment variable 'PY_INTERP_DEBUG' is being passed through with value 'yes'. If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
warnings.warn(
/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/environ.py:547: UserWarning: The environment variable 'PY_FREETHREADING' is being passed through with value 'yes'. If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
warnings.warn(
WARNING: Adding .* to spec 'openssl 3' to ensure satisfiability. Please consider putting {{{{ var_name }}}}.* or some relational operator (>/</>=/<=) on this spec in meta.yaml, or if req is also a build req, using {{{{ pin_compatible() }}}} jinja2 function instead. See https://conda.io/docs/user-guide/tasks/build-packages/variants.html#pinning-at-the-variant-level
/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/environ.py:547: UserWarning: The environment variable 'PY_INTERP_DEBUG' is being passed through with value 'yes'. If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
warnings.warn(
/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/environ.py:547: UserWarning: The environment variable 'PY_FREETHREADING' is being passed through with value 'yes'. If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
warnings.warn(
WARNING: Adding .* to spec 'cpython 3.15.0rc2' to ensure satisfiability. Please consider putting {{{{ var_name }}}}.* or some relational operator (>/</>=/<=) on this spec in meta.yaml, or if req is also a build req, using {{{{ pin_compatible() }}}} jinja2 function instead. See https://conda.io/docs/user-guide/tasks/build-packages/variants.html#pinning-at-the-variant-level
/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/environ.py:547: UserWarning: The environment variable 'PY_FREETHREADING' is being passed through with value 'no'. If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
warnings.warn(
INFO:pbpcli.utils.common:Unsetting env var: CONDA_PKGS_DIRS
INFO:pbpcli.utils.expand_variants:Elapsed time for api.render: 51.97 seconds
INFO:pbpcli.utils.common:Unsetting env var: CONDA_SUBDIR
INFO:pbpcli.utils.common:Setting env var: CONDA_SUBDIR = linux-aarch64.
INFO:pbpcli.utils.expand_variants:Elapsed time for get_package_variants: 0.11 seconds
INFO:pbpcli.utils.expand_variants:Matrix vars: 2 unchanging vars:(477), changing vars (2): ['cuda_compiler_version', 'freethreading']
INFO:pbpcli.utils.expand_variants:Elapsed time for preparation for render: 0.00 seconds
INFO:pbpcli.utils.common:Setting env var: CONDA_OVERRIDE_GLIBC = 2.28.
INFO:pbpcli.utils.common:Setting env var: CONDA_PKGS_DIRS = /tmp/conda_pkgs_g6idh_sf.
INFO:pbpcli.utils.common:Unsetting env var: CONDA_OVERRIDE_GLIBC
INFO:pbpcli.utils.common:Unsetting env var: CONDA_PKGS_DIRS
INFO:pbpcli.utils.expand_variants:Elapsed time for api.render: 38.28 seconds
INFO:pbpcli.utils.common:Unsetting env var: CONDA_SUBDIR
INFO:pbpcli.utils.common:Setting env var: CONDA_SUBDIR = osx-arm64.
INFO:pbpcli.utils.expand_variants:Elapsed time for get_package_variants: 0.11 seconds
INFO:pbpcli.utils.expand_variants:Matrix vars: 1 unchanging vars:(480), changing vars (1): ['freethreading']
INFO:pbpcli.utils.expand_variants:Elapsed time for preparation for render: 0.00 seconds
INFO:pbpcli.utils.common:Setting env var: CONDA_OVERRIDE_OSX = 12.1.
INFO:pbpcli.utils.common:Setting env var: CONDA_PKGS_DIRS = /tmp/conda_pkgs_m5g9npb6.
WARNING: Setting build platform. This is only useful when pretending to be on another platform, such as for rendering necessary dependencies on a non-native platform. I trust that you know what you're doing.
INFO:pbpcli.utils.common:Unsetting env var: CONDA_OVERRIDE_OSX
INFO:pbpcli.utils.common:Unsetting env var: CONDA_PKGS_DIRS
INFO:pbpcli.utils.expand_variants:Elapsed time for api.render: 35.65 seconds
INFO:pbpcli.utils.common:Unsetting env var: CONDA_SUBDIR
INFO:pbpcli.utils.common:Setting env var: CONDA_SUBDIR = win-64.
INFO:pbpcli.utils.expand_variants:Elapsed time for get_package_variants: 0.11 seconds
INFO:pbpcli.utils.expand_variants:Matrix vars: 3 unchanging vars:(481), changing vars (3): ['blas_impl', 'cuda_compiler_version', 'freethreading']
INFO:pbpcli.utils.expand_variants:Elapsed time for preparation for render: 0.00 seconds
INFO:pbpcli.utils.common:Setting env var: CONDA_OVERRIDE_WIN = 10.0.17763.
INFO:pbpcli.utils.common:Setting env var: CONDA_PKGS_DIRS = /tmp/conda_pkgs_9fslpifr.
/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/environ.py:547: UserWarning: The environment variable 'PY_INTERP_DEBUG' is being passed through with value 'no'. If you are splitting build and test phases with --no-test, please ensure that this value is also set similarly at test time.
warnings.warn(
INFO:pbpcli.utils.common:Unsetting env var: CONDA_OVERRIDE_WIN
INFO:pbpcli.utils.common:Unsetting env var: CONDA_PKGS_DIRS
INFO:pbpcli.utils.common:Unsetting env var: CONDA_SUBDIR
INFO:pbpcli.utils.common:Unsetting env var: ANACONDA_ROCKET_ENABLE_PY315
Traceback (most recent call last):
File "/opt/conda/envs/webhook-listener/bin/pbp", line 10, in
sys.exit(cli())
~~~^^
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/click/core.py", line 1524, in call
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/click/core.py", line 1445, in main
rv = self.invoke(ctx)
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/click/core.py", line 1912, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/click/core.py", line 1912, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/click/core.py", line 1308, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/click/core.py", line 877, in invoke
return callback(*args, **kwargs)
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/pbpcli/cli/generate.py", line 351, in wrapper
return func(*args, **kwargs)
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/pbpcli/cli/generate.py", line 629, in from_feedstock
build_configs, test_configs = expand_build_matrix(
~~~~~~~~~~~~~~~~~~~^
feedstock.recipe_dir_path, src_channels, parsed_user_variants
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/pbpcli/cli/generate.py", line 99, in expand_build_matrix
_targets, build_configs, test_configs = variants_for_feedstock_and_platform(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
recipe_dir_path, platform, src_channels, user_variants
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/pbpcli/utils/expand_variants.py", line 672, in variants_for_feedstock_and_platform
metadata_tuples = api.render(
parsed.recipe,
...<2 lines>...
variants=user_variants,
)
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/api.py", line 99, in render
return render_metadata_tuples(
metadata_tuples,
...<3 lines>...
bypass_env_check=bypass_env_check,
)
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/render.py", line 1133, in render_metadata_tuples
for od, om in meta.get_output_metadata_set(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
permit_unsatisfiable_variants=permit_unsatisfiable_variants,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
permit_undefined_jinja=not finalize,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
bypass_env_check=bypass_env_check,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/opt/conda/envs/webhook-listener/lib/python3.13/site-packages/conda_build/metadata.py", line 2719, in get_output_metadata_set
k: out_metadata.config.variant[k]
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
KeyError: 'build_type'
'
aws lambda request id: 40754b27-551a-5744-af69-2809a93ccdd8
View in Grafana

@skupr-anaconda skupr-anaconda self-assigned this Sep 24, 2026
PBP graph-submitter died with KeyError: build_type on win-64 when
debug was selected # [not win]. Keep build_type defined and skip win
so this dest stays unix Py_DEBUG only.
Debug pyexpat NEEDs libexpat, but host only listed expat (no
run_exports). Overlinking failed on all unix debug variants.
Ship python315_d.lib, python3_d.lib, and _tkinter_d.lib on this
debug-only dest. build_base.bat already passes -d; drop skip win
and assert the import libs plus gettotalrefcount.
@skupr-anaconda skupr-anaconda changed the title PKG-2624 — Unix Py_DEBUG spike (stacked on #256) PKG-2624 - Py_DEBUG spike (stacked on #256) Sep 24, 2026
Host libexpat did not flow into the python output run reqs, so debug
pyexpat still failed overlinking on unix and win-64.
PCbuild -d does not NEEDED release ucrt/vc14_runtime, so
--error-overdepending failed both win-64 variants.
FT debug never copied python3.15t_d.exe to python.exe, so compileall
died. venv looks for unsuffixed venvlauncher.exe. Point win CMake
tests at PREFIX so FindPython does not pick 3.14.
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
Debug packages ship python3_d.lib / python315_d.lib, not python3.lib.
Point win CMake at PREFIX python.exe so FindPython does not pick 3.14.
Mis-indented if-not-exist lines were concatenated so cmd saw a
leading dash. CMakeLists overwrote -DPython_FIND_ABI, so Embed
looked for release import libs.
conda-build joined the jinja if-not-exist block into one cmd with a
leading dash. FT debug needs _tkintert_d.lib. Pass Python_INCLUDE_DIR
so win CMake Development.Embed can see include/python.
Nine-space list items nested under the previous command, so linux
glued two test ! -f lines (test: too many arguments) and win glued
if-not-exist into a leading dash.
Resolve #258 vs #256. Drop libexpat pins (expat-feedstock#31). Skip
win debug CMake FindPython. Assert _tkinter_d.lib for GIL and FT.
Merge c10dd05 left a 3-space list marker, so conda-build yamlize
failed (did not find expected '-' indicator) and PBP could not
submit the graph.
PBP aarch64 hit HTTP 403 on conda.anaconda.org/main while creating
python-bin. Use build-env python>=3.11. FT debug has no _tkinter_d.lib.
python -m venv on win-64 debug FT looks for venvlaunchert.exe because
the staged interpreter is python.exe (no _d suffix). Copy the debug
PCbuild launcher to the thread-only name as well as THREAD+_D.
skupr-anaconda added a commit that referenced this pull request Sep 28, 2026
Debug builds are exclusive to python-feedstock#258 / PKG-2624.

Refs: PKG-15601
skupr-anaconda added a commit that referenced this pull request Sep 28, 2026
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
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.

2 participants