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 vstinner
Recipients raniere, vstinner
Date 2015-03-27.12:43:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427460184.8.0.193099970073.issue23788@psf.upfronthosting.co.za>
In-reply-to
Content
Hi,

Can you please complete your bug report? Can you specifiy your OS? Can you try to rerun the test manually with "./python -m test -u all test_urllib2_localnet"?

The test:

    def test_bad_address(self):
        # Make sure proper exception is raised when connecting to a bogus
        # address.

        # as indicated by the comment below, this might fail with some ISP,
        # so we run the test only when -unetwork/-uall is specified to
        # mitigate the problem a bit (see #17564)
        support.requires('network')
        self.assertRaises(OSError,
                          # Given that both VeriSign and various ISPs have in
                          # the past or are presently hijacking various invalid
                          # domain name requests in an attempt to boost traffic
                          # to their own sites, finding a domain name to use
                          # for this test is difficult.  RFC2606 leads one to
                          # believe that '.invalid' should work, but experience
                          # seemed to indicate otherwise.  Single character
                          # TLDs are likely to remain invalid, so this seems to
                          # be the best choice. The trailing '.' prevents a
                          # related problem: The normal DNS resolver appends
                          # the domain names from the search path if there is
                          # no '.' the end and, and if one of those domains
                          # implements a '*' rule a result is returned.
                          # However, none of this will prevent the test from
                          # failing if the ISP hijacks all invalid domain
                          # requests.  The real solution would be to be able to
                          # parameterize the framework with a mock resolver.
                          urllib.request.urlopen,
                          "http://sadflkjsasf.i.nvali.d./")
History
Date User Action Args
2015-03-27 12:43:04vstinnersetrecipients: + vstinner, raniere
2015-03-27 12:43:04vstinnersetmessageid: <1427460184.8.0.193099970073.issue23788@psf.upfronthosting.co.za>
2015-03-27 12:43:04vstinnerlinkissue23788 messages
2015-03-27 12:43:03vstinnercreate