Skip to content

Bug/except - Fix exception propagation for numpy>=2.4#41

Merged
c-randall merged 3 commits into
mainfrom
bug/except
Jan 13, 2026
Merged

Bug/except - Fix exception propagation for numpy>=2.4#41
c-randall merged 3 commits into
mainfrom
bug/except

Conversation

@c-randall

Copy link
Copy Markdown
Collaborator

Description

The latest numpy 2.4 release broke the exception propagations. The new method relies on catching the exception and re-raising it when it occurs. The method works for all currently supported Python versions, but, when support for versions <3.12 is dropped we should move to using new C API for PyErr_GetRaisedException.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that improves speed/readability/etc.)
  • Bug fix (non-breaking change which fixes an issue)
  • Chore (any other clean up, maintenance, etc.)

Key checklist

  • No style issues: $ nox -s linter [-- format]
  • Code is free of misspellings: $ nox -s codespell [-- write]
  • All tests pass: $ nox -s tests
  • Badges are updated: $ nox -s badges

Further checks:

  • The documentation builds: $ nox -s docs.
  • Code is commented, particularly in hard-to-understand areas.
  • Tests are added that prove fix is effective or that feature works.

@c-randall c-randall merged commit 3398fa8 into main Jan 13, 2026
10 checks passed
@c-randall c-randall deleted the bug/except branch January 13, 2026 18:06
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