| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…on macOS MacOS.open() forced every non-http(s) URL through the default browser's bundle ID (added in pythongh-130535 to fix file:// URLs opening in the wrong app). This over-generalized: custom app URI schemes like vscode:// or slack:// no longer reached their own registered handler, only the browser, a regression from 3.13. Narrow the bundle-ID override to file: URLs (the actual pythongh-128540 problem) and let the OS resolve the handler for every other non-http(s) scheme, as it did before 3.14.
| Back | FazBrowse Home | New Git URL |
On macOS, webbrowser.open() forced every non-http(s) URL through the default web browser via /usr/bin/open -b <bundle-id>, a change added in gh-130535 to stop file:// URLs opening in the OS's file-type handler (e.g. a text editor) instead of a browser. That fix overshot: application-specific URI schemes like vscode:// or slack:// got pulled into the browser too, so webbrowser.open("vscode://...") opened the default web browser instead of the correct app — a regression from 3.13, where the OS's own scheme handler was invoked.
This narrows the special-cased dispatch to file: URLs only (the actual gh-128540 problem). Every other non-http(s) scheme now goes through plain /usr/bin/open <url> again, letting macOS resolve the scheme's own registered handler the way it did before 3.14. http/https handling and named-browser dispatch are unchanged.
Lib/test/test_webbrowser.py gains coverage for the restored custom-scheme path (vscode://) and keeps the existing file:/http(s)/named-browser assertions passing. MacOSTest is darwin-gated and can't execute in this sandbox; behavior was additionally verified by forcing sys.platform == 'darwin' in a standalone script and confirming the exact /usr/bin/open invocation for http, https, file:, vscode:, slack:, and scheme-less inputs — CI's macOS job will run the real suite.
Fixes #149454.
Related: #128540, #130535