[issue30219] webbrowser.open outputs xdg-open deprecation warning
STINNER Victor
report at bugs.python.org
Thu May 11 07:49:00 EDT 2017
STINNER Victor added the comment:
> Why do you think this isn't a good idea?
If the command fails, you simplify have no idea of what happened. For example, thanks to stdout/stderr, you noticed the warning. Without stdout/stderr, the warning should be hidden.
webbrowser is already able to detect that GNOME is running and uses gvfs-open in that case. Maybe we should exchange these two blocks of code to prefer gvfs-open over xdg-open on GNOME?
# use xdg-open if around
if shutil.which("xdg-open"):
register("xdg-open", None, BackgroundBrowser("xdg-open"))
# The default GNOME3 browser
if "GNOME_DESKTOP_SESSION_ID" in os.environ and shutil.which("gvfs-open"):
register("gvfs-open", None, BackgroundBrowser("gvfs-open"))
Do you get the warning if you use gvfs-open?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30219>
_______________________________________
More information about the Python-bugs-list
mailing list