[issue30219] webbrowser.open outputs xdg-open deprecation warning

desbma report at bugs.python.org
Thu May 11 14:42:37 EDT 2017


desbma added the comment:

> For example, thanks to stdout/stderr, you noticed the warning. Without stdout/stderr, the warning should be hidden.

That is true, but as a Python user, it don't need to see that warning, only the xdg-utils developers do.
I would have never seen it, and it would never have been a problem because xdg-util would have been updated to call gio open (with the commit mentioned above) long before gvfs-open is completely removed.

> Do you get the warning if you use gvfs-open?

Of course, because gvfs-open is precisely the cause of the deprecation warning

$ cat /usr/bin/gvfs-open
#!/bin/sh

replacement="gio open"
help="gio help open"

>&2 echo "This tool has been deprecated, use '$replacement' instead."
>&2 echo "See '$help' for more info."
>&2 echo

if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then
  exec $help "$@:2"
else
  exec $replacement "$@"
fi

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30219>
_______________________________________


More information about the Python-bugs-list mailing list