Skip to content

10.5.1.1

Latest

Choose a tag to compare

@eriknw eriknw released this 17 Oct 02:13
e23e85d

Highlights

  • Python 3.15: wheels for CPython 3.15 and free-threaded 3.15t (#157, #159)
  • WebAssembly wheels for Pyodide (PEP 783 pyemscripten, Python 3.13 and 3.14), so
    await micropip.install("suitesparse-graphblas") works in Pyodide 314 (Python 3.14) and
    0.29.4+ (Python 3.13), and in JupyterLite. GraphBLAS runs single-threaded there. (#158)
  • Memory-safety fixes: NumPy ≥ 2.5 allocates array data with a different allocator, so
    serialize_matrix/serialize_vector and binread could abort on free-threaded 3.15 or
    under PYTHONMALLOC=debug. Arrays that share memory with GraphBLAS now carry a NumPy
    memory handler (NEP 49) that matches the GraphBLAS allocator (including GraphBLAS ≥ 10.4
    memory arenas) that frees them. (#157)

suitesparse_graphblas.utils (#157)

  • New give_buffer(...): a context manager that hands an array's data to a GraphBLAS
    function that takes ownership (e.g. GxB_Matrix_pack_CSR, GxB_Vector_load). It copies
    when GraphBLAS can't own the data, and commits only if GraphBLAS actually took it.
  • New empty(...): allocates an array that GraphBLAS can always take ownership of.
  • New can_unclaim_buffer(array, arena=None).
  • claim_buffer and claim_buffer_2d take an optional arena argument.
  • Behavior change: unclaim_buffer now raises ValueError when GraphBLAS can't safely
    own the data: a view, a read-only array, an object dtype, or memory from another allocator
    (e.g. NumPy-allocated arrays with memory_manager="c", or a custom NumPy memory handler).
    Use give_buffer, or check can_unclaim_buffer first.

Other fixes

  • initialize() raises if GraphBLAS fails to initialize, instead of continuing silently. (#157)
  • binread allocates with GraphBLAS's allocator instead of libc malloc, and reads iso
    matrices correctly. binwrite restores the matrix if writing fails. (#157)

Platform and packaging changes

  • macOS arm64 wheels now require macOS 15 (previously 14), because GitHub is retiring
    its macOS 14 runners. (#159)
  • PyPy wheels now target PyPy 8.0 (pypy311_pp80). PyPy 7.3 can't install them and will
    build from the sdist. Windows PyPy wheels are no longer built. (#159)
  • Wheels no longer include build-only .c/.h sources, so they are smaller. (#158)
  • Releases are now published with PyPI Trusted Publishing instead of an API token. (#157)

Maintenance

cibuildwheel 4.3. GitHub Actions are pinned to commit SHAs with least-privilege permissions,
and actionlint/zizmor/pysentry checks were added. pytest is stricter (warnings are errors),
and new memory tests run under PYTHONMALLOC=debug. suitesparse.sh now stops at the first
failure and uses the CMake option names GraphBLAS honors (GRAPHBLAS_COMPACT,
GRAPHBLAS_JITINIT). (#157, #158, #159)