From f0e15537b29587b829a7b634055c1e49ecafa41b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 7 Oct 2024 13:15:55 +0300 Subject: [PATCH 1/2] Add support for Python 3.13 --- .github/workflows/ci.yml | 14 ++++++++++---- pyproject.toml | 1 + tox.ini | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 649e17b9..83c5f666 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,7 @@ jobs: linux: runs-on: ubuntu-20.04 strategy: + fail-fast: false matrix: PYTHON: - {VERSION: "3.12", TOXENV: "docs", COVERAGE: "false"} @@ -25,8 +26,9 @@ jobs: - {VERSION: "3.10", TOXENV: "py310"} - {VERSION: "3.11", TOXENV: "py311"} - {VERSION: "3.12", TOXENV: "py312"} - - {VERSION: "3.12", TOXENV: "py312", NOTE: "system", SODIUM_INSTALL: "system"} - - {VERSION: "3.12", TOXENV: "py312", NOTE: "minimal", SODIUM_INSTALL_MINIMAL: "1"} + - {VERSION: "3.13", TOXENV: "py313"} + - {VERSION: "3.13", TOXENV: "py313", NOTE: "system", SODIUM_INSTALL: "system"} + - {VERSION: "3.13", TOXENV: "py313", NOTE: "minimal", SODIUM_INSTALL_MINIMAL: "1"} name: "Linux ${{ matrix.PYTHON.TOXENV }} ${{ matrix.PYTHON.NOTE }}" steps: - uses: actions/checkout@v4.2.0 @@ -34,6 +36,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.PYTHON.VERSION }} + allow-prereleases: true - name: Install tox and coverage run: pip install tox coverage - name: Install libsodium (system install only) @@ -71,8 +74,8 @@ jobs: - 'macos-latest' PYTHON: - {VERSION: "3.7", TOXENV: "py37"} - - {VERSION: "3.12", TOXENV: "py312"} - - {VERSION: "3.12", TOXENV: "py312", NOTE: " (minimal build)", SODIUM_INSTALL_MINIMAL: "1"} + - {VERSION: "3.13", TOXENV: "py313"} + - {VERSION: "3.13", TOXENV: "py313", NOTE: " (minimal build)", SODIUM_INSTALL_MINIMAL: "1"} exclude: - PYTHON: {VERSION: "3.7", TOXENV: "py37"} RUNNER: macos-latest @@ -83,6 +86,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.PYTHON.VERSION }} + allow-prereleases: true - name: Install tox and coverage run: pip install tox coverage - name: Run tests @@ -108,6 +112,7 @@ jobs: - {VERSION: "3.10", TOXENV: "py310", SODIUM_MSVC_VERSION: "v142"} - {VERSION: "3.11", TOXENV: "py311", SODIUM_MSVC_VERSION: "v142"} - {VERSION: "3.12", TOXENV: "py312", SODIUM_MSVC_VERSION: "v142"} + - {VERSION: "3.13", TOXENV: "py313", SODIUM_MSVC_VERSION: "v142"} name: "Python ${{ matrix.PYTHON.VERSION }} on Windows ${{ matrix.WINDOWS.ARCH }}" steps: - uses: actions/checkout@v4.2.0 @@ -116,6 +121,7 @@ jobs: with: python-version: ${{ matrix.PYTHON.VERSION }} architecture: ${{ matrix.WINDOWS.ARCH }} + allow-prereleases: true - name: 'Extract libsodium libraries' run: | Expand-Archive src/libsodium-1.0.20-stable-msvc.zip -DestinationPath c:\ diff --git a/pyproject.toml b/pyproject.toml index ff1984a3..1229a73a 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", ] requires-python = ">=3.7" dependencies = [ diff --git a/tox.ini b/tox.ini index d0fb7d4a..d5487cbc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{py3,36,37,38,39,310,311,312},docs,meta,mypy +envlist = py{py3,36,37,38,39,310,311,312,313},docs,meta,mypy isolated_build = True [testenv] From b1900f942475fd150ac219c26d3616012aca4bb1 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 7 Oct 2024 14:23:09 +0300 Subject: [PATCH 2/2] Prefer 3.13-dev over allow-prereleases --- .github/workflows/ci.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83c5f666..30a10b5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,9 +26,9 @@ jobs: - {VERSION: "3.10", TOXENV: "py310"} - {VERSION: "3.11", TOXENV: "py311"} - {VERSION: "3.12", TOXENV: "py312"} - - {VERSION: "3.13", TOXENV: "py313"} - - {VERSION: "3.13", TOXENV: "py313", NOTE: "system", SODIUM_INSTALL: "system"} - - {VERSION: "3.13", TOXENV: "py313", NOTE: "minimal", SODIUM_INSTALL_MINIMAL: "1"} + - {VERSION: "3.13-dev", TOXENV: "py313"} + - {VERSION: "3.13-dev", TOXENV: "py313", NOTE: "system", SODIUM_INSTALL: "system"} + - {VERSION: "3.13-dev", TOXENV: "py313", NOTE: "minimal", SODIUM_INSTALL_MINIMAL: "1"} name: "Linux ${{ matrix.PYTHON.TOXENV }} ${{ matrix.PYTHON.NOTE }}" steps: - uses: actions/checkout@v4.2.0 @@ -36,7 +36,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.PYTHON.VERSION }} - allow-prereleases: true - name: Install tox and coverage run: pip install tox coverage - name: Install libsodium (system install only) @@ -74,8 +73,8 @@ jobs: - 'macos-latest' PYTHON: - {VERSION: "3.7", TOXENV: "py37"} - - {VERSION: "3.13", TOXENV: "py313"} - - {VERSION: "3.13", TOXENV: "py313", NOTE: " (minimal build)", SODIUM_INSTALL_MINIMAL: "1"} + - {VERSION: "3.13-dev", TOXENV: "py313"} + - {VERSION: "3.13-dev", TOXENV: "py313", NOTE: " (minimal build)", SODIUM_INSTALL_MINIMAL: "1"} exclude: - PYTHON: {VERSION: "3.7", TOXENV: "py37"} RUNNER: macos-latest @@ -86,7 +85,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.PYTHON.VERSION }} - allow-prereleases: true - name: Install tox and coverage run: pip install tox coverage - name: Run tests @@ -112,7 +110,7 @@ jobs: - {VERSION: "3.10", TOXENV: "py310", SODIUM_MSVC_VERSION: "v142"} - {VERSION: "3.11", TOXENV: "py311", SODIUM_MSVC_VERSION: "v142"} - {VERSION: "3.12", TOXENV: "py312", SODIUM_MSVC_VERSION: "v142"} - - {VERSION: "3.13", TOXENV: "py313", SODIUM_MSVC_VERSION: "v142"} + - {VERSION: "3.13-dev", TOXENV: "py313", SODIUM_MSVC_VERSION: "v142"} name: "Python ${{ matrix.PYTHON.VERSION }} on Windows ${{ matrix.WINDOWS.ARCH }}" steps: - uses: actions/checkout@v4.2.0 @@ -121,7 +119,6 @@ jobs: with: python-version: ${{ matrix.PYTHON.VERSION }} architecture: ${{ matrix.WINDOWS.ARCH }} - allow-prereleases: true - name: 'Extract libsodium libraries' run: | Expand-Archive src/libsodium-1.0.20-stable-msvc.zip -DestinationPath c:\