Skip to content

Fix pytest.approx regression with JAX arrays - #15285

Merged
bluetech merged 7 commits into
pytest-dev:mainfrom
gerlero:fix-15284
Oct 30, 2026
Merged

bluetech merged 7 commits into
pytest-dev:mainfrom
gerlero:fix-15284

Conversation

@gerlero

@gerlero gerlero commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Closes #15284.

For simplicity, I've decided to just catch the NotImplementedError raised by jax.Array when trying to access .flat; other implementations are possible but they would change the logic/heuristic for other types too.

@pyba-chronographer pyba-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Oct 28, 2026

@bluetech bluetech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@bluetech bluetech added the backport 9.2.x backport this PR to 9.2.x branch label Oct 29, 2026
@bluetech
bluetech merged commit 4b3bb3c into pytest-dev:main Oct 30, 2026
37 checks passed
@patchback

patchback Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Backport to 9.2.x: 💚 backport PR created

✅ Backport PR branch: patchback/backports/9.2.x/4b3bb3cca4bb53ffe38473b7f29d832d42a4177b/pr-15285

Backported as #15301

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

bluetech added a commit that referenced this pull request Oct 30, 2026
Fix `pytest.approx` regression with JAX arrays

(cherry picked from commit 4b3bb3c)
bluetech added a commit that referenced this pull request Oct 30, 2026
…b3bb3cca4bb53ffe38473b7f29d832d42a4177b/pr-15285

[PR #15285/4b3bb3cc backport][9.2.x] Fix `pytest.approx` regression with JAX arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 9.2.x backport this PR to 9.2.x branch bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pytest.approx: 9.2.0 broke compatibility with JAX arrays

2 participants