From 727e6d08874b382afd9dd5139fd28349eb497227 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 13 Nov 2026 09:38:45 +0800 Subject: [PATCH 1/2] Add CI testing for Python 3.16. --- .github/workflows/ci.yml | 7 +++---- pyproject.toml | 18 +++++++----------- tests/test_thirdparty.py | 21 --------------------- 3 files changed, 10 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4434eb4..6a39db6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,11 +47,12 @@ jobs: # completes in minutes. # - "linux-appimage" - "linux-flatpak" + - "linux-system" - "windows-VisualStudio" - "windows-app" - "iOS" - "android" - python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"] + python-version: [ "3.11", "3.12", "3.13", "3.14", "3.15", "3.16" ] include: - runs-on: ubuntu-24.04 @@ -94,13 +95,11 @@ jobs: - backend: iOS runs-on: macos-26 briefcase-target: "iOS" - briefcase-run-args: ' -d "iPhone 17e::iOS 26.5"' - backend: android runs-on: ubuntu-24.04 briefcase-target: "android" briefcase-run-args: > - --device '{"avd":"beePhone","device_type":"pixel"}' --Xemulator=-no-window --Xemulator=-no-snapshot --Xemulator=-no-audio @@ -114,7 +113,7 @@ jobs: sudo udevadm trigger --name-match=kvm exclude: - backend: android - python-version: "3.15" + python-version: "3.16" steps: - name: Checkout diff --git a/pyproject.toml b/pyproject.toml index fc5b26c..d23a044 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,21 +27,17 @@ requires = [ """cryptography < 49.0; \ (platform_system != 'Android' and python_version < '3.15') \ or (platform_system == 'Android' and python_version < '3.14')""", - # lru_dict available everywhere - """lru_dict; \ - (platform_system != 'Android' and python_version < '3.15') \ - or (platform_system == 'Android' and python_version < '3.14')""", - # pillow not available anywhere on 3.15, or on Android for 3.14+. + # pillow not available anywhere on 3.16, or on Android for 3.14+. """pillow; \ - (platform_system != 'Android' and python_version < '3.15') \ + (platform_system != 'Android' and python_version < '3.16') \ or (platform_system == 'Android' and python_version < '3.14')""", - # pyspamum has 3.13 wheels on iOS and Android; and no wheels on Windows + # pyspamsum has 3.15 wheels on iOS and Android; and no wheels on Windows # On Linux, we need to restrict the test to Python3.13+, because Android reports # as "Linux" on Python3.12 and earlier. """pyspamsum; \ - (platform_system == 'Darwin' and python_version < '3.15') \ - or (platform_system == 'iOS' and python_version >= '3.13' and python_version < '3.15') \ - or (platform_system == 'Android' and python_version < '3.15') \ + (platform_system == 'Darwin' and python_version < '3.16') \ + or (platform_system == 'iOS' and python_version >= '3.13' and python_version < '3.16') \ + or (platform_system == 'Android' and python_version < '3.16') \ or (platform_system == 'Linux' and python_version >= '3.13')""", # Numpy not available on 3.14 on Android. """numpy; \ @@ -63,7 +59,7 @@ requirement_installer_args = [ requires = [ # Provide a source of binary wheels that aren't provided on PyPI. "rubicon-objc", - "std-nslog~=2.0.0", + "std-nslog~=2.0.0; python_version < '3.14'", ] # support_package = "../Python-Apple-support/dist/Python-3.14-macOS-support.custom.tar.gz" diff --git a/tests/test_thirdparty.py b/tests/test_thirdparty.py index 1749805..d6e4efd 100644 --- a/tests/test_thirdparty.py +++ b/tests/test_thirdparty.py @@ -134,27 +134,6 @@ def test_pyspamsum(): ) -@xfail_if_not_installed("lru-dict") -def test_lru_dict(): - "The LRUDict binary module can be used" - # lru-dict is the simplest possible example of a third-party module. - # It is pure C, built using distutils, with no dependencies. - from lru import LRU - - lru_dict = LRU(5) - - # Add 10 items - for i in range(10): - lru_dict[f"item_{i}"] = i - - # Items 0-4 have been evicted - for i in range(5): - assert f"item_{i}" not in lru_dict - # Items 5-9 are still there - for i in range(5, 10): - assert lru_dict[f"item_{i}"] == i - - @xfail_if_not_installed("pillow") def test_pillow(): "Pillow can be used to load images" From c9608265e321d1e43a9c606c6f39796a3696778c Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Fri, 13 Nov 2026 09:51:10 +0800 Subject: [PATCH 2/2] Don't try to build linux-system across the build matrix. --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a39db6..5d805a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,13 +41,15 @@ jobs: backend: - "macOS-Xcode" - "macOS-app" + # Linux system builds require the system Python, so they can't be included + # in the build matrix. It's included as a once-off explicit inclusion. + # - "linux-system" # AppImage builds (a) take over an hour, because the need to compile Numpy and # Pandas from source, and (b) are only here as a light validation that # Standalone Python is working. A Flatpak build also validates this, but # completes in minutes. # - "linux-appimage" - "linux-flatpak" - - "linux-system" - "windows-VisualStudio" - "windows-app" - "iOS"