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

Drop Python 3.8 support #1477

Merged
merged 4 commits into from
Mar 31, 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
2 changes: 1 addition & 1 deletion .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Run pycln
run: mapfile -t files < filelist.txt && python3 -m pycln --all --disable-all-dunder-policy -- "${files[@]}"
- name: Run pyupgrade
run: mapfile -t files < filelist.txt && python3 -m pyupgrade --keep-runtime-typing --py38-plus --exit-zero-even-if-changed -- "${files[@]}"
run: mapfile -t files < filelist.txt && python3 -m pyupgrade --keep-runtime-typing --py39-plus --exit-zero-even-if-changed -- "${files[@]}"
- name: Run black
run: mapfile -t files < filelist.txt && python3 -m black -- "${files[@]}"
- name: Run isort
Expand Down
29 changes: 13 additions & 16 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ on:

jobs:
mypy:
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
# Mypy running on platform A can check for platform B, so it all runs on linux.
# Multiple parallel jobs are needed only to make this faster.
mypy-platform: ["linux", "win32", "darwin"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -17,23 +23,16 @@ jobs:
- run: pip install wheel
- run: pip install -r requirements-dev.txt
- run: |
time mypy --platform linux --python-version 3.8 porcupine docs/extensions.py
time mypy --platform linux --python-version 3.9 porcupine docs/extensions.py
time mypy --platform linux --python-version 3.10 porcupine docs/extensions.py
time mypy --platform win32 --python-version 3.8 porcupine docs/extensions.py
time mypy --platform win32 --python-version 3.9 porcupine docs/extensions.py
time mypy --platform win32 --python-version 3.10 porcupine docs/extensions.py
time mypy --platform darwin --python-version 3.8 porcupine docs/extensions.py
time mypy --platform darwin --python-version 3.9 porcupine docs/extensions.py
time mypy --platform darwin --python-version 3.10 porcupine docs/extensions.py
time mypy --platform darwin --python-version 3.11 porcupine docs/extensions.py
time mypy --platform ${{ matrix.mypy-platform }} --python-version 3.9 porcupine docs/extensions.py
time mypy --platform ${{ matrix.mypy-platform }} --python-version 3.10 porcupine docs/extensions.py
time mypy --platform ${{ matrix.mypy-platform }} --python-version 3.11 porcupine docs/extensions.py

pytest-windows:
timeout-minutes: 10
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -53,7 +52,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -73,17 +72,15 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]
env:
# TODO: how to install tkdnd on mac? add instructions to README or make mac app that bundles it
TCLLIBPATH: ./lib
PYTHON: /usr/local/opt/python@${{ matrix.python-version }}/libexec/bin/python
steps:
- uses: actions/checkout@v4
- run: brew install python@${{ matrix.python-version }}
# https://stackoverflow.com/a/66919851
- if: matrix.python-version != '3.8'
run: brew install python-tk@${{ matrix.python-version }}
- run: brew install python-tk@${{ matrix.python-version }}
- run: $PYTHON --version
- run: $PYTHON -m pip install -r requirements-dev.txt
- run: $PYTHON scripts/download-tkdnd.py
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8" # last version supporting windows 7
# This should be the oldest python version we support, so it is
# backwards-compatible for older windows versions.
python-version: "3.9"
cache: pip
- run: pip install wheel
- run: pip install -r requirements-dev.txt
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ I have tried to make contributing easy:
Just make a PR and I will edit it as needed.

To get started, make a fork of Porcupine with the button in the top right corner of this page.
Then install Python 3.8 or newer and [git](https://git-scm.com/), and run these commands:
Then install Python 3.9 or newer and [git](https://git-scm.com/), and run these commands:

git clone https://github.com/YourUserName/porcupine
cd porcupine
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ and then deleting `porcupine-venv`.
<details>
<summary>Other Linux distributions</summary>

Install Python 3.8 or newer with pip and tkinter somehow.
Install Python 3.9 or newer with pip and tkinter somehow.
If you want drag and drop support, also install tkdnd for the Tcl interpreter that tkinter uses.
Then run these commands:

Expand Down
Loading