From 641d87dba1fb354959fb72d47955249246bd02b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Wed, 21 Aug 2024 11:40:00 -0600 Subject: [PATCH] Support Python 3.13 --- .github/workflows/packages.yml | 71 +++++++++++++++++++++++----------- .github/workflows/test.yml | 62 +++++++++++++++++++++++------ HISTORY.rst | 5 +++ setup.py | 1 + tox.ini | 11 +++++- 5 files changed, 114 insertions(+), 36 deletions(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 476f38a..e3d0dbe 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -7,17 +7,18 @@ jobs: build-sdist: name: Build sdist package - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build sdist run: python setup.py sdist - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: + name: sdist path: ./dist/* @@ -26,15 +27,28 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-latest, macos-latest] - pyver: [cp37, cp38, cp39, cp310, cp311, cp312] + os: [ubuntu-24.04, windows-latest, macos-latest] + pyver: + - cp38 + - cp39 + - cp310 + - cp311 + - cp312 + - cp313 + include: + - pyver: cp37 + os: macos-13 + - pyver: cp37 + os: ubuntu-24.04 + - pyver: cp37 + os: windows-latest steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.1 + uses: pypa/cibuildwheel@v2.21.2 env: CIBW_BUILD: ${{matrix.pyver}}-* CIBW_ARCHS_LINUX: auto @@ -53,28 +67,36 @@ jobs: pp*-macosx_* - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: + name: wheel-${{ matrix.pyver }}-${{ matrix.os }} path: ./wheelhouse/*.whl build-cross-wheel: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: - pyver: [cp37, cp38, cp39, cp310, cp311, cp312] + pyver: + - cp37 + - cp38 + - cp39 + - cp310 + - cp311 + - cp312 + - cp313 arch: [aarch64, ppc64le] steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU for multi-arch build - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.1 + uses: pypa/cibuildwheel@v2.21.2 env: CIBW_BUILD: ${{matrix.pyver}}-* CIBW_ARCHS: ${{matrix.arch}} @@ -82,8 +104,9 @@ jobs: # Tests mostly fail because of some confusion with the python interpreter - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: + name: wheel-${{ matrix.pyver }}-${{ matrix.arch }} path: ./wheelhouse/*.whl @@ -92,14 +115,14 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-latest, macos-latest] + os: [ubuntu-24.04, windows-latest, macos-latest] steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.1 + uses: pypa/cibuildwheel@v2.21.2 env: CIBW_BUILD: pp* CIBW_TEST_EXTRAS: test @@ -115,31 +138,33 @@ jobs: pp*-macosx_* - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: + name: wheels-pp-${{ matrix.os }} path: ./wheelhouse/*.whl build-cross-wheel-pypy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up QEMU for multi-arch build - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.1 + uses: pypa/cibuildwheel@v2.21.2 env: CIBW_BUILD: pp* # Tests mostly fail because of some confusion with the python interpreter - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: + name: wheels-pp-cross path: ./wheelhouse/*.whl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 767ce03..fbd60d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,20 +11,35 @@ on: jobs: linux-tests: - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.8"] + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "pypy-3.8" + - "pypy-3.9" + - "pypy-3.10" + os: + - ubuntu-24.04 + include: + - python-version: 3.7 + os: ubuntu-22.04 steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python-version}} + allow-prereleases: true architecture: x64 - name: Install Tox @@ -39,17 +54,25 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: + - 3.7 + - 3.8 + - 3.9 + - "3.10" + - "3.11" + - "3.12" + - "3.13" architecture: ['x64', 'x86'] steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{matrix.python-version}} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python-version}} + allow-prereleases: true architecture: ${{matrix.architecture}} - name: Install Tox @@ -60,20 +83,35 @@ jobs: macos-tests: - runs-on: macos-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] + python-version: + - "3.11" + - "3.12" + - "3.13" + os: + - macos-latest + include: + - python-version: 3.7 + os: macos-13 + - python-version: 3.8 + os: macos-13 + - python-version: 3.9 + os: macos-13 + - python-version: "3.10" + os: macos-13 steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{matrix.python-version}} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{matrix.python-version}} + allow-prereleases: true - name: Install Tox run: pip install tox @@ -87,7 +125,7 @@ jobs: steps: - name: Checkout repos - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install Tox run: xcrun python3 -m pip install tox diff --git a/HISTORY.rst b/HISTORY.rst index cdd2998..541c127 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,11 @@ Releases history ---------------- +Unreleased +---------- + +- Add support for Python 3.13 + Version 1.3.3 ------------- diff --git a/setup.py b/setup.py index ab3182b..9732699 100644 --- a/setup.py +++ b/setup.py @@ -76,6 +76,7 @@ Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 +Programming Language :: Python :: 3.13 Operating System :: POSIX :: Linux Operating System :: POSIX :: BSD Operating System :: MacOS :: MacOS X diff --git a/tox.ini b/tox.ini index f3de082..bca5296 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, pypy-3.8 +envlist = 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, pypy-3.8, pypy-3.9, pypy-3.10 [testenv] commands = @@ -25,8 +25,17 @@ basepython = python3.11 [testenv:3.12] basepython = python3.12 +[testenv:3.13] +basepython = python3.13 + [testenv:pypy-3.8] basepython = pypy3.8 +[testenv:pypy-3.9] +basepython = pypy3.9 + +[testenv:pypy-3.10] +basepython = pypy3.10 + [testenv:xcode] basepython = {env:XCODE_PYTHON}