Commit Graph

15808 Commits

Author SHA1 Message Date
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
Martin v. Löwis 24f09fdb23 Issue #8279: Fix test_gdb failures. 2010-04-17 22:40:40 +00:00
R. David Murray fb4812fb59 Issue #8263: On freebsd6 the unittest 'break' test stops regrtest; skip it.
This is presumably related to issue 3864, and appears to be due
to a platform bug on freebsd6.
2010-04-17 21:59:26 +00:00
Antoine Pitrou 0a6373c1a9 Issue #8322: Add a *ciphers* argument to SSL sockets, so as to change the
available cipher list.  Helps fix test_ssl with OpenSSL 1.0.0.
2010-04-17 17:10:38 +00:00
Senthil Kumaran 420ec8a0cd Fix Issue5650 - Update the RFC List in the urlparse module. 2010-04-17 14:30:53 +00:00
R. David Murray e0e8a87d7e Issue #3864: Skip three test_signal tests on freebsd6 due to platform bug.
Two itimer tests and an interprocess signal test fail on FreeBSD 6 if
any test that starts a thread runs before test_signal.  Since FreeBSD7
does not show this behavior, the bug is most likely a platform bug,
so this patch just skips the failing tests on freebsd6.
2010-04-17 05:26:26 +00:00
Benjamin Peterson 821a8ea39f have a clear error when passing something > sys.maxsize to bytearray 2010-04-16 22:35:38 +00:00
Benjamin Peterson 5c4e292c14 fix typo 2010-04-16 22:25:57 +00:00
Benjamin Peterson 06f06a0b2f bytearray -> type2test 2010-04-16 22:24:16 +00:00
Benjamin Peterson e7ebdc2a61 remove check for unicode 2010-04-16 21:55:10 +00:00
Senthil Kumaran 8c6d9d7c8d Fix issue2987: RFC2732 support for urlparse (IPv6 addresses) 2010-04-16 02:46:46 +00:00
Brian Curtin b3dde13413 Fix os.kill tests to be more robust and work with slower machines.
Rather than depending on some sleep value, start up an interpreter
as a subprocess and communicate with it. Because subprocess pipes
can't be read from until EOF and I want to read from them before that,
use ctypes to peek by using PeekNamedPipe. Once the subprocess has
written the message, then it is ready to roll and accept signals.
After that, kill it.
2010-04-15 00:40:40 +00:00
Georg Brandl ea56710cda #5341: fix typo and adapt docstring syntax. 2010-04-14 08:56:01 +00:00
Brian Curtin 235350a142 Add a small sleep to let a subprocess start before terminating it.
David Bolen's buildbot isn't know for it's speed, and it seems that we
may have been trying to kill the subprocess before it was fully
initialized. I ran with this change on the bot itself and it seemed to work.
2010-04-14 02:24:24 +00:00
R. David Murray 661303f27e Issue #5277: Fix quote counting when parsing RFC 2231 encoded parameters. 2010-04-13 20:57:40 +00:00
Mark Dickinson 2c4798b1fd In test_winsound, don't try to import _winreg until after checking that winsound is supported. 2010-04-13 11:37:23 +00:00
Brian Curtin d5c50b32aa Fix #7306. Add skips to test_winsound when no default sound is configured.
These failures occur on a Windows Server 2003 machine I test on.
2010-04-13 02:25:20 +00:00
Brian Curtin bc96f3272d Fix #8364. Update the setquit docstring and change a built-in to builtin. 2010-04-12 23:30:49 +00:00
R. David Murray 1a14d3d169 Issue #7585: use tab between components in unified and context diff headers.
Instead of spaces between the filename and date (or whatever the string
is that follows the filename, if any) use tabs.  This is what the unix
'diff' command does, for example, and difflib was intended to follow
the 'standard' way of doing diffs.  This improves compatibility with
patch tools.  The docs and examples are also changed to recommended that
the date format used be the ISO 8601 format, which is what modern diff
tools emit by default.

Patch by Anatoly Techtonik.
2010-04-12 16:35:19 +00:00
Stefan Krah 9aca91d7d7 Issue #8367: Fix spurious test failure on systems without a sound card. 2010-04-12 15:21:25 +00:00
R. David Murray 27ef93797c Issue #7472: ISO-2022 charsets now consistently use 7bit CTE.
Fixed a typo in the email.encoders module so that messages output using
an ISO-2022 character set will use a content-transfer-encoding of
7bit consistently.  Previously if the input data had any eight bit
characters the output data would get marked as 8bit even though it
was actually 7bit.
2010-04-12 14:26:06 +00:00
Senthil Kumaran d10b65eb68 Adding additional examples of valid urls as per RFC 3986 (for issue8339) 2010-04-12 06:50:24 +00:00
Martin v. Löwis 5a96543b36 Re-enable all tests, to see which ones fail on the buildbots. 2010-04-12 05:22:25 +00:00
Martin v. Löwis 7f7765ce39 Issue #8330: Fix expected output in test_gdb. 2010-04-12 05:18:16 +00:00
Antoine Pitrou fc53153498 Issue #8374: Update the internal alias table in the :mod:`locale` module
to cover recent locale changes and additions.
2010-04-11 22:32:39 +00:00
Raymond Hettinger fdf1b5642b Minor factoring 2010-04-11 20:39:28 +00:00
Stefan Krah a185839862 Fix for issues #3581, #1481 and #7650:
1. The assumptions in check_node() were too restrictive:

     - Hardware addresses with universal_local_bit=1 are valid
       (locally administered).

     - Many of the tested functions (including uuid.getnode())
       may return valid RFC 4122 random node IDs. These are pretty
       much random 48-bit values with the multicast bit set to 1.

2. _unixdll_getnode() calls _uuid_generate_time(), which may be None
   on some platforms. The resulting TypeError is now caught.
2010-04-11 15:15:54 +00:00
Benjamin Peterson a11da59755 add test for class with no operations defined 2010-04-11 01:40:32 +00:00
Antoine Pitrou bba8f2d10a Revert temporary commit in r79937 2010-04-10 23:32:12 +00:00
Antoine Pitrou 16e026cc94 Temporary commit of fix to issue #5380 (in order to watch buildbot response) 2010-04-10 22:43:05 +00:00
Philip Jenvey cdd98fb463 fix PYTHONWARNINGS handling to not modify the original env value and improve
its tests
2010-04-10 20:27:15 +00:00
Jean-Paul Calderone b60ee469cd Refactor a couple inspect module tests to remove duplicate code
The test_classify_oldstyle and test_classify_newstyle methods of
test.test_inspect.TestClassesAndFunctions were previously almost
identical (aside from irrelevant whitespace and one semantic
difference).  They now share a single helper.

Fixes issue #8363.
2010-04-10 19:59:28 +00:00
Philip Jenvey bb66973afb adjust gc_collect for Jython 2010-04-10 19:39:07 +00:00
Raymond Hettinger 4e45512de2 Issue 8361: Remove assert from functools.total_ordering 2010-04-10 16:57:36 +00:00
Benjamin Peterson 2cab8db95e update pydoc-topics 2010-04-10 16:28:34 +00:00
Benjamin Peterson fbac6c1590 bump version to 2.7b1 2010-04-10 16:22:05 +00:00
Nick Coghlan 14459d5b1b Fix typo in comment 2010-04-10 15:01:54 +00:00
Nick Coghlan 13623662ea Try to turn some buildbots green by allowing test_multiprocessing to pass even if it hits the sys.exc_clear code in the threading module, and improve the test coverage by making the ctypes dependencies a bit more granular (two of the cited ctypes objects don't exist on my system) 2010-04-10 14:24:36 +00:00
Antoine Pitrou 343314a11c Revert r79915 (temporary commit to check for buildbots -> the fix was successful) 2010-04-09 22:41:31 +00:00
Antoine Pitrou 9c6cd56e91 Temporarily commit fix to issue #8108, to check for buildbot response 2010-04-09 21:00:36 +00:00
Martin v. Löwis 7bc26b9be6 Issue #8348: Fix test ftp url in test_urllib2net. 2010-04-08 17:40:54 +00:00
Martin v. Löwis e84089e3f1 Issue #8204: Fix test_ttk notebook test by forcing focus. 2010-04-08 17:38:32 +00:00
Martin v. Löwis 1b287c7434 Issue #8344: Fix test_ttk bug on FreeBSD. 2010-04-08 09:47:40 +00:00
Michael Foord 91a2c89288 Switch regrtest to use StringIO instead of cStringIO for test_multiprocessing on Windows. Issue 8333. 2010-04-08 00:04:24 +00:00
Michael Foord f6ff26c486 unittest.result.TestResult does not create its buffers until they're used. It uses StringIO not cStringIO. Issue 8333. 2010-04-07 23:04:22 +00:00
Martin v. Löwis 9a39eccfe1 Issue #8337: Disable the remaining test also for now. 2010-04-07 19:11:32 +00:00
Mark Dickinson 65605f7a5f Use some more interesting test values for (unsigned) long long ctypes tests,
in the hope of getting more information about the test_ctypes failures
on Sparc (see issue #8314).
2010-04-07 10:18:27 +00:00
Philip Jenvey aebbaeb962 #7301: add the environment variable $PYTHONWARNINGS to supplement the -W
command line option
patch from Brian Curtin
2010-04-06 23:24:45 +00:00
Michael Foord c1bf677e28 Fix module directory finding logic for dotted paths in unittest test discovery. 2010-04-06 23:18:16 +00:00
Benjamin Peterson 3a1dfa21c2 remove a optimization that resulted in unexpected behavior #8929 2010-04-06 21:50:00 +00:00
Benjamin Peterson 22c62dd345 use skip decorator 2010-04-06 21:37:06 +00:00
Antoine Pitrou 3b4c989cfd Issue #8193: Fix test_zlib failure with zlib 1.2.4. 2010-04-06 17:21:09 +00:00
Senthil Kumaran b02b311592 Fix Issue8262 - changing RuntimeError wording to "Threads can only be started once" 2010-04-06 03:23:33 +00:00
Antoine Pitrou f9de534c21 Issue #8321: Give access to OpenSSL version numbers from the `ssl` module,
using the new attributes `ssl.OPENSSL_VERSION`, `ssl.OPENSSL_VERSION_INFO`
and `ssl.OPENSSL_VERSION_NUMBER`.
2010-04-05 21:35:07 +00:00
Brian Curtin fce1d31d47 Fix a failing test on an apparently slow Windows buildbot.
On slower Windows machines, waiting 0.1 seconds can sometimes not be
enough for a subprocess to start and be ready to accept signals, causing
the test to fail. One buildbot is also choking on input()/EOFError so
that was changed to not depend on input.
2010-04-05 19:04:23 +00:00
Raymond Hettinger e1d665a90e Classes that override __eq__ also need to define __hash__. 2010-04-05 18:53:43 +00:00
Mark Dickinson 5e0c2748fb Use a more robust infinity check in _Py_HashDouble.
This fixes a test_decimal failure on FreeBSD 8.0.  (modf apparently
doesn't follow C99 Annex F on FreeBSD.)
2010-04-05 18:07:51 +00:00
R. David Murray 0c08009708 Issue 8316: make test_gdb robust in the face of differing terminal
widths.  Patch by Dave Malcolm.
2010-04-05 16:28:49 +00:00
Philip Jenvey 034b0acdd3 fix escape_encode to return the correct consumed size 2010-04-05 02:51:51 +00:00
Benjamin Peterson 76a23c17bc fix dis on new style classes #8310 2010-04-04 23:23:22 +00:00