Skip to content

Commit ff0a735

Browse files
committed
support python311
1 parent e48ea5e commit ff0a735

File tree

15 files changed

+391
-96
lines changed

15 files changed

+391
-96
lines changed

.github/workflows/ci-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ jobs:
3535
fail-fast: false
3636
matrix:
3737
os: ["ubuntu-latest"]
38-
python-version: ["3.10"]
38+
python-version: ["3.11"]
3939
session: ["doctest", "gallery", "linkcheck"]
4040
include:
41+
- os: "ubuntu-latest"
42+
python-version: "3.11"
43+
session: "tests"
44+
coverage: "--coverage"
4145
- os: "ubuntu-latest"
4246
python-version: "3.10"
4347
session: "tests"

.github/workflows/ci-wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
strategy:
5555
fail-fast: false
5656
matrix:
57-
python-version: ["3.8", "3.9", "3.10"]
57+
python-version: ["3.8", "3.9", "3.10", "3.11"]
5858
session: ["wheel"]
5959
env:
6060
ENV_NAME: "ci-wheels"

benchmarks/asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// * No build-time environment variables.
2020
// * Is run in the same environment as the ASV install itself.
2121
"delegated_env_commands": [
22-
"PY_VER=3.10 nox --envdir={conf_dir}/.asv/env/nox01 --session=tests --install-only --no-error-on-external-run --verbose"
22+
"PY_VER=3.11 nox --envdir={conf_dir}/.asv/env/nox01 --session=tests --install-only --no-error-on-external-run --verbose"
2323
],
2424
// The parent directory of the above environment.
2525
// The most recently modified environment in the directory will be used.

benchmarks/bm_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def _prep_data_gen_env() -> None:
6060
"""
6161

6262
root_dir = BENCHMARKS_DIR.parent
63-
python_version = "3.10"
63+
python_version = "3.11"
6464
data_gen_var = "DATA_GEN_PYTHON"
6565
if data_gen_var in environ:
6666
print("Using existing data generation environment.")

lib/iris/tests/test_coding_standards.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def test_python_versions():
7171
This test is designed to fail whenever Iris' supported Python versions are
7272
updated, insisting that versions are updated EVERYWHERE in-sync.
7373
"""
74-
latest_supported = "3.10"
75-
all_supported = ["3.8", "3.9", latest_supported]
74+
latest_supported = "3.11"
75+
all_supported = ["3.8", "3.9", "3.10", latest_supported]
7676

7777
root_dir = Path(__file__).parents[3]
7878
workflows_dir = root_dir / ".github" / "workflows"

lib/iris/tests/unit/experimental/ugrid/mesh/test_Connectivity.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
# importing anything else.
1010
import iris.tests as tests # isort:skip
1111

12+
import sys
1213
from xml.dom import minidom
1314

1415
import numpy as np
@@ -61,10 +62,14 @@ def test_indices(self):
6162

6263
def test_read_only(self):
6364
attributes = ("indices", "cf_role", "start_index", "location_axis")
65+
if sys.version_info.minor >= 11:
66+
msg = "object has no setter"
67+
else:
68+
msg = "can't set attribute"
6469
for attribute in attributes:
6570
self.assertRaisesRegex(
6671
AttributeError,
67-
"can't set attribute",
72+
msg,
6873
setattr,
6974
self.connectivity,
7075
attribute,

lib/iris/tests/unit/experimental/ugrid/mesh/test_MeshCoord.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import iris.tests as tests # isort:skip
1313

1414
import re
15+
import sys
1516
import unittest.mock as mock
1617

1718
import dask.array as da
@@ -77,8 +78,12 @@ def setUp(self):
7778
def test_fixed_metadata(self):
7879
# Check that you cannot set any of these on an existing MeshCoord.
7980
meshcoord = self.meshcoord
81+
if sys.version_info.minor >= 11:
82+
msg = "object has no setter"
83+
else:
84+
msg = "can't set"
8085
for prop in ("mesh", "location", "axis"):
81-
with self.assertRaisesRegex(AttributeError, "can't set"):
86+
with self.assertRaisesRegex(AttributeError, msg):
8287
setattr(meshcoord, prop, mock.sentinel.odd)
8388

8489
def test_coord_system(self):

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
nox.options.reuse_existing_virtualenvs = True
1717

1818
#: Python versions we can run sessions under
19-
_PY_VERSIONS_ALL = ["3.8", "3.9", "3.10"]
19+
_PY_VERSIONS_ALL = ["3.8", "3.9", "3.10", "3.11"]
2020
_PY_VERSION_LATEST = _PY_VERSIONS_ALL[-1]
2121

2222
#: One specific python version for docs builds

requirements/iris.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
py310.yml
1+
py311.yml

requirements/locks/py310-linux-64.lock

Lines changed: 13 additions & 28 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)