https://github.com/python/cpython/commit/558936bec1f1e0f8346063a8cb2b2782d085178e
commit: 558936bec1f1e0f8346063a8cb2b2782d085178e
branch: main
author: Russell Keith-Magee <[email protected]>
committer: freakboy3742 <[email protected]>
date: 2025-11-13T05:41:26+08:00
summary:

gh-141442: Add escaping to iOS testbed arguments (#141443)

Xcode concatenates the test argument array, losing quoting in the process.

files:
A Misc/NEWS.d/next/Tools-Demos/2025-11-12-12-54-28.gh-issue-141442.50dS3P.rst
M Apple/testbed/__main__.py

diff --git a/Apple/testbed/__main__.py b/Apple/testbed/__main__.py
index 42eb60a4c8dc02..49974cb142853c 100644
--- a/Apple/testbed/__main__.py
+++ b/Apple/testbed/__main__.py
@@ -2,6 +2,7 @@
 import json
 import os
 import re
+import shlex
 import shutil
 import subprocess
 import sys
@@ -252,7 +253,7 @@ def update_test_plan(testbed_path, platform, args):
         test_plan = json.load(f)
 
     test_plan["defaultOptions"]["commandLineArgumentEntries"] = [
-        {"argument": arg} for arg in args
+        {"argument": shlex.quote(arg)} for arg in args
     ]
 
     with test_plan_path.open("w", encoding="utf-8") as f:
diff --git 
a/Misc/NEWS.d/next/Tools-Demos/2025-11-12-12-54-28.gh-issue-141442.50dS3P.rst 
b/Misc/NEWS.d/next/Tools-Demos/2025-11-12-12-54-28.gh-issue-141442.50dS3P.rst
new file mode 100644
index 00000000000000..073c070413f7e0
--- /dev/null
+++ 
b/Misc/NEWS.d/next/Tools-Demos/2025-11-12-12-54-28.gh-issue-141442.50dS3P.rst
@@ -0,0 +1 @@
+The iOS testbed now correctly handles test arguments that contain spaces.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to