-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-128540: lookup default webbrowser on macOS #130535
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
Conversation
ensures web browser is launched on mac, even for URLs that are not http[s].
4daff9f
to
26e799b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for all of your work on this issue. I'm going to approve to merge this for the next 3.14 alpha. We should try to get the other PRs reviewed and merged soon.
|
Ensure web browser is launched by `webbrowser.open` on macOS, even for `file://` URLs.
Ensure web browser is launched by `webbrowser.open` on macOS, even for `file://` URLs.
ensures web browser is launched on mac, even for URLs that are not http[s]. Only does the lookup for non-http URLs, limiting the impact of the change.
I'm not sure what level of testing is appropriate, but I added some basic exercise for MacOSXOSAScript. The subprocess is mocked, so the correctness of the applescript still itself isn't tested at all.
Addresses gh-128540 on macOS only. I'll open separate PRs per platform, as recommended by @ned-deily.
More discussion in https://discuss.python.org/t/support-for-file-urls-in-webbrowser-open/81612
Backported implementation in https://pypi.org/project/webbrowser-open/