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

Update Py3.9 to 3.10 minimum #891

Merged
merged 10 commits into from
Sep 6, 2024
5 changes: 4 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

### Breaking changes

* Remove support for Python 3.9.
[#891](https://github.com/PennyLaneAI/pennylane-lightning/pull/891)

### Improvements

* Update GitHub actions in response to a high-severity vulnerability.
Expand All @@ -29,7 +32,7 @@

This release contains contributions from (in alphabetical order):

Amintor Dusko, Luis Alfredo Nuñez Meneses, Vincent Michaud-Rioux, Shuli Shu
Amintor Dusko, Luis Alfredo Nuñez Meneses, Vincent Michaud-Rioux, Lee J. O'Riordan, Shuli Shu

---

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post_release_version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre_release_version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.10'

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/set_wheel_build_matrix.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Set wheel build matrix

env:
PYTHON3_MIN_VERSION: "9"
PYTHON3_MIN_VERSION: "10"
PYTHON3_MAX_VERSION: "12"

on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpu_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Setup Python virtual environment
id: setup_venv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Setup Python virtual environment
id: setup_venv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpumpi_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
id: setup_python
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

# Since the self-hosted runner can be re-used. It is best to set up all package
# installations in a virtual environment that gets cleaned at the end of each workflow run
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests_linux_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_lkcpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Restoring cached dependencies
id: kokkos-cache
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lkcuda_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

# Since the self-hosted runner can be re-used. It is best to set up all package
# installations in a virtual environment that gets cleaned at the end of each workflow run
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lkcuda_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

# Since the self-hosted runner can be re-used. It is best to set up all package
# installations in a virtual environment that gets cleaned at the end of each workflow run
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lmps_tncuda_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

# Since the self-hosted runner can be re-used. It is best to set up all package
# installations in a virtual environment that gets cleaned at the end of each workflow run
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lmps_tncuda_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

# Since the self-hosted runner can be re-used. It is best to set up all package
# installations in a virtual environment that gets cleaned at the end of each workflow run
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_lqcpu_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_windows_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v4
Expand Down Expand Up @@ -192,7 +192,7 @@ jobs:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Restoring cached Kokkos
id: kokkos-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_without_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Get required Python packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_dev_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.9'
python-version: '3.10'

- name: Install Python Dependencies
run: pip install semver
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wheel_linux_aarch64.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Wheel::Linux::ARM

# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture ARM 64 and store it as artifacts.
# Python versions: 3.9, 3.10, 3.11, 3.12.
# Python versions: 3.10, 3.11, 3.12.
# **Why we have it**: To build wheels for pennylane-lightning installation.
# **Who does it impact**: Wheels to be uploaded to PyPI.

Expand Down Expand Up @@ -76,8 +76,8 @@ jobs:
-i ${{ matrix.container_img }} \
bash -c "git config --global --add safe.directory /io && \
cd /io && \
python3.9 -m pip install ninja && \
ln -s /opt/python/cp39-cp39/bin/ninja /usr/bin/ninja && \
python3.10 -m pip install ninja && \
ln -s /opt/python/cp310-cp10/bin/ninja /usr/bin/ninja && \
cmake -BBuild . -DCMAKE_INSTALL_PREFIX=/install \
-DKokkos_ENABLE_COMPLEX_ALIGN=OFF \
-DKokkos_ENABLE_SERIAL=ON \
Expand All @@ -103,7 +103,7 @@ jobs:
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
container_img: ["quay.io/pypa/manylinux_2_28_aarch64"]
timeout-minutes: 45
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12" }')[matrix.cibw_build] }})
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12" }')[matrix.cibw_build] }})
runs-on: ${{ matrix.os }}

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wheel_linux_aarch64_cuda.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Wheel::Linux::ARM::CUDA

# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture ARM 64 and store it as artifacts.
# Python versions: 3.9, 3.10, 3.11, 3.12.
# Python versions: 3.10, 3.11, 3.12.
# **Why we have it**: To build wheels for pennylane-lightning installation.
# **Who does it impact**: Wheels to be uploaded to PyPI.

Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
container_img: ["quay.io/pypa/manylinux_2_28_aarch64"]
timeout-minutes: 45
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12" }')[matrix.cibw_build] }})
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12" }')[matrix.cibw_build] }})
runs-on: ${{ matrix.os }}

steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wheel_linux_ppc64le.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Wheel::Linux::PowerPC

# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture PowerPC 64 and store it as artifacts.
# Python versions: 3.9, 3.10, 3.11, 3.12.
# Python versions: 3.10, 3.11, 3.12.
# **Why we have it**: To build wheels for pennylane-lightning installation.
# **Who does it impact**: Wheels to be uploaded to PyPI.

Expand Down Expand Up @@ -76,8 +76,8 @@ jobs:
-i ${{ matrix.container_img }} \
bash -c "git config --global --add safe.directory /io && \
cd /io && \
python3.9 -m pip install ninja && \
ln -s /opt/python/cp39-cp39/bin/ninja /usr/bin/ninja && \
python3.10 -m pip install ninja && \
ln -s /opt/python/cp310-cp310/bin/ninja /usr/bin/ninja && \
cmake -BBuild . -DCMAKE_INSTALL_PREFIX=/install \
-DKokkos_ENABLE_COMPLEX_ALIGN=OFF \
-DKokkos_ENABLE_SERIAL=ON \
Expand All @@ -103,7 +103,7 @@ jobs:
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
container_img: ["quay.io/pypa/manylinux_2_28_ppc64le"]
timeout-minutes: 45
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{"cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12"}')[matrix.cibw_build] }})
name: ${{ matrix.os }}::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{"cp310-*":"3.10","cp311-*":"3.11", "cp312-*":"3.12"}')[matrix.cibw_build] }})
runs-on: ${{ matrix.os }}

steps:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/wheel_linux_x86_64.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Wheel::Linux::x86_64

# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture x86_64 and store it as artifacts.
# Python versions: 3.9, 3.10, 3.11, 3.12.
# Python versions: 3.10, 3.11, 3.12.
# **Why we have it**: To build wheels for pennylane-lightning installation.
# **Who does it impact**: Wheels to be uploaded to PyPI.

Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
kokkos_version: ${{ fromJson(needs.set_wheel_build_matrix.outputs.kokkos_version) }}
container_img: ["quay.io/pypa/manylinux_2_28_x86_64"]
timeout-minutes: 30
name: Linux::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
name: Linux::${{ matrix.arch }} - ${{ matrix.pl_backend }} (Python ${{ fromJson('{ "cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
runs-on: ${{ needs.determine_runner.outputs.runner_group }}
container:
image: ${{ matrix.container_img }}
Expand Down Expand Up @@ -141,10 +141,10 @@ jobs:
dnf update -y && dnf install -y podman

- name: Install dependencies
run: python3.9 -m pip install cibuildwheel~=2.16.0 toml
run: python3.10 -m pip install cibuildwheel~=2.16.0 toml

- name: Configure pyproject.toml file
run: PL_BACKEND="${{ matrix.pl_backend }}" python3.9 scripts/configure_pyproject_toml.py
run: PL_BACKEND="${{ matrix.pl_backend }}" python3.10 scripts/configure_pyproject_toml.py

- name: Build wheels
env:
Expand Down Expand Up @@ -183,12 +183,12 @@ jobs:

CIBW_BUILD_VERBOSITY: 3

run: python3.9 -m cibuildwheel --output-dir wheelhouse
run: python3.10 -m cibuildwheel --output-dir wheelhouse

- name: Validate wheels
run: |
python3.9 -m pip install twine
python3.9 -m twine check ./wheelhouse/*.whl
python3.10 -m pip install twine
python3.10 -m twine check ./wheelhouse/*.whl

- uses: actions-ecosystem/action-regex-match@main
id: rc_build
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/wheel_linux_x86_64_cuda.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Wheel::Linux::x86_64::CUDA

# **What it does**: Builds python wheels for Linux (ubuntu-latest) architecture x86_64 and store it as artifacts.
# Python versions: 3.9, 3.10, 3.11, 3.12.
# Python versions: 3.10, 3.11, 3.12.
# **Why we have it**: To build wheels for pennylane-lightning-gpu installation.
# **Who does it impact**: Wheels to be uploaded to PyPI.
on:
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
container_img: ["quay.io/pypa/manylinux_2_28_x86_64"]
timeout-minutes: 30
name: Linux::${{ matrix.arch }} - ${{ matrix.pl_backend }} CUDA ${{ matrix.cuda_version }} (Python ${{ fromJson('{ "cp39-*":"3.9","cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
name: Linux::${{ matrix.arch }} - ${{ matrix.pl_backend }} CUDA ${{ matrix.cuda_version }} (Python ${{ fromJson('{"cp310-*":"3.10","cp311-*":"3.11","cp312-*":"3.12" }')[matrix.cibw_build] }})
runs-on: ${{ needs.determine_runner.outputs.runner_group }}
container:
image: ${{ matrix.container_img }}
Expand All @@ -68,10 +68,10 @@ jobs:
dnf update -y && dnf install -y podman

- name: Install dependencies
run: python3.9 -m pip install cibuildwheel~=2.16.0 toml
run: python3.10 -m pip install cibuildwheel~=2.16.0 toml

- name: Configure pyproject.toml file
run: PL_BACKEND="${{ matrix.pl_backend }}" python3.9 scripts/configure_pyproject_toml.py
run: PL_BACKEND="${{ matrix.pl_backend }}" python3.10 scripts/configure_pyproject_toml.py

- name: Build wheels
env:
Expand Down Expand Up @@ -106,12 +106,12 @@ jobs:

CIBW_BUILD_VERBOSITY: 3

run: python3.9 -m cibuildwheel --output-dir wheelhouse
run: python3.10 -m cibuildwheel --output-dir wheelhouse

- name: Validate wheels
run: |
python3.9 -m pip install twine
python3.9 -m twine check ./wheelhouse/*.whl
python3.10 -m pip install twine
python3.10 -m twine check ./wheelhouse/*.whl

- uses: actions-ecosystem/action-regex-match@main
id: rc_build
Expand Down
Loading
Loading