Skip to content

Commit 83a5e30

Browse files
authored
feat(python): Support Python 3.12 (#394)
* feat(python): Support Python 3.12 * clippy
1 parent 450bcda commit 83a5e30

File tree

5 files changed

+108
-50
lines changed

5 files changed

+108
-50
lines changed

.github/workflows/release-python.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
CXXFLAGS: "-std=c++11 -stdlib=libc++"
3131
strategy:
3232
matrix:
33-
python-version: ['3.8', '3.9', '3.10', '3.11']
33+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
3434
steps:
3535
- uses: actions/checkout@v2
3636
- uses: actions/setup-python@v4
@@ -69,7 +69,7 @@ jobs:
6969
CXXFLAGS: "-std=c++11"
7070
strategy:
7171
matrix:
72-
python-version: ['3.8', '3.9', '3.10', '3.11']
72+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
7373
target: [x86_64, aarch64]
7474
steps:
7575
- uses: actions/checkout@v2
@@ -104,7 +104,7 @@ jobs:
104104
needs: [is-python-release, should-publish-wheels]
105105
strategy:
106106
matrix:
107-
python-version: ['3.8', '3.9', '3.10', '3.11']
107+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
108108
target: [x64]
109109
steps:
110110
- uses: actions/checkout@v2
@@ -149,7 +149,7 @@ jobs:
149149
default: true
150150
- uses: actions/setup-python@v4
151151
with:
152-
python-version: '3.11'
152+
python-version: '3.12'
153153
- name: Install protoc
154154
uses: arduino/setup-protoc@v1
155155
with:

Cargo.lock

Lines changed: 94 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ tokio = "1.24.2"
1515
# be a `quil-py` tag and should match the version used in `crates/python/pyproject.toml`
1616
# The version must also be specified in order to publish to crates.io. Cargo enforces
1717
# that the specified version is the same as the version in the git repository.
18-
quil-rs = { version = "0.22.0", git = "https://github.com/rigetti/quil-rs", tag = "quil-py/v0.6.0" }
18+
quil-rs = { version = "0.22.0", git = "https://github.com/rigetti/quil-rs", tag = "quil-py/v0.6.1" }
1919

2020
# ndarray is used by the `qcs` crate, but it is also used in the `python` crate via a
2121
# re-export through the numpy crate. They should be updated as a pair to keep both
2222
# crates' versions of ndarray in sync.
2323
# Similarly, pyo3 packages (`numpy`, `rigetti-pyo3`, `pyo3*`) track versions together
2424
# and need to be updated together.
2525
ndarray = { version = "0.15.6", features = ["serde"] }
26-
numpy = "0.19"
27-
pyo3 = "0.19.2"
28-
pyo3-asyncio = { version = "0.19", features = ["tokio-runtime"] }
29-
pyo3-build-config = "0.19.2"
30-
rigetti-pyo3 = { version = "0.2.0", features = ["complex"] }
26+
numpy = "0.20.0"
27+
pyo3 = "0.20.0"
28+
pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] }
29+
pyo3-build-config = "0.20.0"
30+
rigetti-pyo3 = { version = "0.3.0", features = ["complex"] }
3131

3232
# The primary intent of these options is to reduce the binary size for Python wheels
3333
# since PyPi has limits on how much storage a project can use.

crates/lib/src/qpu/execution.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ impl<'a> Execution<'a> {
282282
job_handle.readout_map(),
283283
&response.readout_values,
284284
)),
285-
duration: Some(response.execution_duration_microseconds).map(Duration::from_micros),
285+
duration: Some(Duration::from_micros(
286+
response.execution_duration_microseconds,
287+
)),
286288
})
287289
}
288290

crates/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ classifiers = [
2020
"Programming Language :: Python :: 3.11",
2121
"Operating System :: OS Independent",
2222
]
23-
dependencies = ["quil==0.6.0"]
23+
dependencies = ["quil==0.6.1"]
2424

2525
# PEP 621 specifies the [project] table as the source for project metadata. However, Poetry only supports [tool.poetry]
2626
# We can remove this table once this issue is resolved: https://github.com/python-poetry/poetry/issues/3332

0 commit comments

Comments
 (0)