Message404896
The 'webbrowser' module throws warnings and bad RC codes when running under Windows Subsystem for Linux (WSL).
This causes libraries that depend on the 'webbrowser' module to mistakenly assume there's been an error opening a URL. An example of this behaviour can be observed running `jupyter-lab` under WSL.
Steps to reproduce:
1. Run Ubuntu (for example) under Windows WSL.
2. `python -m webbrowser https://www.python.org`
Expected result:
The wesite opens.
Actual result:
The website opens but produces a `No valid TTY` message, which also yields a non-zero return code.
I have a patch for this bug that inspects the kernel version (platform.uname) and detects WSL. This is a similar solution that other projects have implemented to tackle this problem. For example, the fish shell project: https://github.com/fish-shell/fish-shell/blob/0e06a53dff5e198c4fcefb6419a53cf1267231a1/share/functions/help.fish#L83. |
|
Date |
User |
Action |
Args |
2021-10-23 17:33:22 | guido.fioravantti | set | recipients:
+ guido.fioravantti, paul.moore, tim.golden, zach.ware, steve.dower |
2021-10-23 17:33:22 | guido.fioravantti | set | messageid: <1635010402.44.0.770979979986.issue45589@roundup.psfhosted.org> |
2021-10-23 17:33:22 | guido.fioravantti | link | issue45589 messages |
2021-10-23 17:33:22 | guido.fioravantti | create | |
|