Commit Graph

65 Commits

Author SHA1 Message Date
Benjamin Peterson 809ee902c4 use https docs url 2014-03-31 13:50:34 -04:00
Benjamin Peterson 887cd7d981 merge 3.3 (#21115) 2014-03-31 13:46:45 -04:00
Benjamin Peterson b25e3f9e6a merge 3.2 2014-03-31 13:46:26 -04:00
Benjamin Peterson b4be376d16 use https docs url (#21115) 2014-03-31 13:44:53 -04:00
Ned Deily 5a507f0f05 Issue #20939: Use www.example.com instead of www.python.org to avoid test
failures when ssl is not present.
2014-03-26 23:31:39 -07:00
Serhiy Storchaka d3e1207191 Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests. 2014-02-08 14:51:10 +02:00
Serhiy Storchaka 25d8aeac7c Issue #20555: Use specific asserts in urllib, httplib, ftplib, cgi, wsgiref tests. 2014-02-08 14:50:08 +02:00
Serhiy Storchaka 8f8ec92de8 Issue #19936: Added executable bits or shebang lines to Python scripts which
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.  Fixed
shebang lines in the unittestgui and checkpip scripts.
2014-01-16 17:33:23 +02:00
Serhiy Storchaka b992a0e102 Issue #19936: Added executable bits or shebang lines to Python scripts which
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.  Fixed
shebang line to use python3 executable in the unittestgui script.
2014-01-16 17:15:49 +02:00
doko@ubuntu.com e575148cc2 - Issue #20070: Don't run test_urllib2net when network resources are not
enabled.
2013-12-26 17:37:11 +01:00
Brett Cannon 3e9a9ae09d Update various test modules to use unittest.main() for test discovery
instead of manually listing tests for test.support.run_unittest().
2013-06-12 21:25:59 -04:00
Senthil Kumaran 8307075ce8 Fix #17272 - Make Request.full_url and Request.get_full_url return same result under all circumstances.
Document the change of Request.full_url to a property.
2013-05-24 09:14:12 -07:00
Antoine Pitrou da23259f99 Issue #17107: Test client-side SNI support in urllib.request thanks to the new server-side SNI support in the ssl module.
Initial patch by Daniel Black.
2013-02-05 21:20:51 +01:00
Andrew Svetlov 3438fa496d Get rig of EnvironmentError (#16705) 2012-12-17 23:35:18 +02:00
Georg Brandl 5b9561d1f1 merge with 3.2 2012-10-28 10:51:46 +01:00
Georg Brandl 579d5cd643 changeset: 80007:49e4541f2aef
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
2012-10-28 10:51:35 +01:00
Nadeem Vawda 61baebd0e1 Issue #12804: Fix test failures on systems without internet access. 2012-01-25 08:02:05 +02:00
Senthil Kumaran 3800ea9f65 Fix Issue6631 - Disallow relative file paths in urllib urlopen 2012-01-21 11:52:48 +08:00
Senthil Kumaran e324c57367 using support.transient_internet helper method in the urllib2net test. 2011-07-31 11:45:14 +08:00
Senthil Kumaran 1299a8f3b2 Fix closes Issue12576 - fix urlopen behavior on sites which do not send (or obsfuscates) Connection: Close header. 2011-07-27 08:05:58 +08:00
Nadeem Vawda 08f5f7aa81 Issue #10883: Fix socket leaks in urllib.request.
* 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.
2011-07-23 14:03:00 +02:00
Victor Stinner eaca5c8b95 Issue #10883: test_urllib2net closes socket explicitly 2011-06-17 14:53:02 +02:00
Senthil Kumaran b17abb1af9 merge from 3.1 2011-04-13 07:22:29 +08:00
Senthil Kumaran 2643041970 Fix Issue11703 - urllib2.geturl() does not return correct url when the original url contains #fragment. Patch Contribution by Santoso Wijaya. 2011-04-13 07:01:19 +08:00
Antoine Pitrou 0eee1f588c Disabling SNI test; server admin would not like us to use it for automated tests. 2010-11-03 08:53:25 +00:00
Antoine Pitrou 27683c954b Merged revisions 85893 via svnmerge from
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.
........
2010-10-31 13:52:53 +00:00
Georg Brandl 5be365f55d #10116: wrap transient_internet() around net access in test_urllib2net. 2010-10-28 14:55:02 +00:00
Antoine Pitrou d532321f7b Issue #5639: Add a *server_hostname* argument to `SSLContext.wrap_socket`
in order to support the TLS SNI extension.  `HTTPSConnection` and
`urlopen()` also use this argument, so that HTTPS virtual hosts are now
supported.
2010-10-22 18:19:07 +00:00
Senthil Kumaran 603ca41e27 Merged revisions 85025 via svnmerge from
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.
........
2010-09-27 01:28:10 +00:00
Senthil Kumaran 42ef4b1f4c 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.
2010-09-27 01:26:03 +00:00
Senthil Kumaran 4c88db77a0 Merged revisions 83818 via svnmerge from
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.
........
2010-08-08 11:30:58 +00:00
Senthil Kumaran d95cc75483 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.
2010-08-08 11:27:53 +00:00
Senthil Kumaran dcedfb11b9 Merged revisions 80256 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r80256 | senthil.kumaran | 2010-04-20 16:05:49 +0530 (Tue, 20 Apr 2010) | 9 lines

  Merged revisions 80236 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r80236 | senthil.kumaran | 2010-04-20 12:24:59 +0530 (Tue, 20 Apr 2010) | 3 lines

    Fix Issue8460: Victor's patch to add timeout in test_urllib2net test_urls.
  ........
................
2010-04-20 10:40:21 +00:00
Senthil Kumaran b8f7ea6ceb Merged revisions 80236 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80236 | senthil.kumaran | 2010-04-20 12:24:59 +0530 (Tue, 20 Apr 2010) | 3 lines

  Fix Issue8460: Victor's patch to add timeout in test_urllib2net test_urls.
........
2010-04-20 10:35:49 +00:00
Benjamin Peterson 87cb787688 Merged revisions 79908 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79908 | martin.v.loewis | 2010-04-08 12:40:54 -0500 (Thu, 08 Apr 2010) | 2 lines

  Issue #8348: Fix test ftp url in test_urllib2net.
........
2010-04-11 21:59:57 +00:00
Georg Brandl 1b37e8728c Merged revisions 78093 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r78093 | georg.brandl | 2010-02-07 18:03:15 +0100 (So, 07 Feb 2010) | 1 line

  Remove unused imports in test modules.
........
2010-03-14 10:45:50 +00:00
Benjamin Peterson 90f5ba538b convert shebang lines: python -> python3 2010-03-11 22:53:45 +00:00
Ezio Melotti e96159335f Merged revisions 77727 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77727 | ezio.melotti | 2010-01-24 18:58:36 +0200 (Sun, 24 Jan 2010) | 1 line

  use assert[Not]IsInstance where appropriate
........
2010-01-24 19:26:24 +00:00
Georg Brandl ab91fdef1f Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line

  convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Benjamin Peterson c9c0f201fe convert old fail* assertions to assert* 2009-06-30 23:06:06 +00:00
Raymond Hettinger 686057b8fa Use new form of with-statement instead of contextlib.nested(). 2009-06-04 00:11:54 +00:00
Benjamin Peterson 4376dbc5f6 fix this test 2009-04-03 23:57:05 +00:00
Mark Dickinson 934896dc09 Merged revisions 69846 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69846 | mark.dickinson | 2009-02-21 20:27:01 +0000 (Sat, 21 Feb 2009) | 2 lines

  Issue #5341: Fix a variety of spelling errors.
........
2009-02-21 20:59:32 +00:00
Antoine Pitrou b353c12a9c Issue #4631: Fix urlopen() result when an HTTP response uses chunked encoding. 2009-02-11 00:39:14 +00:00
Kristján Valur Jónsson 3bbfba841a r69209 caused the fp of HTTPResponse objects to be a io.BufferedReader instead of a socket.SocketIO. This moves the underlying socket.socket object from r.fp._sock to r.fp.raw._sock. Since _sock is an internal object, this should be ok. The change is for the testsuite only, to assert socket state. 2009-02-03 10:57:52 +00:00
Jeremy Hylton 1afc169616 Make a new urllib package .
It consists of code from urllib, urllib2, urlparse, and robotparser.
The old modules have all been removed.  The new package has five
submodules: urllib.parse, urllib.request, urllib.response,
urllib.error, and urllib.robotparser.  The urllib.request.urlopen()
function uses the url opener from urllib2.

Note that the unittests have not been renamed for the
beta, but they will be renamed in the future.

Joint work with Senthil Kumaran.
2008-06-18 20:49:58 +00:00
Barry Warsaw 820c120059 Patch for issue 2848, mostly by Humberto Diogenes, with a couple of
small fixes by Barry.  This removes mimetools from the stdlib.
2008-06-12 04:06:45 +00:00
Georg Brandl c28e1fa71f Merged revisions 64002-64003,64012,64036-64037,64047,64050-64052,64054-64055,64066,64071 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r64002 | travis.oliphant | 2008-06-07 00:33:21 +0200 (Sat, 07 Jun 2008) | 1 line

  Add long double check support to configure test.
........
  r64003 | travis.oliphant | 2008-06-07 00:39:47 +0200 (Sat, 07 Jun 2008) | 1 line

  Remove locking part of new buffer protocol.
........
  r64012 | facundo.batista | 2008-06-07 15:36:36 +0200 (Sat, 07 Jun 2008) | 4 lines


  Finished bug #2451.  Fixed the retrying part to make it
  more robust.
........
  r64036 | georg.brandl | 2008-06-08 10:54:40 +0200 (Sun, 08 Jun 2008) | 2 lines

  #3028: tokenize passes the physical line.
........
  r64037 | georg.brandl | 2008-06-08 10:59:38 +0200 (Sun, 08 Jun 2008) | 2 lines

  Argh, I read it wrong. Reverted 64036 and added a clarifying remark.
........
  r64047 | raymond.hettinger | 2008-06-09 03:28:30 +0200 (Mon, 09 Jun 2008) | 1 line

  Issue3065:  Fixed pickling of named tuples.  Added tests.
........
  r64050 | raymond.hettinger | 2008-06-09 08:54:45 +0200 (Mon, 09 Jun 2008) | 1 line

  Issue #2138: Add math.factorial().
........
  r64051 | raymond.hettinger | 2008-06-09 10:33:37 +0200 (Mon, 09 Jun 2008) | 1 line

  Let set.union() and set.update() accept multiple inputs.
........
  r64052 | raymond.hettinger | 2008-06-09 11:29:17 +0200 (Mon, 09 Jun 2008) | 1 line

  Address double-rounding scenarios by setting all variables to long doubles.
........
  r64054 | raymond.hettinger | 2008-06-09 13:24:47 +0200 (Mon, 09 Jun 2008) | 1 line

  Unhappy buildbots.  Revert 64052.  Long doubles have unexpected effects on some builds.
........
  r64055 | raymond.hettinger | 2008-06-09 15:07:27 +0200 (Mon, 09 Jun 2008) | 1 line

  Let set.intersection() and set.intersection_update() take multiple input arguments.
........
  r64066 | robert.schuppenies | 2008-06-10 12:10:31 +0200 (Tue, 10 Jun 2008) | 2 lines

  Issue 3048: Fixed sys.getsizeof for unicode objects.
........
  r64071 | thomas.heller | 2008-06-10 16:07:12 +0200 (Tue, 10 Jun 2008) | 3 lines

  NEWS entry for:
  Add an optional 'offset' parameter to byref, defaulting to zero.
........
2008-06-10 19:20:26 +00:00
Georg Brandl f78e02b798 Merged revisions 63562,63570,63728,63734,63784,63788,63802,63817,63827,63839,63887,63975,63998 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r63562 | martin.v.loewis | 2008-05-23 17:06:50 +0200 (Fri, 23 May 2008) | 2 lines

  Patch #1722225: Support QNX 6.
........
  r63570 | trent.nelson | 2008-05-23 22:33:14 +0200 (Fri, 23 May 2008) | 1 line

  Introduce a user macro named $(externalsDir), which should point to the root directory of where all the external sources should live.  Developers can change this value if their external sources live elsewhere.  The default of '..\..' matches the current status quo.
........
  r63728 | gregory.p.smith | 2008-05-26 23:16:34 +0200 (Mon, 26 May 2008) | 4 lines

  Fix issue2589: there was a potential integer overflow leading to
  memory corruption on esoteric platforms and incorrect behavior on
  normal platforms.
........
  r63734 | gregory.p.smith | 2008-05-27 00:07:28 +0200 (Tue, 27 May 2008) | 3 lines

  Fix issue2588: Do not execute str[size-1] = '\0' when a 0 size is
  passed in.  (The assert won't prevent this in non-debug builds).
........
  r63784 | raymond.hettinger | 2008-05-29 10:38:23 +0200 (Thu, 29 May 2008) | 1 line

  Fix two typos.
........
  r63788 | facundo.batista | 2008-05-29 18:39:26 +0200 (Thu, 29 May 2008) | 6 lines


  Fixed the semantic of timeout for socket.create_connection and
  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, :)
........
  r63802 | mark.dickinson | 2008-05-30 04:46:53 +0200 (Fri, 30 May 2008) | 2 lines

  Fix typo in testSum
........
  r63817 | raymond.hettinger | 2008-05-30 20:20:50 +0200 (Fri, 30 May 2008) | 8 lines

  * Mark intermedidate computes values (hi, lo, yr) as volatile.
  * Expand comments.
  * Swap variable names in the sum_exact code so that x and y
    are consistently chosen as the larger and smaller magnitude
    values respectively.
........
  r63827 | raymond.hettinger | 2008-05-31 05:24:31 +0200 (Sat, 31 May 2008) | 1 line

  Implement heapq in terms of less-than (to match list.sort()).
........
  r63839 | gerhard.haering | 2008-05-31 23:33:27 +0200 (Sat, 31 May 2008) | 2 lines

  Fixed rowcount for SELECT statements. They're -1 now (again), for better DB-API 2.0 compliance.
........
  r63887 | gregory.p.smith | 2008-06-02 06:05:52 +0200 (Mon, 02 Jun 2008) | 4 lines

  Fix issue 2782: be less strict about the format string type in strftime.
  Accept unicode and anything else ParseTuple "s#" can deal with.  This
  matches the time.strftime behavior.
........
  r63975 | neal.norwitz | 2008-06-06 06:47:01 +0200 (Fri, 06 Jun 2008) | 3 lines

  Aldo Cortesi confirmed this is still needed for OpenBSD 4.2 and 4.3.
  (I didn't regen configure, since I don't have a working autoconf.)
........
  r63998 | raymond.hettinger | 2008-06-06 23:47:51 +0200 (Fri, 06 Jun 2008) | 1 line

  Issue 3501: Make heapq support both __le__ and __lt__.
........
2008-06-10 17:40:04 +00:00
Georg Brandl 2442015af2 Create http package. #2883. 2008-05-26 16:32:26 +00:00