Skip to content

Commit 59c03c4

Browse files
Add Python 3.12 support (#774) (#775)
* Add Python 3.12 support * Remove Python 3.12.0 specific usage (cherry picked from commit 6cabae9) Co-authored-by: Steve Wood <[email protected]>
1 parent 8893f26 commit 59c03c4

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This code is part of a Qiskit project.
22
#
3-
# (C) Copyright IBM 2021, 2023.
3+
# (C) Copyright IBM 2021, 2024.
44
#
55
# This code is licensed under the Apache License, Version 2.0. You may
66
# obtain a copy of this license in the LICENSE.txt file in the root directory
@@ -112,16 +112,16 @@ jobs:
112112
fail-fast: false
113113
matrix:
114114
os: [ubuntu-latest]
115-
python-version: [3.8, 3.9, '3.10', 3.11]
115+
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
116116
include:
117117
- os: macos-latest
118118
python-version: 3.8
119119
- os: macos-latest
120-
python-version: 3.11
120+
python-version: 3.12
121121
- os: windows-latest
122122
python-version: 3.8
123123
- os: windows-latest
124-
python-version: 3.11
124+
python-version: 3.12
125125
steps:
126126
- uses: actions/checkout@v4
127127
- uses: actions/setup-python@v5
@@ -183,7 +183,7 @@ jobs:
183183
fail-fast: false
184184
matrix:
185185
os: [ubuntu-latest]
186-
python-version: [3.8, 3.11]
186+
python-version: [3.8, 3.12]
187187
steps:
188188
- uses: actions/checkout@v4
189189
with:
@@ -281,28 +281,32 @@ jobs:
281281
with:
282282
name: ubuntu-latest-3.11
283283
path: /tmp/u311
284+
- uses: actions/download-artifact@v4
285+
with:
286+
name: ubuntu-latest-3.12
287+
path: /tmp/u312
284288
- uses: actions/download-artifact@v4
285289
with:
286290
name: macos-latest-3.8
287291
path: /tmp/m38
288292
- uses: actions/download-artifact@v4
289293
with:
290-
name: macos-latest-3.11
291-
path: /tmp/m311
294+
name: macos-latest-3.12
295+
path: /tmp/m312
292296
- uses: actions/download-artifact@v4
293297
with:
294298
name: windows-latest-3.8
295299
path: /tmp/w38
296300
- uses: actions/download-artifact@v4
297301
with:
298-
name: windows-latest-3.11
299-
path: /tmp/w311
302+
name: windows-latest-3.12
303+
path: /tmp/w312
300304
- name: Install Dependencies
301305
run: pip install -U coverage coveralls diff-cover
302306
shell: bash
303307
- name: Combined Deprecation Messages
304308
run: |
305-
sort -f -u /tmp/u38/ml.dep /tmp/u39/ml.dep /tmp/u310/ml.dep /tmp/u311/ml.dep /tmp/m38/ml.dep /tmp/m311/ml.dep /tmp/w38/ml.dep /tmp/w311/ml.dep || true
309+
sort -f -u /tmp/u38/ml.dep /tmp/u39/ml.dep /tmp/u310/ml.dep /tmp/u311/ml.dep /tmp/u312/ml.dep /tmp/m38/ml.dep /tmp/m312/ml.dep /tmp/w38/ml.dep /tmp/w312/ml.dep || true
306310
shell: bash
307311
- name: Coverage combine
308312
run: coverage3 combine /tmp/u38/ml.dat
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
features:
3+
- |
4+
Added support for using Qiskit Machine Learning with Python 3.12.

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"Programming Language :: Python :: 3.9",
6262
"Programming Language :: Python :: 3.10",
6363
"Programming Language :: Python :: 3.11",
64+
"Programming Language :: Python :: 3.12",
6465
"Topic :: Scientific/Engineering"
6566
],
6667
keywords='qiskit sdk quantum machine learning ml',

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
# Sets this min.version because of differences with env_tmp_dir env.
33
minversion = 4.0.2
4-
envlist = py38, py39, py310, py311, lint, gpu, gpu-amd
4+
envlist = py38, py39, py310, py311, py312, lint, gpu, gpu-amd
55
skipsdist = True
66

77
[testenv]

0 commit comments

Comments
 (0)