Skip to content

BUG: Add __array_api_version__ to numpy.array_api namespace#22368

Merged
charris merged 1 commit intonumpy:maintenance/1.23.xfrom
charris:backport-22365
Oct 2, 2022
Merged

BUG: Add __array_api_version__ to numpy.array_api namespace#22368
charris merged 1 commit intonumpy:maintenance/1.23.xfrom
charris:backport-22365

Conversation

@charris
Copy link
Copy Markdown
Member

@charris charris commented Oct 2, 2022

Backport of #22365.

The Array API has always required namespaces have a __array_api_version__ attribute (see Versioning), although we all missed it heh (hopefully we can make this more visible in the spec data-apis/array-api#480). This PR introduces such an attribute.

This also fixes the issue identified in #22357 (comment) where a Hypothesis update (6.55.0) broke CI, as it required using this (specified!) attribute when using hypothesis.extra.array_api.make_strategies_namespace(), like we do in

xps = make_strategies_namespace(xp)

This PR should mean this PR works on Hypothesis versions both before and after 6.55.0.

@charris charris added 00 - Bug 08 - Backport Used to tag backport PRs labels Oct 2, 2022
@charris charris added this to the 1.23.4 release milestone Oct 2, 2022
@charris charris merged commit dbbf06a into numpy:maintenance/1.23.x Oct 2, 2022
@charris charris deleted the backport-22365 branch October 2, 2022 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

00 - Bug 08 - Backport Used to tag backport PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants