Skip to content

Commit

Permalink
Merge pull request beeware#2228 from HalfWhitt/macos-version-req-update
Browse files Browse the repository at this point in the history
Updated macOS minimum version to 11, matching Briefcase
  • Loading branch information
freakboy3742 authored Nov 14, 2023
2 parents 24bd5ec + 38d6aa8 commit fb189cd
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 28 deletions.
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

0 comments on commit fb189cd

Please sign in to comment.