Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions array_api_compat/common/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
| SupportsArrayNamespace[Any]
)

_API_VERSIONS_OLD: Final = frozenset({"2021.12", "2022.12", "2023.12"})
_API_VERSIONS: Final = _API_VERSIONS_OLD | frozenset({"2024.12"})
_API_VERSIONS_OLD: Final = frozenset({"2021.12", "2022.12", "2023.12", "2024.12"})
_API_VERSIONS: Final = _API_VERSIONS_OLD | frozenset({"2025.12"})


@lru_cache(100)
Expand Down Expand Up @@ -485,11 +485,11 @@ def is_array_api_strict_namespace(xp: Namespace) -> bool:
def _check_api_version(api_version: str | None) -> None:
if api_version in _API_VERSIONS_OLD:
warnings.warn(
f"The {api_version} version of the array API specification was requested but the returned namespace is actually version 2024.12"
f"The {api_version} version of the array API specification was requested but the returned namespace is actually version 2025.12"
)
elif api_version is not None and api_version not in _API_VERSIONS:
raise ValueError(
"Only the 2024.12 version of the array API specification is currently supported"
"Only the 2025.12 version of the array API specification is currently supported"
)


Expand Down Expand Up @@ -589,7 +589,7 @@ def array_namespace(
api_version: str
The newest version of the spec that you need support for (currently
the compat library wrapped APIs support v2024.12).
the compat library wrapped APIs support v2025.12).
use_compat: bool or None
If None (the default), the native namespace will be returned if it is
Expand Down
2 changes: 1 addition & 1 deletion array_api_compat/cupy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
__import__(__package__ + '.linalg')
__import__(__package__ + '.fft')

__array_api_version__: Final = '2024.12'
__array_api_version__: Final = '2025.12'

__all__ = sorted(
{name for name in globals() if not name.startswith("__")}
Expand Down
2 changes: 1 addition & 1 deletion array_api_compat/dask/array/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from ._aliases import * # type: ignore[assignment] # noqa: F403
from ._info import __array_namespace_info__ # noqa: F401

__array_api_version__: Final = "2024.12"
__array_api_version__: Final = "2025.12"
del Final

# See the comment in the numpy __init__.py
Expand Down
2 changes: 1 addition & 1 deletion array_api_compat/numpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

from .linalg import matrix_transpose, vecdot # type: ignore[no-redef] # noqa: F401

__array_api_version__: Final = "2024.12"
__array_api_version__: Final = "2025.12"
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

This version bump is incomplete. The file array_api_compat/common/_helpers.py also needs to be updated to reference 2025.12 instead of 2024.12 in several places:

  1. Line 59: _API_VERSIONS should include "2025.12" instead of "2024.12"
  2. Line 488: Warning message text references "2024.12"
  3. Line 492: Error message says "Only the 2024.12 version..."
  4. Line 592: Documentation comment says "v2024.12"

Without updating these references, the wrapped libraries will report version 2025.12 but the array_namespace function will not accept this version as valid, causing runtime errors.

Suggested change
__array_api_version__: Final = "2025.12"
__array_api_version__: Final = "2024.12"

Copilot uses AI. Check for mistakes.

__all__ = sorted(
set(__all__)
Expand Down
2 changes: 1 addition & 1 deletion array_api_compat/torch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
__import__(__package__ + '.linalg')
__import__(__package__ + '.fft')

__array_api_version__: Final = '2024.12'
__array_api_version__: Final = '2025.12'

__all__ = sorted(
set(__all__)
Expand Down
2 changes: 1 addition & 1 deletion test_cupy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ mkdir -p $SCRIPT_DIR/.hypothesis
ln -s $SCRIPT_DIR/.hypothesis .hypothesis

export ARRAY_API_TESTS_MODULE=array_api_compat.cupy
export ARRAY_API_TESTS_VERSION=2024.12
export ARRAY_API_TESTS_VERSION=2025.12
pytest array_api_tests/ ${PYTEST_ARGS} --xfails-file $SCRIPT_DIR/cupy-xfails.txt "$@"
Loading