From a526a08a6667031a226c4f823966839d79587e53 Mon Sep 17 00:00:00 2001 From: Sebastian Abrahamsson Date: Tue, 13 Oct 2026 19:57:49 +0200 Subject: [PATCH] Support Python 3.15 Build the prebuilt Windows DLL for 3.15 too, and test 3.15 next to 3.14 in CI and in the wheel tests. The canaries stay on 3.14. The checks of the wheel content and of the built DLLs expect six DLLs. The bridge needed no change: it builds against the 3.15 headers without warnings. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish.yml | 10 +++++----- .github/workflows/python_bridge.yml | 20 +++++++++++++------- .github/workflows/python_bridge_dlls.yml | 4 ++-- .github/workflows/wheel_tests.yml | 4 ++++ docs/user_guide.rst | 4 ++-- release_notes/0.2.0.md | 1 + tests/test_python_bridge.py | 2 +- 7 files changed, 28 insertions(+), 17 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e22ae09..12b38af 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -83,7 +83,7 @@ jobs: python -m build --wheel # As in python_bridge.yml: the single wheel for every platform, with sources of - # every kind, the manifest, the five DLLs, no other binary, and the version that + # every kind, the manifest, the six DLLs, no other binary, and the version that # is being released. - name: '馃攳 Check distribution content' run: | @@ -96,10 +96,10 @@ jobs: for file in $(git ls-files src/vunit_python_bridge | grep -E '/(native|hdl/src)/|\.py$|\.toml$' | sed 's#^src/##'); do grep -qx "$file" wheel.txt || { echo "missing $file in the wheel"; exit 1; } done - # The five DLLs and no other binary - dlls='^vunit_python_bridge/bin/vunit_python_bridge-cp31[0-4]-win_amd64\.dll$' - test "$(grep -c "$dlls" wheel.txt)" = 5 - test "$(grep -c '\.dll$' wheel.txt)" = 5 + # The six DLLs and no other binary + dlls='^vunit_python_bridge/bin/vunit_python_bridge-cp31[0-5]-win_amd64\.dll$' + test "$(grep -c "$dlls" wheel.txt)" = 6 + test "$(grep -c '\.dll$' wheel.txt)" = 6 if grep -qE '\.(so|dylib|pyd)$' wheel.txt; then echo "the wheel has a binary"; exit 1; fi test -f "dist/vunit_python_bridge-${{ needs.version.outputs.version }}-py3-none-any.whl" diff --git a/.github/workflows/python_bridge.yml b/.github/workflows/python_bridge.yml index 6b3365f..21a419f 100644 --- a/.github/workflows/python_bridge.yml +++ b/.github/workflows/python_bridge.yml @@ -25,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - # The oldest and newest supported CPython; every GHDL backend, since + # The oldest and the two newest supported CPythons; every GHDL backend, since # the bridge library is loaded differently by the ones that link ahead # of time (llvm, gcc), on the latest release; the NVC release VUnit is # developed against. @@ -36,18 +36,24 @@ jobs: include: - { os: ubuntu-24.04, py: '3.10', sim: nvc, nvc: '1.22.1' } - { os: ubuntu-24.04, py: '3.14', sim: nvc, nvc: '1.22.1' } + - { os: ubuntu-24.04, py: '3.15', sim: nvc, nvc: '1.22.1' } - { os: ubuntu-24.04, py: '3.14', sim: nvc, nvc: master, canary: true } - { os: ubuntu-24.04, py: '3.10', sim: ghdl, backend: mcode, ghdl: latest } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: mcode, ghdl: nightly, canary: true } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: llvm-jit, ghdl: latest } + - { os: ubuntu-24.04, py: '3.15', sim: ghdl, backend: llvm-jit, ghdl: latest } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: llvm-jit, ghdl: nightly, canary: true } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: llvm, ghdl: latest } + - { os: ubuntu-24.04, py: '3.15', sim: ghdl, backend: llvm, ghdl: latest } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: llvm, ghdl: nightly, canary: true } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: gcc, ghdl: latest } + - { os: ubuntu-24.04, py: '3.15', sim: ghdl, backend: gcc, ghdl: latest } - { os: ubuntu-24.04, py: '3.14', sim: ghdl, backend: gcc, ghdl: nightly, canary: true } - { os: macos-15, py: '3.14', sim: nvc, nvc: brew } + - { os: macos-15, py: '3.15', sim: nvc, nvc: brew } # macos-15: setup-ghdl has no build for newer macOS versions yet, and only the llvm backend - { os: macos-15, py: '3.14', sim: ghdl, backend: llvm, ghdl: latest } + - { os: macos-15, py: '3.15', sim: ghdl, backend: llvm, ghdl: latest } name: '${{ matrix.os }} 路 Python ${{ matrix.py }} 路 ${{ matrix.sim }} ${{ matrix.backend }}${{ matrix.ghdl }}${{ matrix.nvc }}' continue-on-error: ${{ matrix.canary || false }} env: @@ -120,7 +126,7 @@ jobs: strategy: fail-fast: false matrix: - py: ['3.10', '3.12', '3.14'] + py: ['3.10', '3.12', '3.14', '3.15'] sim: [nvc, ghdl] bridge: [dll] # No prebuilt DLLs: the library is built with the MinGW gcc of the runner image, the @@ -223,7 +229,7 @@ jobs: pip install -U build --progress-bar off python -m build --wheel - # The single wheel for every platform: sources of every kind, the manifest, the five + # The single wheel for every platform: sources of every kind, the manifest, the six # DLLs, no other binary - name: '馃攳 Check distribution content' run: | @@ -236,10 +242,10 @@ jobs: for file in $(git ls-files src/vunit_python_bridge | grep -E '/(native|hdl/src)/|\.py$|\.toml$' | sed 's#^src/##'); do grep -qx "$file" wheel.txt || { echo "missing $file in the wheel"; exit 1; } done - # The five DLLs and no other binary - dlls='^vunit_python_bridge/bin/vunit_python_bridge-cp31[0-4]-win_amd64\.dll$' - test "$(grep -c "$dlls" wheel.txt)" = 5 - test "$(grep -c '\.dll$' wheel.txt)" = 5 + # The six DLLs and no other binary + dlls='^vunit_python_bridge/bin/vunit_python_bridge-cp31[0-5]-win_amd64\.dll$' + test "$(grep -c "$dlls" wheel.txt)" = 6 + test "$(grep -c '\.dll$' wheel.txt)" = 6 if grep -qE '\.(so|dylib|pyd)$' wheel.txt; then echo "the wheel has a binary"; exit 1; fi - name: '馃摛 Upload the distribution' diff --git a/.github/workflows/python_bridge_dlls.yml b/.github/workflows/python_bridge_dlls.yml index b04da19..272ab33 100644 --- a/.github/workflows/python_bridge_dlls.yml +++ b/.github/workflows/python_bridge_dlls.yml @@ -12,7 +12,7 @@ jobs: runs-on: windows-latest strategy: matrix: - py: ['3.10', '3.11', '3.12', '3.13', '3.14'] + py: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15'] name: '馃煢 MSVC 路 bridge DLL 路 Python ${{ matrix.py }}' steps: @@ -54,7 +54,7 @@ jobs: path: dlls - name: '馃攳 Check DLLs' - run: test "$(ls dlls/*.dll | wc -l)" = 5 + run: test "$(ls dlls/*.dll | wc -l)" = 6 - name: '馃摛 Upload DLLs' uses: actions/upload-artifact@v4 diff --git a/.github/workflows/wheel_tests.yml b/.github/workflows/wheel_tests.yml index 9aae7bd..6a0ae48 100644 --- a/.github/workflows/wheel_tests.yml +++ b/.github/workflows/wheel_tests.yml @@ -35,13 +35,17 @@ jobs: include: - { os: ubuntu-24.04, py: '3.10', sim: nvc } - { os: ubuntu-24.04, py: '3.14', sim: ghdl } + - { os: ubuntu-24.04, py: '3.15', sim: ghdl } - { os: macos-15, py: '3.14', sim: nvc } + - { os: macos-15, py: '3.15', sim: nvc } - { os: windows-latest, py: '3.10', sim: nvc } - { os: windows-latest, py: '3.11', sim: nvc } - { os: windows-latest, py: '3.12', sim: nvc } - { os: windows-latest, py: '3.13', sim: nvc } - { os: windows-latest, py: '3.14', sim: nvc } + - { os: windows-latest, py: '3.15', sim: nvc } - { os: windows-latest, py: '3.14', sim: ghdl } + - { os: windows-latest, py: '3.15', sim: ghdl } name: '馃帯 Wheel 路 ${{ matrix.os }} 路 Python ${{ matrix.py }} 路 ${{ matrix.sim }}' env: VUNIT_SIMULATOR: ${{ matrix.sim }} diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 11883ce..59b2977 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -1046,8 +1046,8 @@ GHDL gcc 6.0.0, 7.0.0-dev Questa (FLI) Altera Starter FPGA Edition 2025.3 ========================== ======================================================== -On Windows, CI tests NVC 1.22 and GHDL mcode (nightly) with Python 3.10, 3.12 -and 3.14. The released wheel is also installed and tested on Linux, macOS and on +On Windows, CI tests NVC 1.22 and GHDL mcode (nightly) with Python 3.10, 3.12, +3.14 and 3.15. The released wheel is also installed and tested on Linux, macOS and on Windows machines without a compiler, there with every supported Python, so each of its prebuilt DLLs is run. diff --git a/release_notes/0.2.0.md b/release_notes/0.2.0.md index 8590ea0..eae030a 100644 --- a/release_notes/0.2.0.md +++ b/release_notes/0.2.0.md @@ -2,3 +2,4 @@ - `import_module_from_file` resolves a relative path against the directory of the testbench file, like `exec_file`, rather than against the working directory of the simulator. It must be called after `test_runner_setup`. Callers that relied on a path relative to the working directory must pass an absolute path instead. See #7. - A relative file name given to `exec_file` or `import_module_from_file` before `test_runner_setup` has completed is reported as a failure, instead of being taken from the working directory of the simulator. The new `base_path` returns a base directory set with `vunit_python_bridge.set_relative_file_base()` or `VUNIT_PYTHON_BRIDGE_FILE_BASE`, for file names that work at any time, for example in verification components. +- Python 3.15 is supported, with a prebuilt bridge DLL for Windows. diff --git a/tests/test_python_bridge.py b/tests/test_python_bridge.py index 9aaf478..872e768 100644 --- a/tests/test_python_bridge.py +++ b/tests/test_python_bridge.py @@ -919,7 +919,7 @@ class TestWindowsDllSelection(unittest.TestCase): """ def test_windows_dll_name_for_supported_versions(self): - for minor in range(10, 15): + for minor in range(10, 16): with mock.patch("sys.version_info", (3, minor)): self.assertEqual(native_library.windows_dll_name(), f"vunit_python_bridge-cp3{minor}-win_amd64.dll")