webbrowser.py cannot use a non-standard browser under MacOS · Issue #113539 · python/cpython

Bug report

Bug description:

webbrowser.py reads the environment variable "BROWSER" to find executable using "_synthesize".
This does not work with macOS, where the browser is open by either

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome

or

it doesn't match the list of configured browsers

Workaround is to create a zsh script in the path called 'chrome':

#!/bin/zsh
#
open -a "Google Chrome.app" $

"_synthesize" needs to be fixed.

CPython versions tested on:

3.11

Operating systems tested on:

macOS

Linked PRs