Skip to content

Commit

Permalink
Add Python 3.13 to CI and to release (Qiskit#1291)
Browse files Browse the repository at this point in the history
* Add 3.13 support

* Enable pillow for 3.13 tests

* Fix stub tests

* Bump cibuildwheel to build with candidate and not rc

* Remove win32 builds

* Add 3.13 to supported list

* Re-introduce win32
  • Loading branch information
IvanIsCoding authored and Gohlub committed Nov 17, 2024
1 parent 14655e2 commit bb2ee0c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
matrix:
rust: [stable]
python-version: [3.9, "3.10", "3.11", "3.12"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
platform: [
{ os: "macOS-13", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
{ os: "macOS-14", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" },
Expand All @@ -73,7 +73,7 @@ jobs:
msrv: "MSRV"
# Test future versions of Rust and Python
- rust: beta
python-version: "3.13-dev"
python-version: "3.13" # upgrade to 3.14-dev when the release candidate is available
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }
msrv: "Beta"
# Exclude python 3.9 on arm64 until actions/setup-python#808 is resolved
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, "3.10", "3.11", "3.12"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.17.0
python -m pip install cibuildwheel==2.21.3
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.17.0
python -m pip install cibuildwheel==2.21.3
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.17.0
python -m pip install cibuildwheel==2.21.3
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.17.0
python -m pip install cibuildwheel==2.21.3
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.17.0
python -m pip install cibuildwheel==2.21.3
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
Expand Down Expand Up @@ -253,7 +253,7 @@ jobs:
run: rustup default stable-i686-pc-windows-msvc
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.17.0
python -m pip install cibuildwheel==2.21.3
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
Expand Down
3 changes: 1 addition & 2 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
decorator==4.4.2
pillow<10.0.0;python_version<'3.13'
pillow>=10.1
lxml==5.1.1
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

def install_rustworkx(session):
session.install(*deps)
session.install(".", "-c", "constraints.txt")
session.install(".[all]", "-c", "constraints.txt")

# We define a common base such that -e test triggers a test with the current
# Python version of the interpreter and -e test_with_version launches
Expand Down
2 changes: 1 addition & 1 deletion rustworkx/visualization/graphviz.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import typing
from rustworkx.rustworkx import PyGraph, PyDiGraph

if typing.TYPE_CHECKING:
from PIL import Image # type: ignore
from PIL.Image import Image # type: ignore

_S = typing.TypeVar("_S")
_T = typing.TypeVar("_T")
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def readme():
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
Expand Down

0 comments on commit bb2ee0c

Please sign in to comment.