Skip to content

Commit d834b93

Browse files
Add Python 3.12 support (#580) (#613)
* add constraint for cplex * Add Python 3.12 support * reno (cherry picked from commit a52d23d) Co-authored-by: Takashi Imamichi <[email protected]>
1 parent 9f1ff63 commit d834b93

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

.github/workflows/main.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
fail-fast: false
117117
matrix:
118118
os: [ubuntu-latest]
119-
python-version: [3.8, 3.9, '3.10', 3.11]
119+
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
120120
include:
121121
- os: macos-latest
122122
python-version: 3.8
@@ -323,6 +323,10 @@ jobs:
323323
with:
324324
name: ubuntu-latest-3.11
325325
path: /tmp/o311
326+
- uses: actions/download-artifact@v4
327+
with:
328+
name: ubuntu-latest-3.12
329+
path: /tmp/o312
326330
- uses: actions/download-artifact@v4
327331
with:
328332
name: macos-latest-3.8
@@ -344,7 +348,7 @@ jobs:
344348
shell: bash
345349
- name: Combined Deprecation Messages
346350
run: |
347-
sort -f -u /tmp/o38/opt.dep /tmp/o39/opt.dep /tmp/o310/opt.dep /tmp/o311/opt.dep /tmp/m38/opt.dep /tmp/m311/opt.dep /tmp/w38/opt.dep /tmp/w311/opt.dep || true
351+
sort -f -u /tmp/o38/opt.dep /tmp/o39/opt.dep /tmp/o310/opt.dep /tmp/o311/opt.dep /tmp/o312/opt.dep /tmp/m38/opt.dep /tmp/m311/opt.dep /tmp/w38/opt.dep /tmp/w311/opt.dep || true
348352
shell: bash
349353
- name: Coverage combine
350354
run: coverage3 combine /tmp/o38/opt.dat
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
features:
3+
- |
4+
Added support for using Qiskit Optimization with Python 3.12.
5+

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
"Programming Language :: Python :: 3.9",
6666
"Programming Language :: Python :: 3.10",
6767
"Programming Language :: Python :: 3.11",
68+
"Programming Language :: Python :: 3.12",
6869
"Topic :: Scientific/Engineering",
6970
],
7071
keywords="qiskit sdk quantum optimization",
@@ -73,7 +74,7 @@
7374
include_package_data=True,
7475
python_requires=">=3.8",
7576
extras_require={
76-
"cplex": ["cplex"],
77+
"cplex": ["cplex; python_version < '3.12' and platform_machine != 'arm64'"],
7778
"cvx": ["cvxpy"],
7879
"matplotlib": ["matplotlib"],
7980
"gurobi": ["gurobipy"],

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 3.3.0
3-
envlist = py38, py39, py310, py311, lint
3+
envlist = py38, py39, py310, py311, py312, lint
44
skipsdist = True
55

66
[testenv]

0 commit comments

Comments
 (0)