Skip to content

release: v0.5.2 — restore JAX 0.11 compatibility - #139

Merged
chaoming0625 merged 1 commit into
mainfrom
worktree-release-0.5.2
Jul 22, 2026
Merged

release: v0.5.2 — restore JAX 0.11 compatibility#139
chaoming0625 merged 1 commit into
mainfrom
worktree-release-0.5.2

Conversation

@chaoming0625

@chaoming0625 chaoming0625 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Maintenance release bumping the version to 0.5.2. The public API is unchanged, so this is a drop-in upgrade from 0.5.1.

The release centers on restoring compatibility with JAX 0.11: the is_constant_dim helper used by saiunit.math.einsum was removed from the public jax.core namespace in JAX 0.11, and is now sourced through the version-aware saiunit._compatible_import shim.

Changes

Verification

  • mypy saiunit/ exits 0.
  • import saiunit; saiunit.__version__ == "0.5.2".

See changelog.md for the full Version 0.5.2 notes.

Summary by Sourcery

Release version 0.5.2 as a maintenance update restoring JAX 0.11 compatibility without changing the public API.

Enhancements:

  • Document restored JAX 0.11 compatibility and behavior of einsum via the version-aware compatibility shim in the changelog.

CI:

  • Update GitHub Actions versions for checkout and setup-python across CI, daily CI, publish, and docs workflows.

Documentation:

  • Add release notes for Version 0.5.2, outlining JAX compatibility changes, tooling updates, and CI workflow bumps.

Chores:

  • Bump the internal version to 0.5.2 to match the new release.

Maintenance release that restores compatibility with JAX 0.11.

- Source `is_constant_dim` through the version-aware `_compatible_import`
  shim (jax.core on JAX < 0.10, jax._src.core on JAX >= 0.10) and route
  `math.einsum` through it, fixing an AttributeError on JAX 0.11 (#135).
- Annotate the version-guarded `concrete_or_error` / `is_constant_dim`
  fallback imports and align the export test with `__all__`, unblocking
  the mypy type_check CI job (#138).
- Bump actions/checkout 6->7 (#134) and actions/setup-python 6->7 (#136).
@sourcery-ai

sourcery-ai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Maintenance release v0.5.2 that restores JAX 0.11 compatibility for saiunit.math.einsum via the compatibility shim, exposes is_constant_dim from the compatibility layer (with a JAX-less stub), updates typing and tests around the shim, and bumps CI GitHub Action versions.

Sequence diagram for einsum using the compatibility shim for is_constant_dim

sequenceDiagram
  actor User
  participant einsum as saiunit.math.einsum
  participant compat as saiunit._compatible_import.is_constant_dim
  participant jax_core as jax.core.is_constant_dim
  participant jax_src_core as jax._src.core.is_constant_dim
  participant require_jax

  User->>einsum: call einsum(...)
  einsum->>compat: is_constant_dim(dim)

  alt JAX_installed_and_version_<_0_10
    compat->>jax_core: is_constant_dim(dim)
    jax_core-->>compat: result
  else JAX_installed_and_version_>=_0_10
    compat->>jax_src_core: is_constant_dim(dim)
    jax_src_core-->>compat: result
  else JAX_not_installed
    compat->>require_jax: is_constant_dim(dim)
    require_jax-->>compat: raise ImportError
  end

  compat-->>einsum: result_or_error
  einsum-->>User: einsum_result_or_error
Loading

File-Level Changes

Change Details Files
Add 0.5.2 release notes documenting JAX 0.11 compatibility and tooling updates.
  • Document restoration of einsum compatibility via the compatibility shim and is_constant_dim handling.
  • Describe mypy and compatibility export test fixes in the tooling section.
  • Record CI workflow Action version bumps under continuous integration notes.
changelog.md
Bump the library version to 0.5.2.
  • Update the version string to 0.5.2.
  • Keep version_info derived from the updated version.
saiunit/_version.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@chaoming0625
chaoming0625 merged commit d7ee894 into main Jul 22, 2026
8 checks passed
@chaoming0625
chaoming0625 deleted the worktree-release-0.5.2 branch July 22, 2026 10:04
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