Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webbrowser regression: BROWSER env var not respected #79489

Closed
zmwangx mannequin opened this issue Nov 24, 2018 · 3 comments
Closed

webbrowser regression: BROWSER env var not respected #79489

zmwangx mannequin opened this issue Nov 24, 2018 · 3 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@zmwangx
Copy link
Mannequin

zmwangx mannequin commented Nov 24, 2018

BPO 35308
Nosy @serhiy-storchaka, @zmwangx, @miss-islington
PRs
  • bpo-35308: Fix regression where BROWSER env var is not respected #10693
  • [3.7] bpo-35308: Fix regression where BROWSER env var is not respected. (GH-10693) #10729
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-11-26.23:07:19.205>
    created_at = <Date 2018-11-24.15:26:41.669>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = 'webbrowser regression: BROWSER env var not respected'
    updated_at = <Date 2018-11-26.23:07:19.204>
    user = 'https://github.com/zmwangx'

    bugs.python.org fields:

    activity = <Date 2018-11-26.23:07:19.204>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-11-26.23:07:19.205>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2018-11-24.15:26:41.669>
    creator = 'zmwangx'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 35308
    keywords = ['patch']
    message_count = 3.0
    messages = ['330377', '330465', '330468']
    nosy_count = 3.0
    nosy_names = ['serhiy.storchaka', 'zmwangx', 'miss-islington']
    pr_nums = ['10693', '10729']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue35308'
    versions = ['Python 3.7', 'Python 3.8']

    @zmwangx
    Copy link
    Mannequin Author

    zmwangx mannequin commented Nov 24, 2018

    This is a regression in Python 3.7:

        $ BROWSER=w3m python3.6 -c 'import sys; import webbrowser; print(sys.version); print(webbrowser.get()); print(webbrowser._tryorder)'
        3.6.7 (default, Nov 24 2018, 09:47:01)
        [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)]
        <webbrowser.GenericBrowser object at 0x1066207f0>
        ['w3m', 'MacOSX', 'chrome', 'firefox', 'safari', 'w3m']
    
        $ BROWSER=w3m python3.7 -c 'import sys; import webbrowser; print(sys.version); print(webbrowser.get()); print(webbrowser._tryorder)'
        3.7.1 (default, Nov 24 2018, 09:35:18)
        [Clang 10.0.0 (clang-1000.11.45.5)]
        <webbrowser.MacOSXOSAScript object at 0x1061fe828>
        ['MacOSX', 'chrome', 'firefox', 'safari', 'w3m', 'w3m']

    Note how Python 3.7.1 webbrowser decides to choose MacOSX as the default although BROWSER is explicitly set to w3m. (The above code does not run on Python 3.7.0 due to bpo-31014).

    This is because of misinterpretation of the preferred kwarg when bpo-31014 was fixed. See 25b804a#diff-546766353a40839aa72374ecca5b0925R566. Browsers in BROWSER should be registered as preferred=True instead.

    @zmwangx zmwangx mannequin added 3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Nov 24, 2018
    @serhiy-storchaka
    Copy link
    Member

    New changeset 8c281ed by Serhiy Storchaka (Zhiming Wang) in branch 'master':
    bpo-35308: Fix regression where BROWSER env var is not respected. (GH-10693)
    8c281ed

    @miss-islington
    Copy link
    Contributor

    New changeset 2a37f01 by Miss Islington (bot) in branch '3.7':
    bpo-35308: Fix regression where BROWSER env var is not respected. (GH-10693)
    2a37f01

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants