From ebc4ffd35fe1368efd1afae4194021e29cacfed7 Mon Sep 17 00:00:00 2001 From: Charles Whittington Date: Mon, 13 Nov 2023 22:22:04 -0500 Subject: [PATCH 1/4] Updated macOS minimum version to 11, matching Briefcase --- README.rst | 2 +- cocoa/src/toga_cocoa/libs/appkit.py | 42 +++++++++++------------------ docs/reference/platforms/macOS.rst | 2 +- 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/README.rst b/README.rst index cfb57ccb48..90586528e0 100644 --- a/README.rst +++ b/README.rst @@ -36,7 +36,7 @@ Minimum requirements * Toga requires **Python 3.8 or higher**. Python 2 is not supported. -* If you're on macOS, you need to be on 10.10 (Yosemite) or newer. +* If you're on macOS, you need to be on 11 (Big Sur) or newer. * If you're on Windows, you'll need Windows 10 or newer. If you are using Windows 10 and want to use a WebView to display web content, you will also diff --git a/cocoa/src/toga_cocoa/libs/appkit.py b/cocoa/src/toga_cocoa/libs/appkit.py index 4386f44dc0..6046b50088 100644 --- a/cocoa/src/toga_cocoa/libs/appkit.py +++ b/cocoa/src/toga_cocoa/libs/appkit.py @@ -56,29 +56,21 @@ class NSAlertStyle(Enum): appkit, "NSApplicationDidUnhideNotification" ) -# NSAboutPanelOption* keys are available only 10.13+ -try: - NSAboutPanelOptionApplicationIcon = NSString( - c_void_p.in_dll(appkit, "NSAboutPanelOptionApplicationIcon") - ) - NSAboutPanelOptionApplicationName = NSString( - c_void_p.in_dll(appkit, "NSAboutPanelOptionApplicationName") - ) - NSAboutPanelOptionApplicationVersion = NSString( - c_void_p.in_dll(appkit, "NSAboutPanelOptionApplicationVersion") - ) - NSAboutPanelOptionCredits = NSString( - c_void_p.in_dll(appkit, "NSAboutPanelOptionCredits") - ) - NSAboutPanelOptionVersion = NSString( - c_void_p.in_dll(appkit, "NSAboutPanelOptionVersion") - ) -except ValueError: # pragma: no cover - NSAboutPanelOptionApplicationIcon = None - NSAboutPanelOptionApplicationName = None - NSAboutPanelOptionApplicationVersion = None - NSAboutPanelOptionCredits = None - NSAboutPanelOptionVersion = None +NSAboutPanelOptionApplicationIcon = NSString( + c_void_p.in_dll(appkit, "NSAboutPanelOptionApplicationIcon") +) +NSAboutPanelOptionApplicationName = NSString( + c_void_p.in_dll(appkit, "NSAboutPanelOptionApplicationName") +) +NSAboutPanelOptionApplicationVersion = NSString( + c_void_p.in_dll(appkit, "NSAboutPanelOptionApplicationVersion") +) +NSAboutPanelOptionCredits = NSString( + c_void_p.in_dll(appkit, "NSAboutPanelOptionCredits") +) +NSAboutPanelOptionVersion = NSString( + c_void_p.in_dll(appkit, "NSAboutPanelOptionVersion") +) ###################################################################### # NSAttributedString.h @@ -98,9 +90,7 @@ class NSAlertStyle(Enum): NSStrokeWidthAttributeName = objc_const(appkit, "NSStrokeWidthAttributeName") NSShadowAttributeName = objc_const(appkit, "NSShadowAttributeName") -# NSTextEffectAttributeName is supported in OS 10.10+ -# goes against minimum requirements: current support is for OS 10.7+ -# NSTextEffectAttributeName = objc_const(appkit, "NSTextEffectAttributeName") +NSTextEffectAttributeName = objc_const(appkit, "NSTextEffectAttributeName") NSAttachmentAttributeName = objc_const(appkit, "NSAttachmentAttributeName") NSLinkAttributeName = objc_const(appkit, "NSLinkAttributeName") diff --git a/docs/reference/platforms/macOS.rst b/docs/reference/platforms/macOS.rst index 55125e66bc..54c7570bf0 100644 --- a/docs/reference/platforms/macOS.rst +++ b/docs/reference/platforms/macOS.rst @@ -12,7 +12,7 @@ The Toga backend for macOS is `toga-cocoa Prerequisites ------------- -``toga-cocoa`` requires macOS 10.10 (Yosemite) or newer. +``toga-cocoa`` requires macOS 11 (Big Sur) or newer. Installation ------------ From 4297ab9222b13916399b398afc2598f2bb7076fd Mon Sep 17 00:00:00 2001 From: Charles Whittington <50283671+HalfWhitt@users.noreply.github.com> Date: Mon, 13 Nov 2023 22:33:31 -0500 Subject: [PATCH 2/4] Create changenote --- changes/2228.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/2228.doc.rst diff --git a/changes/2228.doc.rst b/changes/2228.doc.rst new file mode 100644 index 0000000000..03b5f6d976 --- /dev/null +++ b/changes/2228.doc.rst @@ -0,0 +1 @@ +Toga on macOS now supports a minimum version of 11 (Big Sur). From c93b7afe26573790e70f000fb13e1d40fda7a211 Mon Sep 17 00:00:00 2001 From: Charles Whittington <50283671+HalfWhitt@users.noreply.github.com> Date: Mon, 13 Nov 2023 22:39:14 -0500 Subject: [PATCH 3/4] Added "Sur" to spellcheck --- docs/spelling_wordlist | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist index a24a19c47a..293ed0cb6f 100644 --- a/docs/spelling_wordlist +++ b/docs/spelling_wordlist @@ -67,6 +67,7 @@ subclasses Subclasses substring substrings +Sur testbed Todo toolbar From 38d6aa82b571af3fc6f59c90c1404f62857e5a45 Mon Sep 17 00:00:00 2001 From: Charles Whittington <50283671+HalfWhitt@users.noreply.github.com> Date: Mon, 13 Nov 2023 22:39:51 -0500 Subject: [PATCH 4/4] Fix changenote title and wording --- changes/2228.doc.rst | 1 - changes/2228.removal.rst | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 changes/2228.doc.rst create mode 100644 changes/2228.removal.rst diff --git a/changes/2228.doc.rst b/changes/2228.doc.rst deleted file mode 100644 index 03b5f6d976..0000000000 --- a/changes/2228.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Toga on macOS now supports a minimum version of 11 (Big Sur). diff --git a/changes/2228.removal.rst b/changes/2228.removal.rst new file mode 100644 index 0000000000..5291990aac --- /dev/null +++ b/changes/2228.removal.rst @@ -0,0 +1 @@ +Support for macOS release prior to Big Sur (11) has been dropped.