From c00e74a9b61dcf505e66329290fd3560e6f3fe90 Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Mon, 30 Sep 2024 11:25:48 +0200 Subject: [PATCH 1/4] github: add tests for Python 3.13 Signed-off-by: Bastian Krause --- .github/workflows/push-pr-unit-tests.yml | 2 +- .github/workflows/scheduled-unit-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push-pr-unit-tests.yml b/.github/workflows/push-pr-unit-tests.yml index 4923ad254..f8dec40f4 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.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] uses: ./.github/workflows/reusable-unit-tests.yml secrets: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/scheduled-unit-tests.yml b/.github/workflows/scheduled-unit-tests.yml index ea4524cbe..a01ee7e89 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.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] branch: ['master'] uses: ./.github/workflows/reusable-unit-tests.yml secrets: From ebe45fc3099302e0f4386c255a3f3ae0b3917a7e Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Mon, 30 Sep 2024 11:59:24 +0200 Subject: [PATCH 2/4] pyproject: advertise Python 3.13 compatibility Signed-off-by: Bastian Krause --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c9ce540a1..f19952943 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", ] dependencies = [ @@ -187,7 +188,7 @@ signature-mutators = ["labgrid.step.step"] [tool.tox] legacy_tox_ini = """ [tox] -envlist = py39, py310, py311, py312 +envlist = py39, py310, py311, py312, py313 isolated_build = true [testenv] From dc5a9f7945bd0969e036a8cc1b5d9ea1e7a05848 Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Mon, 30 Sep 2024 12:57:55 +0200 Subject: [PATCH 3/4] github: show extra test summary The extra test summary shows additional information such as why a test was skipped. This is helpful to compare test runs on different Python versions and git states. Signed-off-by: Bastian Krause --- .github/workflows/reusable-unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-unit-tests.yml b/.github/workflows/reusable-unit-tests.yml index 619a9c1e1..e68a53d03 100644 --- a/.github/workflows/reusable-unit-tests.yml +++ b/.github/workflows/reusable-unit-tests.yml @@ -58,7 +58,7 @@ jobs: ruff format --check --diff labgrid/remote/ - name: Test with pytest run: | - pytest --cov-config .coveragerc --cov=labgrid --local-sshmanager --ssh-username runner -k "not test_docker_with_daemon" + pytest -r a --cov-config .coveragerc --cov=labgrid --local-sshmanager --ssh-username runner -k "not test_docker_with_daemon" - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From bf9bf13c951941d56651f957267c64eaa0a2543c Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Mon, 30 Sep 2024 13:46:42 +0200 Subject: [PATCH 4/4] doc: mock vxi11 module On Python 3.13, the vxi11 module import fails: autodoc: failed to import module 'siglent' from module 'labgrid.driver.power'; the following exception was raised: No module named 'xdrlib' It uses xdrlib which was dropped from Python's standard library with Python 3.13. See https://github.com/labgrid-project/labgrid/issues/1507 for more details. For the time being, mock the vxi11 module to make the doc builds work on Python 3.13. Signed-off-by: Bastian Krause --- doc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 2fcea3267..1196c76bb 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -180,7 +180,8 @@ } autodoc_mock_imports = ['onewire', 'gi', - 'gi.repository',] + 'gi.repository', + 'vxi11'] # -- Options for autosection ---------------------------------------------- autosectionlabel_prefix_document = True