classification
Title: test_urllibnet failure when using support.transient_internet
Type: behavior Stage: resolved
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: orsenthil Nosy List: michael.foord, orsenthil
Priority: normal Keywords:

Created on 2010-10-16 02:04 by orsenthil, last changed 2010-10-17 10:54 by orsenthil. This issue is now closed.

Files
File name Uploaded Description Edit
simple_test.py orsenthil, 2010-10-16 02:04
Messages (3)
msg118852 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-10-16 02:04
I am attaching the script which exhibits the problem.

wrapping the urllib.request.urlopen, with the support.transient_internet contextmanager exhibits an Unexpected Behavior. Without the context manager, reading the file using the filedescriptor succeeds, but when wrapping it with the context manager, it fails with a TypeError.
msg118859 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-10-16 08:29
Actually, this is not related to transient_internet call. Just that file handle not behaving as expected due to some delays.
msg118932 - (view) Author: Senthil Kumaran (orsenthil) * (Python committer) Date: 2010-10-17 10:54
Fixed in revision 85630. When using fileno attribute of the file-descriptor, the socket had to be in blocking mode. 
Now the results are consistent.

This may resolve the other spurious test failures that were observed too.
History
Date User Action Args
2010-10-17 10:54:16orsenthilsetstatus: open -> closed
messages: + msg118932

assignee: orsenthil
resolution: fixed
stage: needs patch -> resolved
2010-10-16 08:29:40orsenthilsetmessages: + msg118859
2010-10-16 02:06:33orsenthilsetnosy: + michael.foord
2010-10-16 02:04:37orsenthilcreate