From 0b6014b9803cef879237c87a2556c17542e152ff Mon Sep 17 00:00:00 2001 From: Anderson Entwistle <46688047+aentwist@users.noreply.github.com> Date: Thu, 30 May 2024 15:38:59 -0600 Subject: [PATCH 1/3] ci: python versions should match pyproject.toml --- .github/workflows/ci.yml | 3 ++- .github/workflows/publish.yml | 9 ++++++--- pyproject.toml | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a8e74a..4387fb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,8 @@ jobs: runs-on: "${{ matrix.os }}" strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + # Should match the python versions in pyproject.toml and publish.yml + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [windows-latest, ubuntu-latest, macos-latest] env: OS: ${{ matrix.os }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ff76c17..5b2a76c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,7 +11,8 @@ jobs: runs-on: "${{ matrix.os }}" strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + # Should match the python versions in pyproject.toml and ci.yml + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [windows-latest, ubuntu-latest, macos-latest] env: OS: ${{ matrix.os }} @@ -51,7 +52,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: "3.10" + # Use the latest python version we support + python-version: "3.12" - name: Install dependencies run: | python -m pip install --upgrade pip poetry @@ -71,7 +73,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: "3.10" + # Just use the latest python version we support + python-version: "3.12" - name: Install dependencies run: | python -m pip install --upgrade pip poetry diff --git a/pyproject.toml b/pyproject.toml index 6cfce5f..e49f9b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ packages = [ py-scrcpy = "scrcpy_ui:main" [tool.poetry.dependencies] +# Should match the python versions in .github/workflows/ci.yml and publish.yml python = ">=3.8,<3.13" av = "^12" opencv-python = "^4.5.0" From 9a326343f2f1eb6ed1213822f00648a101b62ba3 Mon Sep 17 00:00:00 2001 From: Anderson Entwistle <46688047+aentwist@users.noreply.github.com> Date: Thu, 30 May 2024 15:59:21 -0600 Subject: [PATCH 2/3] ci: upgrade setup-python from v1/2 to v5 --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4387fb8..e7df902 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5b2a76c..b147871 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -50,7 +50,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: # Use the latest python version we support python-version: "3.12" @@ -71,7 +71,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: # Just use the latest python version we support python-version: "3.12" From 147ed12344323f16516c15f239943d21c46b9f7d Mon Sep 17 00:00:00 2001 From: Anderson Entwistle <46688047+aentwist@users.noreply.github.com> Date: Thu, 30 May 2024 16:22:01 -0600 Subject: [PATCH 3/3] ci(deps)!: flake8 should work Upgrade flake8 from 4 to 7. This upgrades pycodestyle. It also upgrades pyflakes from 2 to 3. BREAKING CHANGE: Upgrade the minimum Python version from 3.8.0 to 3.8.1 --- poetry.lock | 42 +++++++++++++++++++++--------------------- pyproject.toml | 4 ++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/poetry.lock b/poetry.lock index fbd9706..0a37d1e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -430,19 +430,19 @@ test = ["pytest (>=6)"] [[package]] name = "flake8" -version = "4.0.1" +version = "7.0.0" description = "the modular source code checker: pep8 pyflakes and co" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8.1" files = [ - {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, - {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, + {file = "flake8-7.0.0-py2.py3-none-any.whl", hash = "sha256:a6dfbb75e03252917f2473ea9653f7cd799c3064e54d4c8140044c5c065f53c3"}, + {file = "flake8-7.0.0.tar.gz", hash = "sha256:33f96621059e65eec474169085dc92bf26e7b2d47366b70be2f67ab80dc25132"}, ] [package.dependencies] -mccabe = ">=0.6.0,<0.7.0" -pycodestyle = ">=2.8.0,<2.9.0" -pyflakes = ">=2.4.0,<2.5.0" +mccabe = ">=0.7.0,<0.8.0" +pycodestyle = ">=2.11.0,<2.12.0" +pyflakes = ">=3.2.0,<3.3.0" [[package]] name = "idna" @@ -596,13 +596,13 @@ files = [ [[package]] name = "mccabe" -version = "0.6.1" +version = "0.7.0" description = "McCabe checker, plugin for flake8" optional = false -python-versions = "*" +python-versions = ">=3.6" files = [ - {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, - {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, + {file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"}, + {file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"}, ] [[package]] @@ -931,13 +931,13 @@ files = [ [[package]] name = "pycodestyle" -version = "2.8.0" +version = "2.11.1" description = "Python style guide checker" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.8" files = [ - {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, - {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, + {file = "pycodestyle-2.11.1-py2.py3-none-any.whl", hash = "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67"}, + {file = "pycodestyle-2.11.1.tar.gz", hash = "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f"}, ] [[package]] @@ -953,13 +953,13 @@ files = [ [[package]] name = "pyflakes" -version = "2.4.0" +version = "3.2.0" description = "passive checker of Python programs" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.8" files = [ - {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, - {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, + {file = "pyflakes-3.2.0-py2.py3-none-any.whl", hash = "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a"}, + {file = "pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f"}, ] [[package]] @@ -1404,5 +1404,5 @@ ui = ["PySide6"] [metadata] lock-version = "2.0" -python-versions = ">=3.8,<3.13" -content-hash = "1f30edde1d74329a439b50cb5d6176dd7b5f554275e2384f9022cc6676150f4c" +python-versions = ">=3.8.1,<3.13" +content-hash = "f412d678950ba985114bd2de9f183ff6becfba719add14c307b10a44c88a22c6" diff --git a/pyproject.toml b/pyproject.toml index e49f9b5..f8fa848 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ py-scrcpy = "scrcpy_ui:main" [tool.poetry.dependencies] # Should match the python versions in .github/workflows/ci.yml and publish.yml -python = ">=3.8,<3.13" +python = ">=3.8.1,<3.13" av = "^12" opencv-python = "^4.5.0" adbutils = "^1.0.8" @@ -28,7 +28,7 @@ PySide6 = { version = "^6.0.0", optional = true } ui = ["PySide6"] [tool.poetry.dev-dependencies] -flake8 = "^4.0.1" +flake8 = "^7" isort = "*" black = "^22.3.0" pytest = "^7.1.2"