This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test.support.transient_internet prints to stderr when verbose is false
Type: Stage:
Components: Tests Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: vstinner Nosy List: brett.cannon, r.david.murray, vstinner
Priority: low Keywords:

Created on 2011-08-05 05:14 by brett.cannon, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
unnamed brett.cannon, 2011-08-05 18:00
Messages (5)
msg141646 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-08-05 05:14
When verbose mode if OFF, test.support.transient_internet prints out what resource was unavailable before raising the ResourceDenied exception. Not sure if this is a bug (since it has existed for a while) or it is on purpose and just happens to seem counter-intuitive.

Assigning to Victor since it seems to be his code (that Antoine applied).
msg141655 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-08-05 11:33
I'm pretty sure this was intentional.  It is analogous to Skip messages and the messages issued when a resource hasn't been enabled, which also print when verbose is not true: the test wasn't run, and it lets you know why.
msg141674 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-08-05 18:00
On Fri, Aug 5, 2011 at 04:33, R. David Murray <report@bugs.python.org>wrote:

It just seems odd to print when verbosity is  off, but not when it is on. I
don't have  the repo in front of me right now, but is there some other
mechanism which prints out similar info when verbosity is on?

> ----------
> nosy: +r.david.murray
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue12693>
> _______________________________________
>
msg141675 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-08-05 18:14
I don't see any such code in the 3.3 source for the context manager.  There the resource name is put in the ResourceDenied message.  I think we'll need the reproducer.
msg142094 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2011-08-15 02:20
The line from the source I am talking about is http://hg.python.org/cpython/file/49e9e34da512/Lib/test/support.py#l943 . And as for the output:

> ./python.exe -m test -uall test_ssl                                                  
[1/1] test_ssl
Resource 'ipv6.google.com' is not available
1 test OK.
History
Date User Action Args
2022-04-11 14:57:20adminsetgithub: 56902
2013-01-25 19:25:33brett.cannonsetstatus: open -> closed
resolution: works for me
2011-08-15 02:20:04brett.cannonsetmessages: + msg142094
2011-08-05 18:14:17r.david.murraysetmessages: + msg141675
2011-08-05 18:00:18brett.cannonsetfiles: + unnamed

messages: + msg141674
2011-08-05 11:33:41r.david.murraysetnosy: + r.david.murray
messages: + msg141655
2011-08-05 05:14:30brett.cannoncreate