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
2 changes: 1 addition & 1 deletion .github/workflows/array-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

env:
PYTEST_ARGS: "-v -rxXfE --hypothesis-disable-deadline --max-examples 500 -n 4"
API_VERSIONS: "2023.12 2024.12"
API_VERSIONS: "2023.12 2024.12 2025.12"

jobs:
array-api-tests:
Expand Down
5 changes: 3 additions & 2 deletions array_api_strict/_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
"2022.12",
"2023.12",
"2024.12",
"2025.12",
)

draft_version = "2025.12"
draft_version = "2026.12"

API_VERSION = default_version = "2024.12"
API_VERSION = default_version = "2025.12"

BOOLEAN_INDEXING = True

Expand Down
10 changes: 5 additions & 5 deletions array_api_strict/tests/test_array_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,10 +669,10 @@ def test_array_keys_use_private_array():
def test_array_namespace():
a = ones((3, 3))
assert a.__array_namespace__() == array_api_strict
assert array_api_strict.__array_api_version__ == "2024.12"
assert array_api_strict.__array_api_version__ == "2025.12"

assert a.__array_namespace__(api_version=None) is array_api_strict
assert array_api_strict.__array_api_version__ == "2024.12"
assert array_api_strict.__array_api_version__ == "2025.12"

assert a.__array_namespace__(api_version="2022.12") is array_api_strict
assert array_api_strict.__array_api_version__ == "2022.12"
Expand All @@ -685,12 +685,12 @@ def test_array_namespace():
assert array_api_strict.__array_api_version__ == "2021.12"

with pytest.warns(UserWarning):
assert a.__array_namespace__(api_version="2025.12") is array_api_strict
assert array_api_strict.__array_api_version__ == "2025.12"
assert a.__array_namespace__(api_version="2026.12") is array_api_strict
assert array_api_strict.__array_api_version__ == "2026.12"


pytest.raises(ValueError, lambda: a.__array_namespace__(api_version="2021.11"))
pytest.raises(ValueError, lambda: a.__array_namespace__(api_version="2026.12"))
pytest.raises(ValueError, lambda: a.__array_namespace__(api_version="2027.12"))

def test_iter():
pytest.raises(TypeError, lambda: next(iter(asarray(3))))
Expand Down
22 changes: 11 additions & 11 deletions array_api_strict/tests/test_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def test_flag_defaults():
flags = get_array_api_strict_flags()
assert flags == {
'api_version': '2024.12',
'api_version': '2025.12',
'boolean_indexing': True,
'data_dependent_shapes': True,
'enabled_extensions': ('linalg', 'fft'),
Expand All @@ -36,7 +36,7 @@ def test_reset_flags():
reset_array_api_strict_flags()
flags = get_array_api_strict_flags()
assert flags == {
'api_version': '2024.12',
'api_version': '2025.12',
'boolean_indexing': True,
'data_dependent_shapes': True,
'enabled_extensions': ('linalg', 'fft'),
Expand All @@ -47,15 +47,15 @@ def test_setting_flags():
set_array_api_strict_flags(data_dependent_shapes=False)
flags = get_array_api_strict_flags()
assert flags == {
'api_version': '2024.12',
'api_version': '2025.12',
'boolean_indexing': True,
'data_dependent_shapes': False,
'enabled_extensions': ('linalg', 'fft'),
}
set_array_api_strict_flags(enabled_extensions=('fft',))
flags = get_array_api_strict_flags()
assert flags == {
'api_version': '2024.12',
'api_version': '2025.12',
'boolean_indexing': True,
'data_dependent_shapes': False,
'enabled_extensions': ('fft',),
Expand Down Expand Up @@ -109,15 +109,15 @@ def test_flags_api_version_2024_12():


def test_flags_api_version_2025_12():
# Make sure setting the version to 2025.12 issues a warning.
# Make sure setting the version to 2026.12 issues a warning.
with pytest.warns(UserWarning) as record:
set_array_api_strict_flags(api_version='2025.12')
set_array_api_strict_flags(api_version='2026.12')
assert len(record) == 1
assert '2025.12' in str(record[0].message)
assert '2026.12' in str(record[0].message)
assert 'draft' in str(record[0].message)
flags = get_array_api_strict_flags()
assert flags == {
'api_version': '2025.12',
'api_version': '2026.12',
'boolean_indexing': True,
'data_dependent_shapes': True,
'enabled_extensions': ('linalg', 'fft'),
Expand All @@ -136,7 +136,7 @@ def test_setting_flags_invalid():

def test_api_version():
# Test defaults
assert xp.__array_api_version__ == '2024.12'
assert xp.__array_api_version__ == '2025.12'

# Test setting the version
set_array_api_strict_flags(api_version='2023.12')
Expand Down Expand Up @@ -444,9 +444,9 @@ def test_environment_variables():
# ARRAY_API_STRICT_API_VERSION
('''\
import array_api_strict as xp
assert xp.__array_api_version__ == '2024.12'
assert xp.__array_api_version__ == '2025.12'
assert xp.get_array_api_strict_flags()['api_version'] == '2024.12'
assert xp.get_array_api_strict_flags()['api_version'] == '2025.12'
''', {}),
*[
Expand Down
Loading