https://github.com/python/cpython/commit/daacd2d9a2b47ee277f398ed024afe6ced6f039f
commit: daacd2d9a2b47ee277f398ed024afe6ced6f039f
branch: main
author: Russell Keith-Magee <[email protected]>
committer: freakboy3742 <[email protected]>
date: 2026-09-24T06:54:43Z
summary:
gh-158051: Update testbed to support Xcode 27 (#158052)
Modify testbed to target iOS 15 as a minimum, and use a UIScene lifecycle.
These changes are required by Xcode 27, but are backwards compatible to
at least Xcode 16.
files:
A Misc/NEWS.d/next/Tests/2026-09-24-10-40-28.gh-issue-158051.B1ZBTA.rst
A Platforms/Apple/testbed/iOSTestbed/SceneDelegate.h
A Platforms/Apple/testbed/iOSTestbed/SceneDelegate.m
M Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj
M Platforms/Apple/testbed/iOSTestbed/AppDelegate.m
M Platforms/Apple/testbed/iOSTestbed/iOSTestbed-Info.plist
diff --git
a/Misc/NEWS.d/next/Tests/2026-09-24-10-40-28.gh-issue-158051.B1ZBTA.rst
b/Misc/NEWS.d/next/Tests/2026-09-24-10-40-28.gh-issue-158051.B1ZBTA.rst
new file mode 100644
index 000000000000000..202fb12086210c7
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2026-09-24-10-40-28.gh-issue-158051.B1ZBTA.rst
@@ -0,0 +1 @@
+The iOS testbed has been updated for compatibilty with Xcode 27.
diff --git a/Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj
b/Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj
index f8835a3bc587df5..1f9e3f23a02dcaf 100644
--- a/Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj
+++ b/Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj
@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
607A66172B0EFA380010BFC8 /* AppDelegate.m in Sources */ = {isa
= PBXBuildFile; fileRef = 607A66162B0EFA380010BFC8 /* AppDelegate.m */; };
+ 71CB095279CCE565BAFB69C3 /* SceneDelegate.m in Sources */ =
{isa = PBXBuildFile; fileRef = D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */;
};
607A66222B0EFA390010BFC8 /* Assets.xcassets in Resources */ =
{isa = PBXBuildFile; fileRef = 607A66212B0EFA390010BFC8 /* Assets.xcassets */;
};
607A66252B0EFA390010BFC8 /* LaunchScreen.storyboard in
Resources */ = {isa = PBXBuildFile; fileRef = 607A66232B0EFA390010BFC8 /*
LaunchScreen.storyboard */; };
607A66282B0EFA390010BFC8 /* main.m in Sources */ = {isa =
PBXBuildFile; fileRef = 607A66272B0EFA390010BFC8 /* main.m */; };
@@ -59,6 +60,8 @@
607A66122B0EFA380010BFC8 /* iOSTestbed.app */ = {isa =
PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0;
path = iOSTestbed.app; sourceTree = BUILT_PRODUCTS_DIR; };
607A66152B0EFA380010BFC8 /* AppDelegate.h */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h;
sourceTree = "<group>"; };
607A66162B0EFA380010BFC8 /* AppDelegate.m */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m;
sourceTree = "<group>"; };
+ 83DC5E71F9D64737365A3BE4 /* SceneDelegate.h */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h;
sourceTree = "<group>"; };
+ D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path =
SceneDelegate.m; sourceTree = "<group>"; };
607A66212B0EFA390010BFC8 /* Assets.xcassets */ = {isa =
PBXFileReference; lastKnownFileType = folder.assetcatalog; path =
Assets.xcassets; sourceTree = "<group>"; };
607A66242B0EFA390010BFC8 /* Base */ = {isa = PBXFileReference;
lastKnownFileType = file.storyboard; name = Base; path =
Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
607A66272B0EFA390010BFC8 /* main.m */ = {isa =
PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m;
sourceTree = "<group>"; };
@@ -120,6 +123,8 @@
607A66592B0F08600010BFC8 /*
iOSTestbed-Info.plist */,
607A66152B0EFA380010BFC8 /* AppDelegate.h */,
607A66162B0EFA380010BFC8 /* AppDelegate.m */,
+ 83DC5E71F9D64737365A3BE4 /* SceneDelegate.h */,
+ D995ADFDE8B3EF5DDEB37874 /* SceneDelegate.m */,
607A66212B0EFA390010BFC8 /* Assets.xcassets */,
607A66232B0EFA390010BFC8 /*
LaunchScreen.storyboard */,
607A66272B0EFA390010BFC8 /* main.m */,
@@ -270,6 +275,7 @@
buildActionMask = 2147483647;
files = (
607A66172B0EFA380010BFC8 /* AppDelegate.m in
Sources */,
+ 71CB095279CCE565BAFB69C3 /* SceneDelegate.m in
Sources */,
607A66282B0EFA390010BFC8 /* main.m in Sources
*/,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -356,7 +362,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
@@ -411,7 +417,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
@@ -437,7 +443,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad =
"UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone =
"UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight";
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -468,7 +474,7 @@
INFOPLIST_KEY_UIMainStoryboardFile = Main;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad =
"UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown
UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone =
"UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight";
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@@ -491,7 +497,7 @@
DEVELOPMENT_TEAM = 3HEZE76D99;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS =
"\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\"";
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER =
org.python.iOSTestbedTests;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -511,7 +517,7 @@
DEVELOPMENT_TEAM = 3HEZE76D99;
GENERATE_INFOPLIST_FILE = YES;
HEADER_SEARCH_PATHS =
"\"$(BUILT_PRODUCTS_DIR)/Python.framework/Headers\"";
- IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER =
org.python.iOSTestbedTests;
PRODUCT_NAME = "$(TARGET_NAME)";
diff --git a/Platforms/Apple/testbed/iOSTestbed/AppDelegate.m
b/Platforms/Apple/testbed/iOSTestbed/AppDelegate.m
index e5085399d0ca5fb..fbe71bae23b7183 100644
--- a/Platforms/Apple/testbed/iOSTestbed/AppDelegate.m
+++ b/Platforms/Apple/testbed/iOSTestbed/AppDelegate.m
@@ -4,6 +4,7 @@
//
#import "AppDelegate.h"
+#import "SceneDelegate.h"
@interface AppDelegate ()
@@ -11,9 +12,13 @@ @interface AppDelegate ()
@implementation AppDelegate
+- (UISceneConfiguration *)application:(UIApplication *)application
configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession
options:(UISceneConnectionOptions *)options {
+ UISceneConfiguration *configuration = [[UISceneConfiguration alloc]
initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
+ configuration.delegateClass = [SceneDelegate class];
+ return configuration;
+}
-- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- return YES;
+- (void)application:(UIApplication *)application
didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
}
@end
diff --git a/Platforms/Apple/testbed/iOSTestbed/SceneDelegate.h
b/Platforms/Apple/testbed/iOSTestbed/SceneDelegate.h
new file mode 100644
index 000000000000000..264aacadca16e5d
--- /dev/null
+++ b/Platforms/Apple/testbed/iOSTestbed/SceneDelegate.h
@@ -0,0 +1,12 @@
+//
+// SceneDelegate.h
+// iOSTestbed
+//
+
+#import <UIKit/UIKit.h>
+
+@interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
+
+@property (strong, nonatomic) UIWindow *window;
+
+@end
diff --git a/Platforms/Apple/testbed/iOSTestbed/SceneDelegate.m
b/Platforms/Apple/testbed/iOSTestbed/SceneDelegate.m
new file mode 100644
index 000000000000000..e82e447985d2e90
--- /dev/null
+++ b/Platforms/Apple/testbed/iOSTestbed/SceneDelegate.m
@@ -0,0 +1,21 @@
+//
+// SceneDelegate.m
+// iOSTestbed
+//
+
+#import "SceneDelegate.h"
+
+@interface SceneDelegate ()
+
+@end
+
+@implementation SceneDelegate
+
+- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session
options:(UISceneConnectionOptions *)connectionOptions {
+ UIWindowScene *windowScene = (UIWindowScene *)scene;
+ self.window = [[UIWindow alloc] initWithWindowScene:windowScene];
+ self.window.rootViewController = [[UIViewController alloc] init];
+ [self.window makeKeyAndVisible];
+}
+
+@end
diff --git a/Platforms/Apple/testbed/iOSTestbed/iOSTestbed-Info.plist
b/Platforms/Apple/testbed/iOSTestbed/iOSTestbed-Info.plist
index fea45e1fad6f6f6..3a560656972aeca 100644
--- a/Platforms/Apple/testbed/iOSTestbed/iOSTestbed-Info.plist
+++ b/Platforms/Apple/testbed/iOSTestbed/iOSTestbed-Info.plist
@@ -46,7 +46,17 @@
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
- <dict/>
+ <dict>
+ <key>UIWindowSceneSessionRoleApplication</key>
+ <array>
+ <dict>
+ <key>UISceneConfigurationName</key>
+ <string>Default Configuration</string>
+ <key>UISceneDelegateClassName</key>
+ <string>SceneDelegate</string>
+ </dict>
+ </array>
+ </dict>
</dict>
</dict>
</plist>
_______________________________________________
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]