diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index edbcbc7b..751231d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: pkgprefix: mingw-w64-clang-x86_64 steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-msys2 uses: msys2/setup-msys2@v2 @@ -61,19 +61,19 @@ jobs: poetry run coverage xml -i - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 ubuntu: runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.11'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', 'pypy-3.11'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -107,7 +107,7 @@ jobs: poetry run coverage xml -i - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 - name: Run linters if: ${{ !contains(matrix.python-version, 'pypy') }} @@ -116,7 +116,7 @@ jobs: poetry run mypy . - name: Build docs - if: ${{ !contains(matrix.python-version, 'pypy') && !contains(matrix.python-version, '3.14') }} + if: ${{ !contains(matrix.python-version, 'pypy') }} run: | poetry install --with docs poetry run python -m sphinx -W -a -E -b html -n docs docs/_build @@ -126,7 +126,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.11'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', 'pypy-3.11'] architecture: ['x64'] os: ['windows-2022'] include: @@ -140,11 +140,11 @@ jobs: architecture: 'arm64' os: 'windows-11-arm' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python ${{ matrix.python-version }} id: setup-python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} @@ -191,14 +191,14 @@ jobs: poetry run coverage xml -i - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 macos: runs-on: macos-latest steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Install dependencies run: | @@ -221,4 +221,4 @@ jobs: poetry run coverage xml -i - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4013a339..858d48ea 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -8,10 +8,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.11' @@ -24,7 +24,7 @@ jobs: - name: Build sdist run: python -m build --sdist - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 with: name: sdist path: ./dist/*.tar.gz @@ -47,7 +47,7 @@ jobs: arch: arm64 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup MSVC uses: ilammy/msvc-dev-cmd@v1.13.0 @@ -55,16 +55,17 @@ jobs: arch : ${{ matrix.arch }} - name: Build wheels - uses: pypa/cibuildwheel@v3.1.0 + uses: pypa/cibuildwheel@v3.2.1 env: CFLAGS: "-DCAIRO_WIN32_STATIC_BUILD=1" CIBW_BEFORE_BUILD: "python {package}/.ci/download-cairo-win32.py ${{ matrix.arch }}" - CIBW_BUILD: cp310-${{ matrix.platform_id }} cp311-${{ matrix.platform_id }} cp312-${{ matrix.platform_id }} cp313-${{ matrix.platform_id }} cp314-${{ matrix.platform_id }} + CIBW_BUILD: cp310-${{ matrix.platform_id }} cp311-${{ matrix.platform_id }} cp312-${{ matrix.platform_id }} cp313-${{ matrix.platform_id }} cp314-${{ matrix.platform_id }} cp314t-${{ matrix.platform_id }} + CIBW_SKIP: cp314t-win32 CIBW_TEST_REQUIRES: pytest==8.3.5 CIBW_TEST_COMMAND: bash {package}/.ci/test-wheels.sh {package} CIBW_ENVIRONMENT_WINDOWS: PKG_CONFIG_PATH='${{ github.workspace }}/cairo-prebuild/lib/pkgconfig' PKG_CONFIG='${{ github.workspace }}/cairo-prebuild/bin/pkgconf.exe' - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 with: name: "wheel-${{ matrix.arch }}" path: ./wheelhouse/*.whl diff --git a/cairo/cairomodule.c b/cairo/cairomodule.c index c180695c..804f69f9 100644 --- a/cairo/cairomodule.c +++ b/cairo/cairomodule.c @@ -594,6 +594,9 @@ static int exec_cairo(PyObject *m) static PyModuleDef_Slot cairo_slots[] = { {Py_mod_exec, (void*)exec_cairo}, +#if PY_VERSION_HEX >= 0x030D0000 + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, +#endif {0, NULL}, }; diff --git a/tests/cmodule/cmodule.c b/tests/cmodule/cmodule.c index 728e6b02..8c9a77ec 100644 --- a/tests/cmodule/cmodule.c +++ b/tests/cmodule/cmodule.c @@ -25,6 +25,9 @@ static int exec_cmod(PyObject *m) static PyModuleDef_Slot cmod_slots[] = { {Py_mod_exec, exec_cmod}, +#if PY_VERSION_HEX >= 0x030D0000 + {Py_mod_gil, Py_MOD_GIL_NOT_USED}, +#endif {0, NULL}}; static struct PyModuleDef cmod_module = {