Skip to content

scalene: Add version 2.3.0 - #2343

Open
luhenry wants to merge 4 commits into
mainfrom
scalene
Open

luhenry wants to merge 4 commits into
mainfrom
scalene

Conversation

@luhenry

@luhenry luhenry commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Compiles the libscalene.so malloc interposer (Heap-Layers), the pywhere/get_line_atomic extensions and a libunwind-based native stack unwinder. Upstream publishes no riscv64 wheel.

Mirrors upstream's build-and-upload.yml and tests.yml.

Differs from upstream

  • Heap-Layers pinned to the commit the released sdist ships - make vendor-deps clones HEAD, which has moved since.

Matrix: cp312/cp313/cp314 - upstream ships no free-threaded wheel.

Testing

  • tensorflow/jax (test extra) dropped - no riscv64 wheels; their tests skip.
  • 4 test_combined_stacks_gui tests deselected - they read the TypeScript sources from the checkout.
  • test_native_stacks gets the wheel's site-packages on PYTHONPATH - it re-runs sys._base_executable, outside the test venv.
  • test_coverup_30.py::test_scalene_cpu_count deselected - it starts a profiler in-process that wraps sys.executable for every later test, so all memory tests skip (x86_64 too) and subprocess tests overrun their timeouts on riscv64.
  • test/test_timers.py ignored - a demo script with no tests whose import leaves a 1 s SIGALRM timer running; it kills pytest during the slower riscv64 shutdown (exit 142).
  • test_core_utilization_within_bounds_under_blas_load deselected - its BLAS workload overruns the fixed 300 s timeout on the runner.
  • test_memory_stacks_split_across_two_callers deselected - one of three memory samples lands on make_small's def line instead of the allocator's; the other two bigmem tests pass.

License: Wheel compiles in libunwind (MIT), printf (MIT) and Heap-Layers (Apache-2.0); upstream ships no licence text for them, so the build adds it.

Patches

  • 0001-Allow-memory-profiling-on-riscv64.patch - To upstream. A Python arch allowlist silently disables --memory on riscv64, failing every memory test; reproduces on x86 by dropping x86_64 from the list.

luhenry added a commit that referenced this pull request Sep 25, 2026
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://riseproject-dev.github.io/python-wheels/pr-preview/pr-2343/

Built to branch gh-pages at 2026-09-26 04:14 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@luhenry
luhenry force-pushed the scalene branch 2 times, most recently from 041925f to 9130a38 Compare September 26, 2026 00:39
Build scalene from the v2.3.0 checkout with cibuildwheel, mirroring
upstream's build-and-upload job (make vendor-deps, then a setuptools
wheel repaired by auditwheel) and running upstream's tests.yml suite
plus the free-threaded parity script against the built wheel.

- Pin Heap-Layers to the commit the released sdist ships instead of
  the HEAD `make vendor-deps` would clone.
- Stage the licences of libunwind, printf and Heap-Layers, which are
  compiled into the wheel, and assert them from the test command.
- Patch the pure-Python architecture allowlist that otherwise turns
  memory profiling off on riscv64.
- Run test_coverup_30.py::test_scalene_cpu_count in its own session:
  it constructs the profiler in-process, which leaves sys.executable
  wrapped in a scalene launcher for the rest of the session. Every later
  memory test then skips (on x86_64 too) and the scalene-subprocess
  tests overrun their fixed timeouts on riscv64.

This branch has not been deployed

No deployments
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.

1 participant