Skip to content

Commit

Permalink
Remove Python 3.9 in favour of 3.10 as minimum (#6223)
Browse files Browse the repository at this point in the history
### Before submitting

Please complete the following checklist when submitting a PR:

- [x] All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to
the
      test directory!

- [x] All new functions and code must be clearly commented and
documented.
If you do make documentation changes, make sure that the docs build and
      render correctly by running `make docs`.

- [x] Ensure that the test suite passes, by running `make test`.

- [x] Add a new entry to the `doc/releases/changelog-dev.md` file,
summarizing the
      change, and including a link back to the PR.

- [x] The PennyLane source code conforms to
      [PEP8 standards](https://www.python.org/dev/peps/pep-0008/).
We check all of our code against [Pylint](https://www.pylint.org/).
      To lint modified files, simply `pip install pylint`, and then
      run `pylint pennylane/path/to/file.py`.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


------------------------------------------------------------------------------------------------------------

**Context:** Remove Py 3.9 from the CI runners and package metadata.

**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**
  • Loading branch information
mlxd committed Sep 6, 2024
1 parent 1d8004a commit 713a33d
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 25 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.10"

- name: Install dependencies
run: pip install black pylint==2.7.4 isort==5.13.2
Expand All @@ -31,13 +31,13 @@ jobs:

- name: Run Black
run: |
black -t py39 -t py310 -t py311 -l 100 pennylane/ --check
black -t py39 -t py310 -t py311 -l 100 tests/ --check
black -t py310 -t py311 -t py312 -l 100 pennylane/ --check
black -t py310 -t py311 -t py312 -l 100 tests/ --check
- name: Run isort
run: |
isort --py 311 --profile black -l 100 -o autoray -p ./pennylane --skip __init__.py --filter-files ./pennylane --check
isort --py 311 --profile black -l 100 -o autoray -p ./pennylane --skip __init__.py --filter-files ./tests --check
isort --py 312 --profile black -l 100 -o autoray -p ./pennylane --skip __init__.py --filter-files ./pennylane --check
isort --py 312 --profile black -l 100 -o autoray -p ./pennylane --skip __init__.py --filter-files ./tests --check
- name: Run Pylint (source files)
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install_deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
python_version:
description: The version of Python to use in order to run unit tests
required: false
default: '3.9'
default: '3.10'
install_jax:
description: Indicate if JAX should be installed or not
required: false
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/interface-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
Indicate if a lightened version of the CI should be run instead of the entire suite.
The lightened version of the CI includes the following changes:
- Only Python 3.9 is tested against, instead of 3.9, 3.10, 3.11, 3.12
- Only Python 3.10 is tested against, instead of 3.10, 3.11, 3.12
required: false
type: boolean
default: false
Expand Down Expand Up @@ -63,23 +63,23 @@ jobs:
then
cat >python_versions.json <<-EOF
{
"default": ["3.9"]
"default": ["3.10"]
}
EOF
else
cat >python_versions.json <<-EOF
{
"default": ["3.9", "3.10", "3.11", "3.12"],
"torch-tests": ["3.9", "3.11"],
"tf-tests": ["3.9", "3.11"],
"jax-tests": ["3.9", "3.12"],
"all-interfaces-tests": ["3.9"],
"external-libraries-tests": ["3.9"],
"qcut-tests": ["3.9"],
"qchem-tests": ["3.9"],
"gradients-tests": ["3.9"],
"data-tests": ["3.9", "3.10"],
"device-tests": ["3.9"]
"default": ["3.10", "3.11", "3.12"],
"torch-tests": ["3.10", "3.12"],
"tf-tests": ["3.10", "3.12"],
"jax-tests": ["3.10", "3.12"],
"all-interfaces-tests": ["3.10"],
"external-libraries-tests": ["3.10"],
"qcut-tests": ["3.10"],
"qchem-tests": ["3.10"],
"gradients-tests": ["3.10"],
"data-tests": ["3.10"],
"device-tests": ["3.10"]
}
EOF
fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
max-parallel: 2
matrix:
python-version:
- 3.9
- '3.10'
- '3.11'
- '3.12'

env:
SUITE: gpu
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
description: The version of Python to use in order to run unit tests
required: false
type: string
default: '3.9'
default: '3.10'
pipeline_mode:
description: The pipeline mode can be unit-tests, benchmarks, or reference-benchmark
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: "3.10"

- name: Build PennyLane wheel
run: |
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.10"
apt_packages:
- graphviz

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

## Installation

PennyLane requires Python version 3.9 and above. Installation of PennyLane, as well as all
PennyLane requires Python version 3.10 and above. Installation of PennyLane, as well as all
dependencies, can be done using pip:

```console
Expand Down
4 changes: 4 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

<h3>Breaking changes 💔</h3>

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

* `DefaultQubitTF` is removed. Please use `default.qubit` for all interfaces.
[(#6207)](https://github.com/PennyLaneAI/pennylane/pull/6207)

Expand Down Expand Up @@ -62,3 +65,4 @@ Guillermo Alonso
Utkarsh Azad
Christina Lee
William Maxwell
Lee J. O'Riordan
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down

0 comments on commit 713a33d

Please sign in to comment.