This is not Picards’ fault. This is a Mac OS X issue.
The Python webbrowser module will use
osascript (AppleScript) to open the browser, using the command
open location "<url>". It is that command that is now opening things in the wrong browser.
You can reproduce the issue with:
python -m webbrowser -t "http://www.python.org"
See https://forum.odrive.com/t/wrong-browser-opens-on-mac-10-12-5-osascript-bug/2482/5 for another community having the same issue. A fix is expected in MacOS 10.12.6.
What’s broken is the
osascript command. Python executes this:
echo 'open location "http://www.python.org"' | osascript
and on Mac OS X 10.12.5 that gives an error message right now (error code -1708), at which point the
webbrowser module moves on to trying Firefox and Safari, respectively.
I’m looking for a work-around still; Chrome may well have a command-line option to open URLs that we can use; when you set the
BROWSER environment variable to that command (with a
%s placeholder), that’ll be used instead of the currently b0rken default.