Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-113539: Enable using$BROWSER
to reorder default seach order in webbrowser.py#113561
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…rder in webbrowser.py
Misc/NEWS.d/next/Library/2023-12-29-09-44-41.gh-issue-113539.YDkv9O.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
…Dkv9O.rstCo-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
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.
Should we add a usage example somewhere? This feature is rather hard to comprehend.
The feature was hard to fully comprehend even before I made it more complex :-( Adding some examples would definitely help, and it would be even better to slightly restructure the description of this feature. I'll see if I can come up with a better description. BTW. Some other things I noticed (for different PRs):
|
Not limited to macOS, but from thePlausible trial in July, here are the most popular browsers of people visiting docs.python.org: ![]() Also not limited to macOS, here are the most popular desktop browsers used worldwide, fromstatscounter: And visitors tousa.gov sites (json), for macOS: "Macintosh": {"Safari":260849550,"Chrome":201103500,"Firefox":16103981,"Edge":2024170,"Mozilla Compatible Agent":2018923,"Opera":552767,"YaBrowser":36155,"Whale Browser":15131,"DuckDuckGo Browser":5801,"Coc Coc":10339,"SeaMonkey":4535,"Aloha Browser":3174,"Maxthon":4181,"Mozilla":2253,"Internet Explorer":5163,"Waterfox":1837,"PaleMoon":139,"(not set)":215,"Vivaldi":748}, |
minrk commentedFeb 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Given how the mac launchers work, I think it would also be sensible for e.g. ifshutil.which(cmd[0]):# on the command-lineGenericBrowserelse:# maybe check if app exists?OSAScript(app_name) I'm not sure what the right backward-compatibility story is, or if that's appropriate if $BROWSER is a standard env expected to point to a shell executable. |
Uh oh!
There was an error while loading.Please reload this page.
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.
Thanks for the PR, I added a What's New entry based on the blurb.
25e4984
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This PR makes it possible to use
$BROWSER
to reorder the list of registered (default) browsers, instead of always interpreting values as command-line tools.The PR also fixes the registration for "chrome" on macOS, the app name is "google chrome" (and has been for years)
This is particularly useful on macOS where the default way to start a browser is not a command-line tool.
📚 Documentation preview 📚:https://cpython-previews--113561.org.readthedocs.build/