From e330083af5295bf84aa79e94e051d078627e4916 Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Thu, 24 Aug 2023 17:57:01 +0200 Subject: [PATCH 1/3] crossbar-requirements: add Python 3.12 compatible requirements eth-utils<2.3.0 required to circumvent the following error: Traceback (most recent call last): File "/home/runner/work/labgrid/labgrid/crossbar-venv/bin/crossbar", line 5, in from crossbar import run File "/home/runner/work/labgrid/labgrid/crossbar-venv/lib/python3.12/site-packages/crossbar/__init__.py", line 19, in import eth_abi File "/home/runner/work/labgrid/labgrid/crossbar-venv/lib/python3.12/site-packages/eth_abi/__init__.py", line 15, in from eth_abi.abi import ( # NOQA File "/home/runner/work/labgrid/labgrid/crossbar-venv/lib/python3.12/site-packages/eth_abi/abi.py", line 1, in from eth_abi.codec import ( File "/home/runner/work/labgrid/labgrid/crossbar-venv/lib/python3.12/site-packages/eth_abi/codec.py", line 12, in from eth_abi.decoding import ( File "/home/runner/work/labgrid/labgrid/crossbar-venv/lib/python3.12/site-packages/eth_abi/decoding.py", line 8, in from eth_utils import ( File "/home/runner/work/labgrid/labgrid/crossbar-venv/lib/python3.12/site-packages/eth_utils/__init__.py", line 86, in from .network import ( File "/home/runner/work/labgrid/labgrid/crossbar-venv/lib/python3.12/site-packages/eth_utils/network.py", line 7, in from eth_typing import ChainId ImportError: cannot import name 'ChainId' from 'eth_typing' (/home/runner/work/labgrid/labgrid/crossbar-venv/lib/python3.12/site-packages/eth_typing/__init__.py) Signed-off-by: Bastian Krause --- crossbar-requirements.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crossbar-requirements.txt b/crossbar-requirements.txt index d361d83d9..6ccc716f1 100644 --- a/crossbar-requirements.txt +++ b/crossbar-requirements.txt @@ -1,2 +1,5 @@ -crossbar==21.3.1 -autobahn<=22.4.1 +crossbar==21.3.1; python_version<"3.9" +# includes https://github.com/crossbario/crossbar/pull/2091 +crossbar @ git+https://github.com/Bastian-Krause/crossbar@bst/python3.12; python_version>="3.9" +autobahn==22.4.1; python_version<"3.9" +eth-utils<2.3.0 From dd0892dd1ed44aa9659ab6b47407ab8618e3bada Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Thu, 24 Aug 2023 17:58:37 +0200 Subject: [PATCH 2/3] github/workflows: test Python 3.12 Signed-off-by: Bastian Krause --- .github/workflows/build-and-release.yml | 2 +- .github/workflows/push-pr-unit-tests.yml | 2 +- .github/workflows/scheduled-unit-tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 2edeb4cf0..628e36712 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.12" - name: Install python dependencies run: | python -m pip install --upgrade pip build diff --git a/.github/workflows/push-pr-unit-tests.yml b/.github/workflows/push-pr-unit-tests.yml index 8477cd113..4eb35620d 100644 --- a/.github/workflows/push-pr-unit-tests.yml +++ b/.github/workflows/push-pr-unit-tests.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] uses: ./.github/workflows/reusable-unit-tests.yml with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/scheduled-unit-tests.yml b/.github/workflows/scheduled-unit-tests.yml index faadf9cc7..096e7aee6 100644 --- a/.github/workflows/scheduled-unit-tests.yml +++ b/.github/workflows/scheduled-unit-tests.yml @@ -10,7 +10,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] branch: ['master'] uses: ./.github/workflows/reusable-unit-tests.yml with: From b4be952ca3f851e9ada7e0fa51ae97806581cea7 Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Thu, 24 Aug 2023 17:57:53 +0200 Subject: [PATCH 3/3] pyproject.toml: advertise Python 3.12 support Signed-off-by: Bastian Krause --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2e80ccf46..732b8ec41 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", ] dependencies = [ @@ -216,7 +217,7 @@ signature-mutators = ["labgrid.step.step"] [tool.tox] legacy_tox_ini = """ [tox] -envlist = py38, py39, py310, py311 +envlist = py38, py39, py310, py311, py312 isolated_build = true [testenv]