bpo-40477: macOS Python Launcher app fixes for recent macOS releases#30348
Merged
Conversation
Contributor
|
Thanks @ned-deily for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
|
GH-30349 is a backport of this pull request to the 3.10 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jan 3, 2022
…ythonGH-30348) This change solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+): - The launcher app was no longer able to launch the macOS Terminal.app to run a script. - Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file. (cherry picked from commit 549e628) Co-authored-by: Ned Deily <nad@python.org>
|
GH-30350 is a backport of this pull request to the 3.9 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jan 3, 2022
…ythonGH-30348) This change solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+): - The launcher app was no longer able to launch the macOS Terminal.app to run a script. - Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file. (cherry picked from commit 549e628) Co-authored-by: Ned Deily <nad@python.org>
ned-deily
added a commit
that referenced
this pull request
Jan 3, 2022
…H-30348) (GH-30349) This change solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+): - The launcher app was no longer able to launch the macOS Terminal.app to run a script. - Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file. (cherry picked from commit 549e628) Co-authored-by: Ned Deily <nad@python.org>
miss-islington
added a commit
that referenced
this pull request
Jan 3, 2022
…H-30348) This change solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+): - The launcher app was no longer able to launch the macOS Terminal.app to run a script. - Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file. (cherry picked from commit 549e628) Co-authored-by: Ned Deily <nad@python.org>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR here solves two problems encountered by users of the macOS
Python Launcherapp on recent macOS releases (10.14+):The solution to item 1 was to no longer specify an absolute path to
Terminal.appbut rather let LaunchServices figure out the path.Item 2 was fixed by adding the
NSAppleEventsUsageDescriptionkey to the launcher app's property list. The first time the launcher runs, macOS displays a message to the user requesting permission to use Apple events; if granted by the user, the launcher will now be able to send open events toTerminal.appand all is well.Tested on the most recent releases of macOS 12, 11, 10.16, 10.15, 10.14, and 10.9 and on both Intel and Apple Silicon Macs.
Thanks to @ronaldoussoren for tracking down the
NSAppleEventsUsageDescriptionrequirement!https://bugs.python.org/issue40477