From a582d26dc0df169e6bb5a39187bc0a11e2cbd3ac Mon Sep 17 00:00:00 2001 From: Aaron Zielstorff Date: Sun, 8 Nov 2026 12:55:59 +0100 Subject: [PATCH 1/2] Pin CI runner for Python 3.9 --- .github/workflows/ci.yml | 9 ++++++--- .github/workflows/publish-to-pypi.yml | 2 +- dev/pyproject.toml | 9 ++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 815dd76..0cee564 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,10 @@ on: jobs: Only-test: - runs-on: ubuntu-latest + # NOTE (aaronzi, 2026-11-05): + # ubuntu-latest (26.04) does not provide Python 3.9 anymore, so we pin + # the runner to keep testing all the Python versions we support. + runs-on: ubuntu-24.04 strategy: matrix: python-version: ['3.9', '3.10', '3.11', '3.12'] @@ -18,7 +21,7 @@ jobs: - uses: actions/checkout@master - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} @@ -54,7 +57,7 @@ jobs: - uses: actions/checkout@master - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index b2dbbb7..55f89cf 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: '3.x' diff --git a/dev/pyproject.toml b/dev/pyproject.toml index a6f0bfc..185f0fe 100644 --- a/dev/pyproject.toml +++ b/dev/pyproject.toml @@ -9,16 +9,19 @@ description = "Develop aas-core3.2-python." requires-python = ">=3.8" dependencies = [ - "black==26.10.1", + # NOTE (aaronzi, 2026-11-05): + # black, mypy and aas-core-codegen require Python 3.10 or newer, so we skip + # them on 3.9, where we only run the tests. + "black==26.10.1; python_version>='3.10'", "coverage>=6.5.0,<7", - "mypy==2.4.0", + "mypy==2.4.0; python_version>='3.10'", "pyinstaller>=5,<6", "ruff==0.17.2", "tomli; python_version<'3.11'", "twine", "requests==2.32.4", "types-requests==2.32.4.20250913", - "aas-core-codegen==0.0.27rc5" + "aas-core-codegen==0.0.27rc5; python_version>='3.10'" ] [tool.setuptools] From 9aba29d8de679c0552e20bad9147ce0b85974096 Mon Sep 17 00:00:00 2001 From: Aaron Zielstorff Date: Sun, 8 Nov 2026 12:59:44 +0100 Subject: [PATCH 2/2] Install icontract explicitly for the dev scripts --- dev/pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev/pyproject.toml b/dev/pyproject.toml index 185f0fe..94e5840 100644 --- a/dev/pyproject.toml +++ b/dev/pyproject.toml @@ -14,6 +14,10 @@ dependencies = [ # them on 3.9, where we only run the tests. "black==26.10.1; python_version>='3.10'", "coverage>=6.5.0,<7", + # NOTE (aaronzi, 2026-11-05): + # The dev scripts import icontract directly. It used to come in through + # aas-core-codegen, which we skip on Python 3.9. + "icontract", "mypy==2.4.0; python_version>='3.10'", "pyinstaller>=5,<6", "ruff==0.17.2",