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

The command line of launching Edge on Linux hangs #89007

Closed
rayluo mannequin opened this issue Aug 5, 2021 · 4 comments
Closed

The command line of launching Edge on Linux hangs #89007

rayluo mannequin opened this issue Aug 5, 2021 · 4 comments
Labels
3.11 only security fixes easy stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@rayluo
Copy link
Mannequin

rayluo mannequin commented Aug 5, 2021

BPO 44844
Nosy @terryjreedy, @zooba, @miss-islington, @rayluo
PRs
  • bpo-44844: Enable detection of Microsoft Edge browser in webbrowser module #29908
  • 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 = None
    created_at = <Date 2021-08-05.18:58:31.284>
    labels = ['easy', 'type-bug', 'library', '3.11']
    title = 'The command line of launching Edge on Linux hangs'
    updated_at = <Date 2021-12-03.23:10:09.354>
    user = 'https://github.com/rayluo'

    bugs.python.org fields:

    activity = <Date 2021-12-03.23:10:09.354>
    actor = 'steve.dower'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-08-05.18:58:31.284>
    creator = 'rayluo'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44844
    keywords = ['patch', 'easy', 'newcomer friendly']
    message_count = 3.0
    messages = ['399030', '399037', '407614']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'steve.dower', 'miss-islington', 'rayluo']
    pr_nums = ['29908']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue44844'
    versions = ['Python 3.11']

    @rayluo
    Copy link
    Mannequin Author

    rayluo mannequin commented Aug 5, 2021

    Launching Chrome on Linux from command line:

        $ export BROWSER=google-chrome; python -m webbrowser https://httpbin.org/delay/10
    It can successfully launch Chrome with the specified web page opened in a new tab.
    And the console command line finishes BEFORE the web page being fully loaded in the browser. That is the desirable behavior.
    

    Launching Edge on Linux from command line:

        $ export BROWSER=microsoft-edge; python -m webbrowser https://httpbin.org/delay/10
    The command line hangs until the Edge window is closed.
    

    That hanging symptom can be resolved by writing a deliberate script to webbrowser.register("...", None, webbrowser.BackgroundBrowser("microsoft-edge")) and then use that registered browser. But it was not obvious, and it took trial-and-error to reach that solution.

    Could it be possible to have the "BROWSER=microsoft-edge; python -m webbrowser https://httpbin.org/delay/10" work out of the box, without hanging?

    Is it because Edge is not currently predefined and handled inside webbrowser.py? It seems not an easy decision to add new browser into webbrowser.py, though, based on the 2nd and 3rd comments in this old issue: https://bugs.python.org/issue42330

    @rayluo rayluo mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Aug 5, 2021
    @zooba
    Copy link
    Member

    zooba commented Aug 5, 2021

    Adding a new browser should be pretty easy, and it seems like that's all that is needed here. It has to go into a few places though to support each platform, and unfortunately it's only good for 3.11, and not any of the existing releases.

    @zooba zooba added easy 3.11 only security fixes and removed 3.7 (EOL) end of life labels Aug 5, 2021
    @zooba
    Copy link
    Member

    zooba commented Dec 3, 2021

    @ray I posted a PR that works fine on Windows, would you be able to try it on Linux? The executables seem to have different names, so I'm a little concerned about the change, but I think it should be alright.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @DBJim
    Copy link
    Contributor

    DBJim commented Apr 1, 2023

    @zooba I've tested the changes in your PR on Ubuntu and can confirm it works.

    @zooba zooba closed this as completed Apr 4, 2023
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.11 only security fixes easy 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