You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
assignee=Noneclosed_at=Nonecreated_at=<Date2021-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=<Date2021-12-03.23:10:09.354>user='https://github.com/rayluo'
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.
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
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.
@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.