Skip to content

Commit

Permalink
Add Python 3.12 support (#580)
Browse files Browse the repository at this point in the history
* add constraint for cplex

* Add Python 3.12 support

* reno
  • Loading branch information
t-imamichi authored Feb 26, 2024
1 parent dea16dd commit a52d23d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.9, '3.10', 3.11]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
include:
- os: macos-latest
python-version: 3.8
Expand Down Expand Up @@ -323,6 +323,10 @@ jobs:
with:
name: ubuntu-latest-3.11
path: /tmp/o311
- uses: actions/download-artifact@v4
with:
name: ubuntu-latest-3.12
path: /tmp/o312
- uses: actions/download-artifact@v4
with:
name: macos-latest-3.8
Expand All @@ -344,7 +348,7 @@ jobs:
shell: bash
- name: Combined Deprecation Messages
run: |
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
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
shell: bash
- name: Coverage combine
run: coverage3 combine /tmp/o38/opt.dat
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- |
Added support for using Qiskit Optimization with Python 3.12.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
],
keywords="qiskit sdk quantum optimization",
Expand All @@ -73,7 +74,7 @@
include_package_data=True,
python_requires=">=3.8",
extras_require={
"cplex": ["cplex"],
"cplex": ["cplex; python_version < '3.12' and platform_machine != 'arm64'"],
"cvx": ["cvxpy"],
"matplotlib": ["matplotlib"],
"gurobi": ["gurobipy"],
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 3.3.0
envlist = py38, py39, py310, py311, lint
envlist = py38, py39, py310, py311, py312, lint
skipsdist = True

[testenv]
Expand Down

0 comments on commit a52d23d

Please sign in to comment.