Skip to content

Commit 31d843c

Browse files
committed
gh-146444: Make Platforms/Apple/ compatible with Python 3.9
Replace "str | None" with typing.Union[str, None].
1 parent 2cf6a68 commit 31d843c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Platforms/Apple/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@
5252
from os.path import basename, relpath
5353
from pathlib import Path
5454
from subprocess import CalledProcessError
55+
from typing import Union
5556

5657
EnvironmentT = dict[str, str]
57-
ArgsT = Sequence[str | Path]
58+
ArgsT = Sequence[Union[str, Path]]
5859

5960
SCRIPT_NAME = Path(__file__).name
6061
PYTHON_DIR = Path(__file__).resolve().parent.parent.parent

Platforms/Apple/testbed/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import subprocess
88
import sys
99
from pathlib import Path
10+
from typing import Union
1011

1112
TEST_SLICES = {
1213
"iOS": "ios-arm64_x86_64-simulator",
@@ -262,7 +263,7 @@ def update_test_plan(testbed_path, platform, args):
262263

263264
def run_testbed(
264265
platform: str,
265-
simulator: str | None,
266+
simulator: Union[str, None],
266267
args: list[str],
267268
verbose: bool = False,
268269
):

0 commit comments

Comments
 (0)