diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 76b2dd514..dac9d0095 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -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 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 03de53c08..c5e36572f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 @@ -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 @@ -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 @@ -73,7 +72,7 @@ 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 @@ -81,9 +80,7 @@ jobs: 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 diff --git a/.github/workflows/release-builds.yml b/.github/workflows/release-builds.yml index cf88d5397..0f58d615b 100644 --- a/.github/workflows/release-builds.yml +++ b/.github/workflows/release-builds.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36e6f52d1..e63dfcd04 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 diff --git a/README.md b/README.md index fc6c4086b..96b517fcf 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ and then deleting `porcupine-venv`.
Other Linux distributions -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: