Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated macOS minimum version to 11, matching Briefcase #2228

Merged
merged 4 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions changes/2228.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support for macOS release prior to Big Sur (11) has been dropped.
42 changes: 16 additions & 26 deletions cocoa/src/toga_cocoa/libs/appkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/platforms/macOS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down
1 change: 1 addition & 0 deletions docs/spelling_wordlist
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ subclasses
Subclasses
substring
substrings
Sur
testbed
Todo
toolbar
Expand Down