[issue29644] Importing webbrowser outputs a message on stderr

2017-03-24 Thread Nick Coghlan

Nick Coghlan added the comment:


New changeset 140792bd514ee4ba739fda899785bea3ce746f05 by Nick Coghlan in 
branch 'master':
bpo-29644: suppress subprocess output from webbrowser (#289)
https://github.com/python/cpython/commit/140792bd514ee4ba739fda899785bea3ce746f05


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29644] Importing webbrowser outputs a message on stderr

2017-02-25 Thread Nick Coghlan

Nick Coghlan added the comment:

The specific problem reported has been resolved, so closing this one.

If anyone's able to figure out a way to defer this to post-import somehow, I 
think that would make a good enhancement proposal.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Nick Coghlan

Nick Coghlan added the comment:

I considered that problem of "subprocess invocation as a side-effect of 
import", but in this case the output is needed by the immediately following 
"register_X_browsers()" call, as it affects how those browsers get inserted 
into webbrowser._tryorder.

That means there isn't any obvious way to delay it without a fairly significant 
refactoring of how the module works :(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I see this because my main desktop is KDE, but optional libkf5config-bin 
package is not installed.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Nick Coghlan

Changes by Nick Coghlan :


--
pull_requests: +259

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Nick Coghlan

Nick Coghlan added the comment:

Ah, and I think I'm not seeing this locally because I have both Gtk and KDE 
components installed (my main desktop is KDE, but Firefox and various other 
components are still Gtk apps).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Just stderr. stdout contains the requested value.

And I think that an external program shouldn't be ran at import time. It would 
be better to defer its run until its output is required.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Nick Coghlan

Nick Coghlan added the comment:

I think an appropriate way of handling this would be to route both stdout and 
stderr in the subprocess to subprocess.DEVNULL.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29644] Importing webbrowser outputs a message on stderr

2017-02-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Importing webbrowser has a side effect. It outputs a message on stderr.

>>> import webbrowser
/usr/bin/xdg-settings: 1: /usr/bin/xdg-settings: kreadconfig5: not found

This is a regression introduced in issue24241.

--
components: Library (Lib)
messages: 288542
nosy: daves, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Importing webbrowser outputs a message on stderr
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com