Skip to content

Support Python 3.10 and fix typeguard coverage of JAX trace paths#22

Merged
sm00thix merged 1 commit into
mainfrom
support-python-3.10
Jul 6, 2026
Merged

Support Python 3.10 and fix typeguard coverage of JAX trace paths#22
sm00thix merged 1 commit into
mainfrom
support-python-3.10

Conversation

@sm00thix

@sm00thix sm00thix commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Lower the minimum supported Python version from 3.11 to 3.10 (requires-python = ">=3.10, <3.15") and add 3.10 to the CI test matrices. The code base uses no 3.11-only features, so this only broadens compatibility for downstream packages that still support Python 3.10. On 3.10 the resolver selects compatible older wheels (e.g. numpy 2.2.x, jaxlib 0.6.x); the full test suite passes on 3.10 with and without the JAX extra.

Also fix runtime type checking of the JAX trace paths:

  • Annotate the fold-index parameters (validation_indices/val_indices) with a new IndexArray alias that enable_jax_typing() broadens to admit jax.Array, matching the Array/Scalar aliases from 3.2.1. They were previously annotated npt.NDArray[np.int] only, so the jax.jit/jax.vmap trace tests failed under typeguard (the indices are abstract tracers under tracing). Runtime behavior is unchanged.

  • Enable typeguard for real in CI: the test command passed --typeguard-packages=cvmatrix/ (a path with a trailing slash), which silently instruments nothing and masked the annotation issue. It now passes the package name, cvmatrix.

….2.2)

Lower the minimum supported Python version from 3.11 to 3.10
(requires-python = ">=3.10, <3.15") and add 3.10 to the CI test
matrices. The code base uses no 3.11-only features, so this only
broadens compatibility for downstream packages that still support
Python 3.10. On 3.10 the resolver selects compatible older wheels
(e.g. numpy 2.2.x, jaxlib 0.6.x); the full test suite passes on 3.10
with and without the JAX extra.

Also fix runtime type checking of the JAX trace paths:

- Annotate the fold-index parameters (validation_indices/val_indices)
  with a new IndexArray alias that _enable_jax_typing() broadens to
  admit jax.Array, matching the Array/Scalar aliases from 3.2.1. They
  were previously annotated npt.NDArray[np.int_] only, so the
  jax.jit/jax.vmap trace tests failed under typeguard (the indices are
  abstract tracers under tracing). Runtime behavior is unchanged.
- Enable typeguard for real in CI: the test command passed
  --typeguard-packages=cvmatrix/ (a path with a trailing slash), which
  silently instruments nothing and masked the annotation issue. It now
  passes the package name, cvmatrix.
@sm00thix
sm00thix merged commit b556e9e into main Jul 6, 2026
54 checks passed
@sm00thix
sm00thix deleted the support-python-3.10 branch July 6, 2026 14:19
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