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
bpo-40477: macOS Python Launcher app fixes for recent macOS releases #30348
Conversation
Thanks @ned-deily for the PR |
GH-30349 is a backport of this pull request to the 3.10 branch. |
…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. |
…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>
…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>
…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>
|
The PR here solves two problems encountered by users of the macOS
Python Launcher
app on recent macOS releases (10.14+):The solution to item 1 was to no longer specify an absolute path to
Terminal.app
but rather let LaunchServices figure out the path.Item 2 was fixed by adding the
NSAppleEventsUsageDescription
key 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.app
and 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
NSAppleEventsUsageDescription
requirement!https://bugs.python.org/issue40477