Skip to content

Add Python 3.12 support #774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of a Qiskit project.
#
# (C) Copyright IBM 2021, 2023.
# (C) Copyright IBM 2021, 2024.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand Down Expand Up @@ -112,16 +112,16 @@ 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
- os: macos-latest
python-version: 3.11
python-version: 3.12
- os: windows-latest
python-version: 3.8
- os: windows-latest
python-version: 3.11
python-version: 3.12
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.11]
python-version: [3.8, 3.12]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -281,28 +281,32 @@ jobs:
with:
name: ubuntu-latest-3.11
path: /tmp/u311
- uses: actions/download-artifact@v4
with:
name: ubuntu-latest-3.12
path: /tmp/u312
- uses: actions/download-artifact@v4
with:
name: macos-latest-3.8
path: /tmp/m38
- uses: actions/download-artifact@v4
with:
name: macos-latest-3.11
path: /tmp/m311
name: macos-latest-3.12
path: /tmp/m312
- uses: actions/download-artifact@v4
with:
name: windows-latest-3.8
path: /tmp/w38
- uses: actions/download-artifact@v4
with:
name: windows-latest-3.11
path: /tmp/w311
name: windows-latest-3.12
path: /tmp/w312
- name: Install Dependencies
run: pip install -U coverage coveralls diff-cover
shell: bash
- name: Combined Deprecation Messages
run: |
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
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
shell: bash
- name: Coverage combine
run: coverage3 combine /tmp/u38/ml.dat
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/py_3_12_support-6ac8bce3652299fb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
features:
- |
Added support for using Qiskit Machine Learning with Python 3.12.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,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 machine learning ml',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
# Sets this min.version because of differences with env_tmp_dir env.
minversion = 4.0.2
envlist = py38, py39, py310, py311, lint, gpu, gpu-amd
envlist = py38, py39, py310, py311, py312, lint, gpu, gpu-amd
skipsdist = True

[testenv]
Expand Down