From 0221c05226bc68fd3383e2eac4b24af9c9e78a39 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 30 Mar 2026 18:18:59 +0800 Subject: [PATCH 1/2] Revert Py3.9 compatibility fixes. --- Platforms/Apple/.ruff.toml | 3 --- Platforms/Apple/__main__.py | 3 +-- Platforms/Apple/testbed/__main__.py | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Platforms/Apple/.ruff.toml b/Platforms/Apple/.ruff.toml index a10de0edb804f4..f5d74fdb6afe87 100644 --- a/Platforms/Apple/.ruff.toml +++ b/Platforms/Apple/.ruff.toml @@ -1,8 +1,5 @@ extend = "../../.ruff.toml" # Inherit the project-wide settings -# iOS buildbot worker uses Python 3.9 -target-version = "py39" - [format] preview = true docstring-code-format = true diff --git a/Platforms/Apple/__main__.py b/Platforms/Apple/__main__.py index 9b51f8a3b75514..c646a222bc630f 100644 --- a/Platforms/Apple/__main__.py +++ b/Platforms/Apple/__main__.py @@ -52,10 +52,9 @@ from os.path import basename, relpath from pathlib import Path from subprocess import CalledProcessError -from typing import Union EnvironmentT = dict[str, str] -ArgsT = Sequence[Union[str, Path]] +ArgsT = Sequence[str | Path] SCRIPT_NAME = Path(__file__).name PYTHON_DIR = Path(__file__).resolve().parent.parent.parent diff --git a/Platforms/Apple/testbed/__main__.py b/Platforms/Apple/testbed/__main__.py index 96da1f9c7525f1..0dd77ab8b82797 100644 --- a/Platforms/Apple/testbed/__main__.py +++ b/Platforms/Apple/testbed/__main__.py @@ -7,7 +7,6 @@ import subprocess import sys from pathlib import Path -from typing import Union TEST_SLICES = { "iOS": "ios-arm64_x86_64-simulator", @@ -263,7 +262,7 @@ def update_test_plan(testbed_path, platform, args): def run_testbed( platform: str, - simulator: Union[str, None], + simulator: str | None, args: list[str], verbose: bool = False, ): From 9c1c0ae72fe92093d8f97bb67995db1ad8168874 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 30 Mar 2026 18:19:37 +0800 Subject: [PATCH 2/2] Only build the package on 'build all'. --- Platforms/Apple/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platforms/Apple/__main__.py b/Platforms/Apple/__main__.py index c646a222bc630f..44a991c6c20a93 100644 --- a/Platforms/Apple/__main__.py +++ b/Platforms/Apple/__main__.py @@ -771,7 +771,7 @@ def build(context: argparse.Namespace, host: str | None = None) -> None: ]: step(context, host=step_host) - if host in {"all", "hosts"}: + if host == "all": package(context)