summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2net.py
Commit message (Collapse)AuthorAgeFilesLines
* [2.7] bpo-30883: Use pythontest.net instead of debian.org in test_urllib2net ↵Ammar Askar2017-07-191-3/+3
| | | | (GH-2755)
* ssue #23881: ftp://gatekeeper.research.compaq.com/ and ftp://ftp.debian.org/Victor Stinner2015-04-071-6/+4
| | | | | | | are down, don't use anymore in test_urllib2net ftp.kernel.org is also slow or down, so reuse the same FTP servers than Python 3.4 and 3.5: use ftp.debian.org instead.
* use pythontest.net for url fragment testBenjamin Peterson2014-11-051-2/+2
|
* use https docs url (#21115)Benjamin Peterson2014-03-311-2/+2
|
* Issue #20939: Use www.example.com instead of www.python.org to avoid testNed Deily2014-03-271-6/+6
| | | | failures when ssl is not present.
* Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref ↵Serhiy Storchaka2014-02-081-13/+13
| | | | tests.
* Issue #19936: Added executable bits or shebang lines to Python scripts whichSerhiy Storchaka2014-01-161-2/+0
| | | | | | requires them. Disable executable bits and shebang lines in test and benchmark files in order to prevent using a random system python, and in source files of modules which don't provide command line interface.
* changeset: 80007:49e4541f2aefGeorg Brandl2012-10-281-2/+2
| | | | | | | | parent: 80003:be83cbf4a789 parent: 80006:32df036e6b75 user: Georg Brandl <georg@python.org> date: Sun Oct 28 10:50:11 2012 +0100 summary: merge with 3.3
* Fix Issue6631 - Disallow relative files paths in urllib*.open()Senthil Kumaran2012-01-211-0/+2
|
* running tests enables us to discover that they actually workBenjamin Peterson2011-07-311-1/+1
|
* using test_support.transient_internet helper method in the urllib2net test.Senthil Kumaran2011-07-311-3/+5
|
* merge from 3.2 - fix urlopen behavior on sites which do not send (or ↵Senthil Kumaran2011-07-271-0/+8
| | | | obsfuscates) Connection: Close header.
* Issue #10883: Fix socket leaks in urllib.request.Nadeem Vawda2011-07-231-0/+1
| | | | | | | | * ftpwrapper now uses reference counting to ensure that the underlying socket is closed when the ftpwrapper object is no longer in use * ftplib.FTP.ntransfercmd() now closes the socket if an error occurs Initial patch by Victor Stinner.
* Fix Issue11703 - urllib2.get_url does not handle fragment in url properly.Senthil Kumaran2011-04-121-1/+1
|
* Merged revisions 85893 via svnmerge fromAntoine Pitrou2010-10-311-67/+82
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85893 | georg.brandl | 2010-10-28 16:55:02 +0200 (jeu., 28 oct. 2010) | 1 line #10116: wrap transient_internet() around net access in test_urllib2net. ........
* Merged revisions 85025 via svnmerge fromSenthil Kumaran2010-09-271-0/+12
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85025 | senthil.kumaran | 2010-09-27 06:56:03 +0530 (Mon, 27 Sep 2010) | 6 lines Fix Issue1595365 - Adding the req.headers after the un-redirect headers have been added. This helps in accidental overwritting of User-Agent header to default value. To preserve the old behavior, only headers not in unredirected headers will be updated. ........
* Fix Issue1327971: HTTPResponse should expose a proper fileno attributeSenthil Kumaran2010-09-211-0/+11
|
* Merged revisions 84597-84599 via svnmerge fromAntoine Pitrou2010-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84597 | antoine.pitrou | 2010-09-07 22:42:19 +0200 (mar., 07 sept. 2010) | 5 lines Issue #8574: better implementation of test.support.transient_internet(). Original patch by Victor. ........ r84598 | antoine.pitrou | 2010-09-07 23:05:49 +0200 (mar., 07 sept. 2010) | 6 lines Issue #9792: In case of connection failure, socket.create_connection() would swallow the exception and raise a new one, making it impossible to fetch the original errno, or to filter timeout errors. Now the original error is re-raised. ........ r84599 | antoine.pitrou | 2010-09-07 23:09:09 +0200 (mar., 07 sept. 2010) | 4 lines Improve transient_internet() again to detect more network errors, and use it in test_robotparser. Fixes #8574. ........
* Merged revisions 83818 via svnmerge fromSenthil Kumaran2010-08-081-0/+7
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83818 | senthil.kumaran | 2010-08-08 16:57:53 +0530 (Sun, 08 Aug 2010) | 4 lines Fix Issue8280 - urllib2's Request method will remove fragements in the url. This is how it should work,wget and curl work like this way too. Old behavior was wrong. ........
* Fix Issue8460: Victor's patch to add timeout in test_urllib2net test_urls.Senthil Kumaran2010-04-201-4/+16
|
* Issue #8348: Fix test ftp url in test_urllib2net.Martin v. Löwis2010-04-081-1/+1
|
* Remove unused imports in test modules.Georg Brandl2010-02-071-4/+1
|
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-1/+1
|
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-6/+6
|
* Issue #5341: Fix a variety of spelling errors.Mark Dickinson2009-02-211-1/+1
|
* Finished bug #2451. Fixed the retrying part to make itFacundo Batista2008-06-071-8/+16
| | | | more robust.
* Fixed the semantic of timeout for socket.create_connection andFacundo Batista2008-05-291-17/+29
| | | | | | all the upper level libraries that use it, including urllib2. Added and fixed some tests, and changed docs correspondingly. Thanks to John J Lee for the patch and the pusing, :)
* This patch moves some tests from test_urllib2_net to test_urllib2_localnet.Gregory P. Smith2008-03-281-96/+2
| | | | | | | | The moved tests use a local server rather than going out to external servers. Accepts patch from issue2429. Contributed by Jerry Seutter & Michael Foord (fuzzyman) at PyCon 2008.
* Make the test more robust by trying to reconnect up to 3 timesNeal Norwitz2008-01-251-19/+35
| | | | | | | in case there were transient failures. This will hopefully silence the buildbots for this test. As we find other tests that have a problem, we can fix with a similar strategy assuming it is successful. It worked on my box in a loop for 10+ runs where it would have an exception otherwise.
* Change socket.error to inherit from IOError rather than being a standGregory P. Smith2007-09-091-9/+7
| | | | | | | | | | | | | | | | | | | | | | alone class. This addresses the primary concern in http://bugs.python.org/issue1706815 python-dev discussion here: http://mail.python.org/pipermail/python-dev/2007-July/073749.html I chose IOError rather than EnvironmentError as the base class since socket objects are often used as transparent duck typed file objects in code already prepared to deal with IOError exceptions. also a minor fix: urllib2 - fix a couple places where IOError was raised rather than URLError. for better or worse, URLError already inherits from IOError so this won't break any existing code. test_urllib2net - replace bad ftp urls.
* Added an optional timeout parameter to function urllib2.urlopen,Facundo Batista2007-06-061-0/+44
| | | | | | | with tests in test_urllib2net.py (must have network resource enabled to execute them). Also modified test_urllib2.py because testing mock classes must take it into acount. Docs are also updated.
* Remove the gopherlib module. It has been raising a DeprecationWarning sinceBrett Cannon2007-05-161-15/+0
| | | | | | | Python 2.5. Also remove gopher support from urllib/urllib2. As both imported gopherlib the usage of the support would have raised a DeprecationWarning.
* Raise ResourceDenied in test_urllib2net when the Net connection goes bad.Brett Cannon2007-03-141-1/+2
|
* Patch #1627441: close sockets properly in urllib2.Georg Brandl2007-01-211-2/+27
|
* Fix test on PPC64 buildbot. It raised an IOError (really an URLError whichNeal Norwitz2006-06-111-1/+1
| | | | | derives from an IOError). That seems valid. Env Error includes both OSError and IOError, so this seems like a reasonable fix.
* Try to fix another networking test. The problem is that if hosts haveNeal Norwitz2006-06-111-4/+5
| | | | | | | | a search path setup, some of these hosts resolve to the wrong address. By appending a period to the hostname, the hostname should only resolve to what we want it to resolve to. Hopefully this doesn't break different bots. Also add more info to failure message to aid debugging test failure.
* Try to fix several networking tests. The problem is that if hosts haveNeal Norwitz2006-06-111-1/+1
| | | | | | a search path setup, some of these hosts resolve to the wrong address. By appending a period to the hostname, the hostname should only resolve to what we want it to resolve to. Hopefully this doesn't break different bots.
* Move network tests from test_urllib2 to test_urllib2net.Georg Brandl2006-05-031-1/+137
|
* Patch #1470846: fix urllib2 ProxyBasicAuthHandler.Georg Brandl2006-04-301-1/+42
|
* Fix urllib2.urlopen() handling of chunked content encoding.Jeremy Hylton2004-08-071-0/+92
The change to use the newer httplib interface admitted the possibility that we'd get an HTTP/1.1 chunked response, but the code didn't handle it correctly. The raw socket object can't be pass to addinfourl(), because it would read the undecoded response. Instead, addinfourl() must call HTTPResponse.read(), which will handle the decoding. One extra wrinkle is that the HTTPReponse object can't be passed to addinfourl() either, because it doesn't implement readline() or readlines(). As a quick hack, use socket._fileobject(), which implements those methods on top of a read buffer. (suggested by mwh) Finally, add some tests based on test_urllibnet. Thanks to Andrew Sawyers for originally reporting the chunked problem.