Skip to content

pystack: Add version 1.7.1 - #2398

Merged
luhenry merged 4 commits into
mainfrom
pystack
Sep 28, 2026
Merged

luhenry merged 4 commits into
mainfrom
pystack

Conversation

@luhenry

@luhenry luhenry commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Compiles pystack's nanobind C++ extension against elfutils' libdw/libelf, built from source. Upstream publishes no riscv64 wheel.

Mirrors upstream's build_wheels.yml.

Differs from upstream

  • Builds from the tag checkout, not the sdist - same tree
  • No musllinux - upstream skips musl on non-x86_64 too
  • Wheel carries licence files for vendored elfutils and zstd

Matrix: cp312 (abi3, covers 3.12-3.14) and cp314t, matching upstream's wheel set.

Testing

  • Upstream's suite against the installed wheel on uv interpreters 3.12, 3.13, 3.14 and 3.14t, as its test_attaching_to_uv_interpreters job does
  • Distro-container jobs (alpine, fedora, arch, debian) and EOL-interpreter jobs dropped

License: Wheel bundles elfutils (LGPL-3.0-or-later OR GPL-2.0-or-later) and zstd (BSD-3-Clause OR GPL-2.0); upstream ships no licence text for them, so the build adds it and the release carries their sources.

Build the cp312-abi3 and cp314t riscv64 wheels with upstream's own
[tool.cibuildwheel] configuration, which compiles elfutils from source in
before-all, and run upstream's test suite against the installed wheels on
3.12, 3.13, 3.14 and 3.14t.
luhenry added a commit that referenced this pull request Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-28 21:39 UTC

The riscv64 runners have no /proc/sys/kernel/yama, so upstream's
ptrace_scope step failed before pytest ran. Resolve libelf against the
source-built copy in the licence sweep so the image's elfutils-libelf
package is not picked up.
CI (run 36351368476) had 28 identical test failures on Python 3.13,
3.14 and 3.14t while 3.12 passed clean. All 28 assert that pystack can
classify a native frame from a *target* process's own unwind as the
CPython eval loop or GC collector; on riscv64 that classification never
succeeds once the target interpreter is 3.13+, matching gotcha 33/169's
"identical failures on newer interpreters, clean on older" shape one
level removed (it's the target being inspected, not the one running
pytest). pystack itself only ships a signal-frame unwind fix for
AArch64 (elfutils-aarch64-signal-frame.patch, bloomberg/pystack
#341/#348) with no riscv64 equivalent, so this is a documented
per-arch native-unwind gap, not a defect in the wheel under test.

Deselect only the affected tests, generated once per matrix entry from
matrix.python_version so 3.12 keeps running the full suite unchanged.
See gotcha 597 (skills/python-project-porting).
luhenry added a commit that referenced this pull request Sep 28, 2026
Record the lesson from pystack 1.7.1's test failures (PR #2398): a
matrix over the *target* interpreter a tool inspects, not the one
running the tests, can show gotcha 33/169's identical-newer-fails shape
one level removed. See gotcha 602 for the full pystack case.
Gotcha 597's deselect list substituted matrix.python_version verbatim
into each node ID, which worked for every leg except 3.14t: CI (run
on PR #2398) still had 14 failures there (8 in test_core_analyzer.py,
6 in test_gather_stacks.py), all reporting python=3.14, not
python=3.14t.

With PYTHON_TEST_VERSION=auto, pystack's tests.utils builds the
parametrize ID from (sys.version_info[0], sys.version_info[1]), which
has no free-threading marker, so a free-threaded 3.14t interpreter
still produces the ID python=3.14. The job's own name (3.14t) and the
pytest node ID it actually generates (3.14) diverge, so the deselect
list built from the raw matrix value never matched on that leg and
the affected tests ran, and failed, unguarded.

Strip the trailing "t" from the substituted version before building
node IDs; every other leg is unaffected since only a *t interpreter
name has the mismatch.
@luhenry
luhenry marked this pull request as ready for review September 28, 2026 21:27
@luhenry
luhenry merged commit f66a7c9 into main Sep 28, 2026
15 checks passed
@luhenry
luhenry deleted the pystack branch September 28, 2026 21:27
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