diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index bb48e9e4c..9ade249ac 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -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 @@ -36,7 +36,7 @@ runs: if [ "${{ inputs.event-name }}" == "schedule" ] || [ "${{ inputs.run-slow }}" == "true" ]; then export QISKIT_TESTS="run_slow" fi - if [ "${{ inputs.os }}" == "ubuntu-latest" ] && [ "${{ inputs.python-version }}" == "3.8" ]; then + if [ "${{ inputs.os }}" == "ubuntu-latest" ] && [ "${{ inputs.python-version }}" == "3.9" ]; then export PYTHON="coverage3 run --source qiskit_machine_learning --parallel-mode" fi stestr --test-path test run 2> >(tee /dev/stderr out.txt > /dev/null) diff --git a/.github/workflows/deploy-code.yml b/.github/workflows/deploy-code.yml index ad80409ba..163e75b87 100644 --- a/.github/workflows/deploy-code.yml +++ b/.github/workflows/deploy-code.yml @@ -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 @@ -25,7 +25,7 @@ jobs: id-token: write strategy: matrix: - python-version: [3.8] + python-version: [3.9] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 9e01421ee..b26b9f8da 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -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 @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8] + python-version: [3.9] steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 828f48b76..2bdd419ad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.8] + python-version: [3.9] steps: - name: Print Concurrency Group env: @@ -112,14 +112,14 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: [3.8, 3.9, '3.10', 3.11, 3.12] + python-version: [3.9, '3.10', 3.11, 3.12] include: - os: macos-latest - python-version: 3.8 + python-version: 3.9 - os: macos-latest python-version: 3.12 - os: windows-latest - python-version: 3.8 + python-version: 3.9 - os: windows-latest python-version: 3.12 # macos-14 is an Arm64 image @@ -165,7 +165,7 @@ jobs: run: | coverage3 combine mv .coverage ./ci-artifact-data/ml.dat - if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.8 }} + if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9 }} shell: bash - uses: actions/upload-artifact@v4 with: @@ -188,7 +188,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - python-version: [3.8, 3.12] + python-version: [3.9, 3.12] steps: - uses: actions/checkout@v4 with: @@ -251,29 +251,25 @@ jobs: # cd docs/_build/html # mkdir artifacts # tar -zcvf artifacts/tutorials.tar.gz --exclude=./artifacts . -# if: ${{ matrix.python-version == 3.8 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }} +# if: ${{ matrix.python-version == 3.9 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }} # shell: bash # - name: Run upload stable tutorials # uses: actions/upload-artifact@v4 # with: # name: tutorials-stable${{ matrix.python-version }} # path: docs/_build/html/artifacts/tutorials.tar.gz -# if: ${{ matrix.python-version == 3.8 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }} +# if: ${{ matrix.python-version == 3.9 && !startsWith(github.ref, 'refs/heads/stable') && !startsWith(github.base_ref, 'stable/') }} Deprecation_Messages_and_Coverage: needs: [Checks, MachineLearning, Tutorials] runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8] + python-version: [3.9] steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v4 - with: - name: ubuntu-latest-3.8 - path: /tmp/u38 - uses: actions/download-artifact@v4 with: name: ubuntu-latest-3.9 @@ -292,16 +288,16 @@ jobs: path: /tmp/u312 - uses: actions/download-artifact@v4 with: - name: macos-latest-3.8 - path: /tmp/m38 + name: macos-latest-3.9 + path: /tmp/m39 - uses: actions/download-artifact@v4 with: name: macos-latest-3.12 path: /tmp/m312 - uses: actions/download-artifact@v4 with: - name: windows-latest-3.8 - path: /tmp/w38 + name: windows-latest-3.9 + path: /tmp/w39 - uses: actions/download-artifact@v4 with: name: windows-latest-3.12 @@ -319,10 +315,10 @@ jobs: 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/u312/ml.dep /tmp/m38/ml.dep /tmp/m312/ml.dep /tmp/w38/ml.dep /tmp/w312/ml.dep /tmp/a310/ml.dep /tmp/a312/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/m312/ml.dep /tmp/w39/ml.dep /tmp/w312/ml.dep /tmp/a310/ml.dep /tmp/a312/ml.dep || true shell: bash - name: Coverage combine - run: coverage3 combine /tmp/u38/ml.dat + run: coverage3 combine /tmp/u39/ml.dat shell: bash - name: Upload to Coveralls env: diff --git a/.mergify.yml b/.mergify.yml index d9a318886..ca27e5964 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,12 +1,12 @@ queue_rules: - name: automerge conditions: - - check-success=Deprecation_Messages_and_Coverage (3.8) + - check-success=Deprecation_Messages_and_Coverage (3.9) pull_request_rules: - name: automatic merge on CI success and review conditions: - - check-success=Deprecation_Messages_and_Coverage (3.8) + - check-success=Deprecation_Messages_and_Coverage (3.9) - "#approved-reviews-by>=1" - label=automerge - label!=on hold diff --git a/.pylintdict b/.pylintdict index 0f90a5135..93892d47d 100644 --- a/.pylintdict +++ b/.pylintdict @@ -137,6 +137,7 @@ elif endian entangler enum +eol eps estimatorqnn et @@ -352,6 +353,7 @@ o'brien objval observables oct +october olson onboarding onodera diff --git a/constraints.txt b/constraints.txt index cfe92e0b9..4cf890b52 100644 --- a/constraints.txt +++ b/constraints.txt @@ -1,4 +1,3 @@ numpy>=1.20,<2.0 -ipython<8.13;python_version<'3.9' nbconvert<7.14 # workaround https://github.com/jupyter/nbconvert/issues/2092 diff --git a/pyproject.toml b/pyproject.toml index 6155f6ff3..dd917cc01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,8 @@ build-backend = "setuptools.build_meta" [tool.black] line-length = 100 -target-version = ['py38', 'py39', 'py310', 'py311'] + +target-version = ['py39', 'py310', 'py311', 'py312'] [tool.pylint.main] extension-pkg-allow-list = [ @@ -12,7 +13,7 @@ extension-pkg-allow-list = [ "rustworkx", ] load-plugins = ["pylint.extensions.docparams", "pylint.extensions.docstyle"] -py-version = "3.8" # update it when bumping minimum supported python version +py-version = "3.9" # update it when bumping minimum supported python version [tool.pylint.basic] good-names = ["a", "b", "i", "j", "k", "d", "n", "m", "ex", "v", "w", "x", "y", "z", "Run", "_", "logger", "q", "c", "r", "qr", "cr", "qc", "nd", "pi", "op", "b", "ar", "br", "p", "cp", "ax", "dt", "__unittest", "iSwapGate", "mu"] diff --git a/releasenotes/notes/py38_end_of_support-fa1fdea6ea02b502.yaml b/releasenotes/notes/py38_end_of_support-fa1fdea6ea02b502.yaml new file mode 100644 index 000000000..f039fa74e --- /dev/null +++ b/releasenotes/notes/py38_end_of_support-fa1fdea6ea02b502.yaml @@ -0,0 +1,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. diff --git a/setup.py b/setup.py index 0d654e889..d7caaa4be 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,6 @@ "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -68,7 +67,7 @@ packages=setuptools.find_packages(include=['qiskit_machine_learning','qiskit_machine_learning.*']), install_requires=REQUIREMENTS, include_package_data=True, - python_requires=">=3.8", + python_requires=">=3.9", extras_require={ 'torch': ["torch"], 'sparse': ["sparse"], diff --git a/tox.ini b/tox.ini index 0f06e2637..f8f98c294 100644 --- a/tox.ini +++ b/tox.ini @@ -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, py312, lint, gpu, gpu-amd +envlist = py39, py310, py311, py312, lint, gpu, gpu-amd skipsdist = True [testenv]