Commit Graph

15767 Commits

Author SHA1 Message Date
Benjamin Peterson 5e9cc5efed fix comment 2010-04-27 21:15:28 +00:00
Benjamin Peterson a9bd6d5ea7 reject None as the buffering argument like the C implementation does #8546 2010-04-27 21:01:54 +00:00
Antoine Pitrou 9bf5425f5f socket.error can really happen here, and fix a possible NameError 2010-04-27 13:13:26 +00:00
Antoine Pitrou db187847fb Qualify or remove or bare excepts. Simplify exception handling in places.
Remove uses of test_support.TestFailed.
2010-04-27 10:32:58 +00:00
Antoine Pitrou 435ba0cfb8 replace custom code with standard library functionality (HTTPServer.shutdown())
+ enable test that was never run (!)
+ make tests faster by lowering polling timeout
2010-04-27 09:51:18 +00:00
Antoine Pitrou 150acda57f Remove uses of find_unused_port() in test_ssl, and small cleanups 2010-04-27 08:40:51 +00:00
R. David Murray 3939dcdb72 Issue #6656: fix locale.format_string to handle escaped percents and mappings.
Refactors format_string.  Includes tests for the two problems noted in
the issue, but as far as I can see there are no other tests that confirm
that format_string conforms to normal % formatting rules.
2010-04-26 21:17:14 +00:00
Antoine Pitrou 278d665c6a When calling getpeername() in SSLSocket.__init__, only silence exceptions
caused by the "socket not connected" condition.
2010-04-26 17:23:33 +00:00
R. David Murray 3bfa883207 Issue 8325: Improve regrtest --help text. 2010-04-26 16:54:57 +00:00
Brett Cannon 3d6137962c Revert an accidental commit from r80492. 2010-04-25 23:11:51 +00:00
Brett Cannon 1994969c15 When DeprecationWarning was silenced by default, it also silenced any use of -Q
by default as well. This change fixes that by treating -Q like -3 when it comes
to DeprecationWarning; using it causes the silencing to not occur.

Fixes issue #7319.
2010-04-25 22:33:36 +00:00
Antoine Pitrou a624040d72 Issue #2302: Fix a race condition in SocketServer.BaseServer.shutdown,
where the method could block indefinitely if called just before the
event loop started running.  This also fixes the occasional freezes
witnessed in test_httpservers.
2010-04-25 21:40:32 +00:00
Antoine Pitrou 1ca8c19b65 Replace a Lock with a better suited Event. 2010-04-25 21:15:50 +00:00
Michael Foord 5c322ece96 Adding unittest.removeHandler function / decorator for removing the signal.SIGINT signal handler. With tests and docs. 2010-04-25 19:02:46 +00:00
Antoine Pitrou fc69af1562 Issue #5103: SSL handshake would ignore the socket timeout and block
indefinitely if the other end didn't respond.
2010-04-24 20:04:58 +00:00
Brian Curtin a2936cfa09 Fix #7838. Add docstrings and privatize _subprocess implementation details.
Since CREATE_NEW_* are used for the creation flags of a subprocess, they
were added to __all__. The rest of the previously exposed attributes are
now qualified by _subprocess.ATTR rather than importing *.
2010-04-24 15:40:11 +00:00
Antoine Pitrou 55841ac1a5 Make test_makefile_close a networked test (can't read() from a non-connected
socket under OS X), and skip it under Windows (where sockets can't be read()
from using their fds).
2010-04-24 10:43:57 +00:00
Georg Brandl 4341e54de8 #7507: quote "!" in pipes.quote(); it is a special character for some shells. 2010-04-24 09:08:10 +00:00
Antoine Pitrou b558f17b18 Issue #5238: Calling makefile() on an SSL object would prevent the
underlying socket from being closed until all objects get truely destroyed.
2010-04-23 23:25:45 +00:00
Antoine Pitrou dfb299bb95 Issue #7943: Fix circular reference created when instantiating an SSL
socket.  Initial patch by Péter Szabó.
2010-04-23 22:54:59 +00:00
Florent Xicluna 1273566cb7 Fix the "regrtest -s" switch. 2010-04-23 18:10:12 +00:00
Florent Xicluna 64f6c2fcab Remove ImportWarnings filters. They become obsolete after r79310, issue #8205. 2010-04-23 17:59:10 +00:00
Antoine Pitrou a5c4b5515f Issue #8108: Fix the unwrap() method of SSL objects when the socket has
a non-infinite timeout.  Also make that method friendlier with applications
wanting to continue using the socket in clear-text mode, by disabling
OpenSSL's internal readahead.  Thanks to Darryl Miles for guidance.

Issue #8108: test_ftplib's non-blocking SSL server now has proper handling
of SSL shutdowns.
2010-04-22 23:33:02 +00:00
Antoine Pitrou 9aed604fb2 Skip test on old versions of OpenSSL 2010-04-22 18:00:41 +00:00
Antoine Pitrou 60b1ee375c Temporarily display OpenSSL version in verbose run -- trying to diagnose failure on Neal's buildbot. 2010-04-22 17:44:41 +00:00
Senthil Kumaran 398246169c Changed tests to only urlparse one, which was enough, addressed Ezio's comment
on Invalid url check statement and versionchanged string in docs.
2010-04-22 12:10:13 +00:00
Ezio Melotti 19c06739c5 Rephrase comment. 2010-04-22 11:53:21 +00:00
Ezio Melotti 23196a564b #8474: fix duplicate test in test_email. 2010-04-22 11:23:31 +00:00
Antoine Pitrou 1a9e9f282e Forgot to add the sample certificate (followup to r80314) 2010-04-21 19:36:23 +00:00
Antoine Pitrou c715a9ed08 Issue #8484: Load all ciphers and digest algorithms when initializing
the _ssl extension, such that verification of some SSL certificates
doesn't fail because of an "unknown algorithm".
2010-04-21 19:28:03 +00:00
Tarek Ziadé 62e17ad234 shutil: removed unused import and fixed attributes names in _call_external_zip 2010-04-21 13:32:26 +00:00
Ronald Oussoren 78118992ad Sync test_plistlib.py with plistlib.py 2010-04-21 06:00:35 +00:00
Victor Stinner a92e81bf48 Issue #8437: Fix test_gdb failures, patch written by Dave Malcolm 2010-04-20 22:28:31 +00:00
Tarek Ziadé e593fad81b removed ztar support in shutil.make_archive 2010-04-20 21:09:06 +00:00
Ronald Oussoren 8e6ca8fb19 Fix for issue 7852: the DTD for OSX Plists has changed due
to a change in the company name for Apple.
2010-04-20 20:59:37 +00:00
Senthil Kumaran 241a04371b Issue2987 - Added additional Invalid URL and changed the Invalid URL checking code for better. 2010-04-20 20:37:59 +00:00
Matthias Klose c166b4021f fix typo in r79533, introduced by the fix for issue #8233 2010-04-20 19:45:34 +00:00
Stefan Krah 68b4e01c48 1) The timeout in the itimer tests was too low for slow or heavily
loaded machines.

2) Even with the increased timeout, the OS does not guarantee that
   a process will get a certain amount of virtual time in 60s, so
   the failure is changed to a diagnostic.
2010-04-20 07:59:10 +00:00
Senthil Kumaran 281b551a2e Fix Issue8460: Victor's patch to add timeout in test_urllib2net test_urls. 2010-04-20 06:54:59 +00:00
Giampaolo Rodolà 607f7c056e Fix Issue #4841: timeout is now applied for connections resulting from PORT/EPRT commands 2010-04-19 21:46:28 +00:00
Tarek Ziadé 8a12f940fe Fixed #8463: added missing reference to bztar in shutil's documentation. 2010-04-19 21:28:21 +00:00
Tarek Ziadé f1c28b75e0 few pep8 fixes 2010-04-19 21:13:03 +00:00
Antoine Pitrou 7c587bf53d Issue #8438: Remove reference to the missing "surrogateescape" encoding
error handler from the new IO library.
2010-04-19 18:52:43 +00:00
Raymond Hettinger 35b76027f9 Issue 8436: set.__init__ accepts keyword args 2010-04-18 22:57:57 +00:00
Antoine Pitrou 9958c56eb0 Fix catastrophic file opening and closing logic in test_linecache 2010-04-18 19:14:38 +00:00
Victor Stinner 814b6c222d Revert r80166 (and r80171), restore Lib/platform.py. subprocess cannot be used in platform.py 2010-04-18 18:22:25 +00:00
Ronald Oussoren 37805e5c1f Fix for issue #7072 2010-04-18 13:47:49 +00:00
Giampaolo Rodolà cf445fced4 Fix Issue #3817: 225 is now considered a valid response code for ABOR 2010-04-18 12:55:03 +00:00
Antoine Pitrou 5ac74168b9 Fix bootstrap after r80166 2010-04-18 11:16:24 +00:00
Victor Stinner b2a0a434a8 platform: use subprocess.Popen() instead of os.popen() in _syscmd_file()
* Popen() avoids ugly shell escape: target.replace('"', '\\"')
 * Use proc.communicate() instead of f.stdout.read()
 * Get output from stdout by splitting with ": " instead of splitting by spaces
   to support filename with spaces
2010-04-18 09:07:49 +00:00