From beba5f8fc982716ae13afdf48dbaca5fa893518f Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 17 Oct 2024 07:36:27 +0800 Subject: [PATCH 1/3] Bump Pillow dependency for testbed. --- .github/workflows/ci.yml | 12 ++++++------ docs/how-to/contribute/code.rst | 6 ------ testbed/pyproject.toml | 4 +--- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dc348c51f..d0c2035cf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -203,7 +203,8 @@ jobs: # the system Python version to become inconsistent from run to run. - backend: "linux-x11" platform: "linux" - runs-on: "ubuntu-22.04" + runs-on: "ubuntu-24.04" + python-version: "system" # The package list should be the same as in tutorial-0.rst, and the BeeWare # tutorial, plus blackbox to provide a window manager. We need a window # manager that is reasonably lightweight, honors full screen mode, and @@ -233,6 +234,7 @@ jobs: - backend: "linux-wayland" platform: "linux" runs-on: "ubuntu-24.04" + python-version: "system" # The package list should be the same as in tutorial-0.rst, and the BeeWare # tutorial, plus mutter to provide a window manager. pre-command: | @@ -261,6 +263,7 @@ jobs: - backend: "textual-linux" platform: "linux" runs-on: "ubuntu-latest" + python-version: "system" setup-python: false # Use the system Python packages briefcase-run-args: --config 'requires=["../core","../textual"]' --config 'console_app=true' app-user-data-path: "$HOME/.local/share/testbed" @@ -291,6 +294,7 @@ jobs: - backend: "android" platform: "android" runs-on: "ubuntu-latest" + python-version: "system" briefcase-run-prefix: JAVA_HOME=${JAVA_HOME_17_X64} briefcase-run-args: >- --device '{"avd":"beePhone","skin":"pixel_3a"}' @@ -320,11 +324,7 @@ jobs: uses: actions/setup-python@v5.2.0 if: matrix.setup-python with: - # We're not using Python 3.11 yet, because: - # * The testbed's ProxyEventLoop has some problems with it - # (https://github.com/beeware/toga/issues/1982). - # * It doesn't have an Android build of Pillow yet. - python-version: "3.10" + python-version: ${{ matrix.python-version || '3.12' }} - name: Install Dependencies env: diff --git a/docs/how-to/contribute/code.rst b/docs/how-to/contribute/code.rst index 7f53c6af09..1026aed7dd 100644 --- a/docs/how-to/contribute/code.rst +++ b/docs/how-to/contribute/code.rst @@ -672,12 +672,6 @@ test mode: (venv) C:\...>cd testbed (venv) C:\...>briefcase dev --test -.. note:: - - To test iOS and Android, you *must* use Python 3.10. The testbed app uses a number - of binary packages, and the specific combination of versions that are used are - currently only available for Python 3.10. - This will display a Toga app window, which will flash as it performs all the GUI tests. You'll then see a coverage report for the code that has been executed. diff --git a/testbed/pyproject.toml b/testbed/pyproject.toml index 7ea831b2b3..2b7ac7f518 100644 --- a/testbed/pyproject.toml +++ b/testbed/pyproject.toml @@ -1,8 +1,6 @@ [project] name = "testbed" version = "0.0.1" -# This *should* be a consistent version, but we need to support 3.12 for Wayland testing, and 3.10 for iOS and Android. -# requires-python = "~=3.10.0" [project.optional-dependencies] test = [ @@ -12,7 +10,7 @@ test = [ # sys.platform == 'linux' as there's no dependency identifier # that can target Android exclusively until 3.13 lands. "fonttools==4.54.1 ; sys.platform == 'linux'", - "pillow==9.2.0", + "pillow==11.0.0", "pytest==8.3.3", "pytest-asyncio==0.24.0", ] From 8309c726e4a55f3f11ec4ed2b5eb239188b4ff76 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 17 Oct 2024 07:45:34 +0800 Subject: [PATCH 2/3] Add changenote. --- changes/2883.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/2883.bugfix.rst diff --git a/changes/2883.bugfix.rst b/changes/2883.bugfix.rst new file mode 100644 index 0000000000..4ab1e81e61 --- /dev/null +++ b/changes/2883.bugfix.rst @@ -0,0 +1 @@ +The testbed app can now be run on *any* supported Python version. From 940020819a1ddad652f1dd4a6c40d5573605c568 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Thu, 17 Oct 2024 07:52:06 +0800 Subject: [PATCH 3/3] Can't reference system if we're not using the workflow that supports that value. --- .github/workflows/ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0c2035cf2..32d62488cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -204,7 +204,6 @@ jobs: - backend: "linux-x11" platform: "linux" runs-on: "ubuntu-24.04" - python-version: "system" # The package list should be the same as in tutorial-0.rst, and the BeeWare # tutorial, plus blackbox to provide a window manager. We need a window # manager that is reasonably lightweight, honors full screen mode, and @@ -234,7 +233,6 @@ jobs: - backend: "linux-wayland" platform: "linux" runs-on: "ubuntu-24.04" - python-version: "system" # The package list should be the same as in tutorial-0.rst, and the BeeWare # tutorial, plus mutter to provide a window manager. pre-command: | @@ -263,7 +261,6 @@ jobs: - backend: "textual-linux" platform: "linux" runs-on: "ubuntu-latest" - python-version: "system" setup-python: false # Use the system Python packages briefcase-run-args: --config 'requires=["../core","../textual"]' --config 'console_app=true' app-user-data-path: "$HOME/.local/share/testbed" @@ -294,7 +291,6 @@ jobs: - backend: "android" platform: "android" runs-on: "ubuntu-latest" - python-version: "system" briefcase-run-prefix: JAVA_HOME=${JAVA_HOME_17_X64} briefcase-run-args: >- --device '{"avd":"beePhone","skin":"pixel_3a"}' @@ -324,7 +320,7 @@ jobs: uses: actions/setup-python@v5.2.0 if: matrix.setup-python with: - python-version: ${{ matrix.python-version || '3.12' }} + python-version: "3.12" - name: Install Dependencies env: