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.

Author martin.panter
Recipients BreamoreBoy, berker.peksag, georg.brandl, ixokai, martin.panter, orsenthil, pitrou
Date 2016-06-21.03:05:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466478351.41.0.11659779254.issue10116@psf.upfronthosting.co.za>
In-reply-to
Content
It looks like Antoine’s second failure (test_getcode) should be fixed now that transient_internet() is used (Issue 12138).

Looking at Antoine’s first failure, it will always be possible for it to fail depending on the conditions of the buildbot, internet, and the www.example.com server:

def setUp(self):
    socket.setdefaulttimeout(self.TIMEOUT)

def testURLread(self):
    f = _open_with_retry(urllib.urlopen, "http://www.example.com/")
    x = f.read()  # Timed out!

I would suggest changing this to connect to a server running on localhost in a background thread, and moving it into test_urllib.py because it would no longer need the “network” resource. That should eliminate enough causes of a timeout, the remaining one being a very slow buildbot, which I don’t think is worth worrying about.

Also see revision aa46bdbe641d in Python 3, where the read() call was shifted under the transient_internet() handler, and seems to defeat the purpose of the test.
History
Date User Action Args
2016-06-21 03:05:51martin.pantersetrecipients: + martin.panter, georg.brandl, ixokai, orsenthil, pitrou, BreamoreBoy, berker.peksag
2016-06-21 03:05:51martin.pantersetmessageid: <1466478351.41.0.11659779254.issue10116@psf.upfronthosting.co.za>
2016-06-21 03:05:51martin.panterlinkissue10116 messages
2016-06-21 03:05:50martin.pantercreate