Skip to content
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

Add support for Python 3.13 #836

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
22 changes: 13 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,17 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9, '3.10', 3.11, 3.12]
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
include:
# macos-latest is an Arm64 image
- os: macos-latest
python-version: 3.9
- os: macos-latest
python-version: 3.12
python-version: 3.13
- os: windows-latest
python-version: 3.9
- os: windows-latest
python-version: 3.12
python-version: 3.13
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.9, 3.12]
python-version: [3.9, 3.13]
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -282,28 +282,32 @@ jobs:
with:
name: ubuntu-latest-3.12
path: /tmp/u312
- uses: actions/download-artifact@v4
with:
name: ubuntu-latest-3.13
path: /tmp/u313
- uses: actions/download-artifact@v4
with:
name: macos-latest-3.9
path: /tmp/m39
- uses: actions/download-artifact@v4
with:
name: macos-latest-3.12
path: /tmp/m312
name: macos-latest-3.13
path: /tmp/m313
- uses: actions/download-artifact@v4
with:
name: windows-latest-3.9
path: /tmp/w39
- uses: actions/download-artifact@v4
with:
name: windows-latest-3.12
path: /tmp/w312
name: windows-latest-3.13
path: /tmp/w313
- name: Install Dependencies
run: pip install -U coverage coveralls diff-cover
shell: bash
- name: Combined Deprecation Messages
run: |
sort -f -u /tmp/u39/ml.dep /tmp/u310/ml.dep /tmp/u311/ml.dep /tmp/u312/ml.dep /tmp/m39/ml.dep /tmp/m312/ml.dep /tmp/w39/ml.dep /tmp/w312/ml.dep || true
sort -f -u /tmp/u39/ml.dep /tmp/u310/ml.dep /tmp/u311/ml.dep /tmp/u312/ml.dep /tmp/m39/ml.dep /tmp/m313/ml.dep /tmp/w39/ml.dep /tmp/w313/ml.dep || true
shell: bash
- name: Coverage combine
run: coverage3 combine /tmp/u39/ml.dat
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[tool.black]
line-length = 100

target-version = ['py39', 'py310', 'py311', 'py312']
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']

[tool.pylint.main]
extension-pkg-allow-list = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
upgrade:
- |
Removed support for using Qiskit Machine Learning with Python 3.8 to reflect
the EOL of Python 3.8 in October 2024 (PEP 569). To continue using Qiskit Machine Learning, you
must upgrade to a Python: 3.9 or above if you are using older versions of Python.
the EOL of Python 3.8 in October 2024 (`PEP 569 <https://peps.python.org/pep-0569/>`__). To
continue using Qiskit Machine Learning, you must upgrade to a Python: 3.9 or above if you are
using older versions of Python.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
features:
- |
Added support for using Qiskit Machine Learning with Python 3.12.
Added support for using Qiskit Machine Learning with Python 3.12
(`PEP 693 <https://peps.python.org/pep-0693/>`__).
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
upgrade:
- |
Removed support for using Qiskit Machine Learning with Python 3.8 to reflect
the EOL of Python 3.8 in October 2024 (`PEP 569 <https://peps.python.org/pep-0569/>`__). To
continue using Qiskit Machine Learning, you must upgrade to a Python: 3.9 or above if you are
using older versions of Python.
7 changes: 7 additions & 0 deletions releasenotes/notes/py_3_13_support-ab5e36821d346044.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
features:
- |
Added support for using Qiskit Machine Learning with Python 3.13 following the release of
Python 3.13 (final) in October 2024 (`PEP 719 <https://peps.python.org/pep-0719/>`__). To
access the latest features of Python 3.13, you may update your Qiskit Machine Learning
environment.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering"
],
keywords="qiskit sdk quantum machine learning ml",
packages=setuptools.find_packages(
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 = py39, py310, py311, py312, lint, gpu, gpu-amd
envlist = py39, py310, py311, py312, py313, lint, gpu, gpu-amd
skipsdist = True

[testenv]
Expand Down
Loading