From 02b4085598fdbb774927140baf55e250f038d26b Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 30 Mar 2026 18:58:57 +0800 Subject: [PATCH] gh-146444: Don't package as part of iOS 'build hosts' target (GH-146628) * Revert Py3.9 compatibility fixes. * Only build the package on 'build all'. (cherry picked from commit 6420847bdaa945fb13251d3f93968946c0f3444f) Co-authored-by: Russell Keith-Magee --- Apple/.ruff.toml | 3 --- Apple/__main__.py | 5 ++--- Apple/testbed/__main__.py | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Apple/.ruff.toml b/Apple/.ruff.toml index ce3be314f690d7..4cdc39ebee4be9 100644 --- a/Apple/.ruff.toml +++ b/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/Apple/__main__.py b/Apple/__main__.py index 862a471cb8c142..af20fce67daee1 100644 --- a/Apple/__main__.py +++ b/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 @@ -769,7 +768,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) diff --git a/Apple/testbed/__main__.py b/Apple/testbed/__main__.py index 96da1f9c7525f1..0dd77ab8b82797 100644 --- a/Apple/testbed/__main__.py +++ b/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, ):