Skip to content

Maintenance overhaul: Python 3.14 support, drop 3.10, add IndexBinaryOp#571

Merged
jim22k merged 14 commits into
python-graphblas:mainfrom
eriknw:py3.14
Apr 22, 2026
Merged

Maintenance overhaul: Python 3.14 support, drop 3.10, add IndexBinaryOp#571
jim22k merged 14 commits into
python-graphblas:mainfrom
eriknw:py3.14

Conversation

@eriknw
Copy link
Copy Markdown
Member

@eriknw eriknw commented Mar 28, 2026

Python version support:

  • Add Python 3.14, drop 3.10 (minimum now 3.11)
  • Update numba guards to python_version<'3.15' in pyproject.toml
  • Update all tool target-versions (black, ruff, pylint, pyupgrade)

New feature:

  • Add IndexBinaryOp: user-defined f(x,ix,jx,y,iy,jy,theta)->z operators that bind theta to produce BinaryOps for use in ewise operations (requires SuiteSparse:GraphBLAS >=9.4, guarded with hasattr)

Packaging modernization:

  • PEP 639: license = "Apache-2.0" with license-files
  • Bump setuptools >=77, numpy >=1.24, numba >=0.57
  • Remove suitesparse-graphblas <10 upper bound (support psg 10.x)
  • Deprecate fast_matrix_market (no longer maintained)

CI updates:

  • Standardize all GitHub Actions to latest (checkout v6, setup-python v6, choose-random-action v4.1, pypi-publish v1.13)
  • Add psg 10.x versions (10.0.1, 10.1.1, 10.3.1) to CI test matrix
  • Fix graphblas C library constraint (remove <9.5 cap)
  • Fix numba+numpy2 : numba >=0.62 now tested with numpy 2.x
  • Split numba version overrides: 0.61+ for py3.13, 0.63+ for py3.14
  • Update pre-commit hooks, flake8-bugbear, flake8-simplify
  • Remove stale warning filters, update dependency version ranges

Multi-version SuiteSparse:GraphBLAS support:

  • Handle GPU_ID->GPU_IDS rename in SS:GraphBLAS 10.2+ with hasattr guards
  • Remove awkward v1 dead code, fix XXX error messages, update copyright
  • Clean up stale MAINT comments and documentation references

Python version support:
- Add Python 3.14, drop 3.10 (minimum now 3.11)
- Update numba guards to python_version<'3.15' in pyproject.toml
- Update all tool target-versions (black, ruff, pylint, pyupgrade)

New feature:
- Add IndexBinaryOp: user-defined f(x,ix,jx,y,iy,jy,theta)->z operators
  that bind theta to produce BinaryOps for use in ewise operations
  (requires SuiteSparse:GraphBLAS >=9.4, guarded with hasattr)

Packaging modernization:
- PEP 639: license = "Apache-2.0" with license-files
- Bump setuptools >=77, numpy >=1.24, numba >=0.57
- Remove suitesparse-graphblas <10 upper bound (support psg 10.x)
- Deprecate fast_matrix_market (no longer maintained)

CI updates:
- Standardize all GitHub Actions to latest (checkout v6, setup-python v6,
  choose-random-action v4.1, pypi-publish v1.13)
- Add psg 10.x versions (10.0.1, 10.1.1, 10.3.1) to CI test matrix
- Fix graphblas C library constraint (remove <9.5 cap)
- Fix numba+numpy2 : numba >=0.62 now tested with numpy 2.x
- Split numba version overrides: 0.61+ for py3.13, 0.63+ for py3.14
- Update pre-commit hooks, flake8-bugbear, flake8-simplify
- Remove stale warning filters, update dependency version ranges

Multi-version SuiteSparse:GraphBLAS support:
- Handle GPU_ID->GPU_IDS rename in SS:GraphBLAS 10.2+ with hasattr guards
- Remove awkward v1 dead code, fix XXX error messages, update copyright
- Clean up stale MAINT comments and documentation references
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 85.89147% with 91 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.66%. Comparing base (522b696) to head (97ed1f5).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #571      +/-   ##
==========================================
- Coverage   99.13%   98.66%   -0.48%     
==========================================
  Files          93       98       +5     
  Lines       21855    22470     +615     
  Branches     4130     2730    -1400     
==========================================
+ Hits        21667    22169     +502     
- Misses        121      221     +100     
- Partials       67       80      +13     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

eriknw added 13 commits March 28, 2026 12:59
JIT:
- Fix JIT tests by auto-detecting conda compiler from $CONDA_PREFIX/bin/
  and stripping build-time -isysroot and -fdebug-prefix-map flags
- Replace ~70 lines of hardcoded per-platform JIT config with generic
  _fix_jit_config() that works on all platforms
- Tests now pytest.skip() when JIT unavailable (previously passed silently)
- Add scripts/jit_diagnostics.py for CI debugging

CI (test_and_build.yml):
- Restructure dependency version selection: pick numpy first, then
  choose other deps based on numpy 1.x vs 2.x, then apply constraints
- Remove psg 9.4.5 from Python 3.14 (no conda builds)
- Fix numba 0.63 + numpy 2.4 incompatibility (require numba 0.64)
- Remove suitesparse extras <10 cap in pyproject.toml
- Add psg 10.x versions to all test paths
- Add `# pragma: is_grbscalar` to IndexBinaryOp theta scalar creation
  so bizarro scalars sed doesn't break GxB_BinaryOp_new_IndexOp (requires
  GrB_Scalar, not C scalar)
- Add burble and error log capture to JIT diagnostic script to reveal
  the actual compiler command and error on macOS ARM (still failing)
- Add more compiler fallback candidates (clang, gcc) in _fix_jit_config
…filter

JIT:
- Replace -isysroot with local macOS SDK via `xcrun --show-sdk-path`
  instead of stripping it (conda cross-compiler needs a sysroot)
- Move subprocess import to module level

CI dependency constraints:
- Add numpy 2.3+/scipy constraint (scipy <1.15.1 needs numpy <2.3)
- Move numba/numpy 2.4 constraint to be Python-version-independent
- Move upstream numpy override before dep selection to prevent stale
  scipy/pandas/awkward versions being chosen for numpy 1.x then
  overridden to numpy 2.x

Warning filter:
- Restore np.find_common_type deprecation filter (needed for numpy 1.25
  with older scipy/networkx)
…g compilers

- Only replace the JIT compiler path if the default doesn't exist;
  some psg builds use /usr/bin/cc which already works
- Add a probe compilation after fixing config: if JIT compilation
  fails for any reason (wrong flags, missing libs), turn JIT off
  and let tests skip cleanly instead of failing
- Move upstream numpy override before dep selection to prevent
  stale scipy/pandas being chosen for numpy 1.x then overridden to 2.x
- Add scipy/numpy 2.3+ constraint (scipy <1.15.1 needs numpy <2.3)
- Make numba/numpy 2.4 constraint Python-version-independent
- Restore np.find_common_type deprecation warning filter
- Add macos-15-intel and ubuntu-24.04-arm to CI test matrix
…ith comments explaining each case

Fix JIT: three-way probe result, sysconfig won't override failed probe

- _fix_jit_config returns True/False/None: working, probe-failed, no-conda
- Fixture uses single try/yield/finally with clear three-way branch
- When probe fails (False), JIT stays off — sysconfig won't retry
- Sysconfig path only runs when there's no conda env (None)
- Add pandas 3.0 requires numba >=0.60 constraint
- Add macos-15-intel and ubuntu-24.04-arm to CI matrix
- Stress testing in CI
- Deprecation warning now fires on engine="auto" when fast_matrix_market
  is installed (previously only warned on explicit engine="fmm")
…Python

IndexBinaryOp ss namespace:
- Create core/ss/indexbinary.py with JIT register_new() for C-string
  compilation via GxB_IndexBinaryOp_new, matching the indexunary pattern
- Update indexbinary/ss.py to import register_new (was empty stub)
- Add test_jit_indexbinary to test_ssjit.py (theta binding, mixed types,
  nested names, duplicate registration)
- Verify indexbinary.ss.register_new exists in test_dir_and_module

CI dependency version selection:
- Replace ~190 lines of cascading bash if/elif with a Python script
  (scripts/ci_pick_versions.py) that declares version pools and
  constraints, with a built-in stress test (160k combos, 0 failures)
- Workflow calls eval "$(python scripts/ci_pick_versions.py ...)"
- Also fixes scipy >=1.15 + numpy <1.26 incompatibility
@jim22k jim22k merged commit c726047 into python-graphblas:main Apr 22, 2026
18 checks passed
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