Skip to content

webbrowser.py cannot use a non-standard browser under MacOS #113539

Description

@mmaass-x

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

open -a "Google Chrome"

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-macstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions