Commit Graph

6200 Commits

Author SHA1 Message Date
Benjamin Peterson aada7b8f78 Merged revisions 81428-81429,81432-81433,81437 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81428 | benjamin.peterson | 2010-05-21 16:16:12 -0500 (Fri, 21 May 2010) | 1 line

  use addCleanup
........
  r81429 | benjamin.peterson | 2010-05-21 16:17:22 -0500 (Fri, 21 May 2010) | 1 line

  fix name
........
  r81432 | benjamin.peterson | 2010-05-21 16:31:24 -0500 (Fri, 21 May 2010) | 1 line

  ensure the last line has a trailing newline #8782
........
  r81433 | benjamin.peterson | 2010-05-21 16:32:49 -0500 (Fri, 21 May 2010) | 1 line

  remove debugging rubish
........
  r81437 | benjamin.peterson | 2010-05-21 16:35:44 -0500 (Fri, 21 May 2010) | 1 line

  simplify and modernize updatecache()
........
2010-05-21 21:45:06 +00:00
Benjamin Peterson 4ad6bd5482 Merged revisions 81414 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81414 | benjamin.peterson | 2010-05-21 15:51:45 -0500 (Fri, 21 May 2010) | 1 line

  return NotImplemented from Mapping when comparing to a non-mapping #8729
........
2010-05-21 20:55:22 +00:00
Victor Stinner b369358ee4 Issue #8780: Fix a regression introduced by r78946 in subprocess on Windows
Ensure that stdout / stderr is inherited from the parent if stdout=PIPE /
stderr=PIPE is not used.
2010-05-21 20:13:12 +00:00
Mark Dickinson cc6a982de8 Issue #8748: Fix two issues with comparisons between complex and integer
objects.  (1) The comparison could incorrectly return True in some cases
(2**53+1 == complex(2**53) == 2**53), breaking transivity of equality.
(2) The comparison raised an OverflowError for large integers, leading
to unpredictable exceptions when combining integers and complex objects
in sets or dicts.

Patch by Meador Inge.
2010-05-21 14:55:26 +00:00
Antoine Pitrou b52187710e Issue #4870: Add an `options` attribute to SSL contexts, as well as
several ``OP_*`` constants to the `ssl` module.  This allows to selectively
disable protocol versions, when used in combination with `PROTOCOL_SSLv23`.
2010-05-21 09:56:06 +00:00
Victor Stinner 150016fd24 Issue #8559: improve unicode support of (gdb) libpython.py
* Escape non printable characters (use locale.getpreferredencoding())
 * Fix support of surrogate pairs
 * test_gdb.py: use ascii() instead of repr() in gdb program arguments to avoid
   encoding issues
 * Fix test_strings() of test_gdb.py for encoding different than UTF-8
   (eg. ACSII)
2010-05-19 23:04:56 +00:00
Tarek Ziadé 06710a8421 Merged revisions 81371 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81371 | tarek.ziade | 2010-05-20 00:20:14 +0200 (Thu, 20 May 2010) | 1 line

  #8759: Fixed user paths in sysconfig for posix and os2 schemes
........
2010-05-19 22:25:00 +00:00
Georg Brandl 8569e582f8 Merged revisions 80030,80067,80069,80080-80081,80084,80432-80433,80465-80470,81059,81065-81067 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80030 | georg.brandl | 2010-04-13 08:43:54 +0200 (Di, 13 Apr 2010) | 1 line

  Get rid of multi-row cells.
........
  r80067 | georg.brandl | 2010-04-14 10:53:38 +0200 (Mi, 14 Apr 2010) | 1 line

  #5341: typo.
........
  r80069 | georg.brandl | 2010-04-14 15:50:31 +0200 (Mi, 14 Apr 2010) | 1 line

  Add an x-ref to where the O_ constants are documented and move the SEEK_ constants after lseek().
........
  r80080 | georg.brandl | 2010-04-14 21:16:38 +0200 (Mi, 14 Apr 2010) | 1 line

  #8399: add note about Windows and O_BINARY.
........
  r80081 | georg.brandl | 2010-04-14 23:34:44 +0200 (Mi, 14 Apr 2010) | 1 line

  #5250: document __instancecheck__ and __subclasscheck__.  I hope the part about the class/metaclass distinction is understandable.
........
  r80084 | georg.brandl | 2010-04-14 23:46:45 +0200 (Mi, 14 Apr 2010) | 1 line

  Fix missing.
........
  r80432 | georg.brandl | 2010-04-24 10:56:58 +0200 (Sa, 24 Apr 2010) | 1 line

  Markup fixes.
........
  r80433 | georg.brandl | 2010-04-24 11:08:10 +0200 (Sa, 24 Apr 2010) | 1 line

  #7507: quote "!" in pipes.quote(); it is a special character for some shells.
........
  r80465 | georg.brandl | 2010-04-25 12:29:17 +0200 (So, 25 Apr 2010) | 1 line

  Remove LaTeXy index entry syntax.
........
  r80466 | georg.brandl | 2010-04-25 12:54:42 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Better cross-referencing in socket and winreg docs.
........
  r80467 | georg.brandl | 2010-04-25 12:55:16 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Remove reference to winreg being the fabled high-level registry interface.
........
  r80468 | georg.brandl | 2010-04-25 12:55:58 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Minor spelling changes to _winreg docs.
........
  r80469 | georg.brandl | 2010-04-25 12:56:41 +0200 (So, 25 Apr 2010) | 1 line

  Fix code example to have valid syntax so that it can be highlighted.
........
  r80470 | georg.brandl | 2010-04-25 12:57:15 +0200 (So, 25 Apr 2010) | 1 line

  Patch from Tim Hatch: Make socket setblocking <-> settimeout examples symmetric.
........
  r81059 | georg.brandl | 2010-05-10 23:02:51 +0200 (Mo, 10 Mai 2010) | 1 line

  #8642: fix wrong function name.
........
  r81065 | georg.brandl | 2010-05-10 23:46:50 +0200 (Mo, 10 Mai 2010) | 1 line

  Fix reference direction.
........
  r81066 | georg.brandl | 2010-05-10 23:50:57 +0200 (Mo, 10 Mai 2010) | 1 line

  Consolidate deprecation messages.
........
  r81067 | georg.brandl | 2010-05-10 23:51:33 +0200 (Mo, 10 Mai 2010) | 1 line

  Fix typo.
........
2010-05-19 20:57:08 +00:00
Victor Stinner 7d79b8b771 Issue #8766: Initialize _warnings module before importing the first module.
Fix a crash if an empty directory called "encodings" exists in sys.path.
2010-05-19 20:40:50 +00:00
Victor Stinner 1802d3f388 regrtest.py: call replace_stdout() before the first call to print()
print("==  ", os.getcwd()) fails if the current working directory is not ASCII
whereas sys.stdout encoding is ASCII.
2010-05-19 17:11:19 +00:00
Victor Stinner 93b5513cf1 Issue #6697: Fix a crash if a keyword contains a surrogate 2010-05-19 00:54:06 +00:00
Giampaolo Rodolà 82e02b5876 Merged revisions 81294 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81294 | giampaolo.rodola | 2010-05-18 22:04:31 +0200 (mar, 18 mag 2010) | 1 line

  Fix issue #8573 (asyncore._strerror bug): fixed os.strerror typo; included NameError in the tuple of expected exception; added test case for asyncore._strerror.
........
2010-05-18 20:11:58 +00:00
Victor Stinner b745a74c99 Issue #8513: os.get_exec_path() supports b'PATH' key and bytes value.
subprocess.Popen() and os._execvpe() support bytes program name. Add
os.supports_bytes_environ flag: True if the native OS type of the environment
is bytes (eg. False on Windows).
2010-05-18 17:17:23 +00:00
Barry Warsaw 04b5684d00 Repair test failure. Bug 8727. 2010-05-18 14:15:20 +00:00
Victor Stinner c0983856c6 Fix test_main_invalid_unicode() of test_sys for ASCII locale encoding
It should fix sparc 3.x and 3.1 failures.
2010-05-17 19:57:40 +00:00
Lars Gustäbel 1465cc2887 Issue #8633: Support for POSIX.1-2008 binary pax headers.
tarfile is now able to read and write pax headers with a
"hdrcharset=BINARY" record. This record was introduced in
POSIX.1-2008 as a method to store unencoded binary strings that
cannot be translated to UTF-8. In practice, this is just a workaround
that allows a tar implementation to store filenames that do not
comply with the current filesystem encoding and thus cannot be
decoded correctly.
Additionally, tarfile works around a bug in current versions of GNU
tar: undecodable filenames are stored as-is in a pax header without a
"hdrcharset" record being added. Technically, these headers are
invalid, but tarfile manages to read them correctly anyway.
2010-05-17 18:02:50 +00:00
Victor Stinner 7cf7d72263 Improve test_exit() error message to analyze sparc failures 2010-05-17 14:36:43 +00:00
Antoine Pitrou d7e4c1caa6 Typo (thanks Arfrever) 2010-05-17 14:13:10 +00:00
Antoine Pitrou d0919507f9 Try to fix buildbot failures with old OpenSSLs. 2010-05-17 10:30:00 +00:00
Victor Stinner e9fb319e68 handle_system_exit() flushs files to warranty the output order
PyObject_Print() writes into the C object stderr, whereas PySys_WriteStderr()
writes into the Python object sys.stderr. Each object has its own buffer, so
call sys.stderr.flush() and fflush(stderr).
2010-05-17 08:58:51 +00:00
Victor Stinner 372ac5e732 PyObject_Dump() encodes unicode objects to utf8 with backslashreplace (instead
of strict) error handler to escape surrogates
2010-05-17 01:26:01 +00:00
Victor Stinner 6baded49d0 Issue #6697: Fix a crash if code of "python -c code" contains surrogates 2010-05-17 01:13:37 +00:00
Victor Stinner f155f1f4ce Oops, my patch on subprocess is not merged yet: fix my previous commit on test_os 2010-05-17 00:18:34 +00:00
Victor Stinner c2d095f494 test_os: cleanup test_internal_execvpe() and os._execvpe() mockup
* Replace os.defpath instead of os.get_exec_path() to test also
   os.get_exec_path()
 * Use contextlib.contextmanager, move the mockup outside the class, and
   the mockup returns directly the call list object
 * Use two different contexts for the two tests
 * Use more revelant values and names
2010-05-17 00:14:53 +00:00
Antoine Pitrou 304740635b "xyzzy" is not a silly enough name for some OpenSSL versions to report an error 2010-05-16 23:46:26 +00:00
Antoine Pitrou 27ba6388ed Do not fail if ssl fails to import 2010-05-16 20:35:03 +00:00
Antoine Pitrou 65ec8ae47f Fix (hopefully) the remaining test_ssl buildbot failures 2010-05-16 19:56:32 +00:00
Antoine Pitrou 467f28de03 Followup on r81233: fix test_ssl with OpenSSL < 1.0.0. 2010-05-16 19:22:44 +00:00
Antoine Pitrou 152efa2ae2 Issue #8550: Add first class `SSLContext` objects to the ssl module. 2010-05-16 18:19:27 +00:00
Victor Stinner 7ac5cb18df Merged revisions 81224 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81224 | victor.stinner | 2010-05-16 02:34:40 +0200 (dim., 16 mai 2010) | 4 lines

  Use with open() as fo: ... instead of try: fo = open(...) finally: fo.close()

  fo is not set if the open() fails.
........
2010-05-16 00:36:38 +00:00
Brett Cannon 9fad92a622 Make test_module_with_large_stack as an expected failure because of a change in
importlib that is causing it to fail. Work to fix it is being tracked in issue
8727.
2010-05-15 22:53:24 +00:00
Brett Cannon e88e6ce8b7 Fix a comment to state the right thing. 2010-05-15 22:51:45 +00:00
Brett Cannon 93220d0df1 A test was not guaranteeing cleanup in the face of an exception. 2010-05-15 22:20:16 +00:00
Benjamin Peterson 558cd64de0 Merged revisions 81200 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81200 | benjamin.peterson | 2010-05-15 12:48:55 -0500 (Sat, 15 May 2010) | 1 line

  use TestCase skip method
........
2010-05-15 17:52:12 +00:00
Mark Dickinson 4c8a9a2df3 Issue #8692: Improve performance of math.factorial:
(1) use a different algorithm that roughly halves the total number of
    multiplications required and results in more balanced multiplications
(2) use a lookup table for small arguments
(3) fast accumulation of products in C integer arithmetic rather than
    PyLong arithmetic when possible.

Typical speedup, from unscientific testing on a 64-bit laptop, is 4.5x
to 6.5x for arguments in the range 100 - 10000.

Patch by Daniel Stutzbach; extensive reviews by Alexander Belopolsky.
2010-05-15 17:02:38 +00:00
Stefan Krah 06ba9ade85 Merged revisions 81185 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81185 | stefan.krah | 2010-05-15 11:31:08 +0200 (Sat, 15 May 2010) | 4 lines

  If the timeout is exceeded, count the tests as skipped instead of just
  issuing a warning.
........
2010-05-15 09:41:27 +00:00
Victor Stinner 4000ffa19c Fix test_capi for Windows: strip newline characters
Fix test_no_FatalError_infinite_loop() introduced by r81142 (issue #3605).
2010-05-15 01:40:41 +00:00
Brett Cannon bbb2d492bc Merged revisions 81152 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81152 | brett.cannon | 2010-05-13 16:59:41 -0700 (Thu, 13 May 2010) | 3 lines

  test_site was failing under darwin for non-framework builds because a test was
  assuming framework-specific site-packages directories were being used.
........
2010-05-14 00:04:56 +00:00
Jeffrey Yasskin 8e0bdfd1d4 Make PyErr_Occurred return NULL if there is no current thread. Previously it
would Py_FatalError, which called PyErr_Occurred, resulting in a semi-infinite
recursion.

Fixes issue 3605.
2010-05-13 18:31:05 +00:00
Senthil Kumaran ead169d311 Merged revisions 81130 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81130 | senthil.kumaran | 2010-05-13 08:55:21 +0530 (Thu, 13 May 2010) | 3 lines

  Fix Issue8657 - adding git and git+ssh as know schemes.
........
2010-05-13 03:37:23 +00:00
Mark Dickinson 91f021fb70 Merged revisions 81126 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81126 | mark.dickinson | 2010-05-12 20:53:36 +0100 (Wed, 12 May 2010) | 1 line

  Fix unused variable in test_factorial.
........
2010-05-12 19:54:51 +00:00
Giampaolo Rodolà 340d7d2cc3 Merged revisions 81102 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81102 | giampaolo.rodola | 2010-05-12 02:29:27 +0200 (mer, 12 mag 2010) | 1 line

  Removed the assertion that dispatcher.connected attribute must be False after a single connect() call. Solaris and FreeBSD buildbots failures showed how connect() can succeed even in a single call. All bo failures should definitively be fixed now.
........
2010-05-12 00:33:15 +00:00
Antoine Pitrou 53b2166f0b Merged revisions 81098 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81098 | antoine.pitrou | 2010-05-12 01:42:28 +0200 (mer., 12 mai 2010) | 5 lines

  Issue #8681: Make the zlib module's error messages more informative when
  the zlib itself doesn't give any detailed explanation.
........
2010-05-11 23:46:02 +00:00
Antoine Pitrou c09c92fd81 Merged revisions 81094 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81094 | antoine.pitrou | 2010-05-12 01:32:31 +0200 (mer., 12 mai 2010) | 6 lines

  Issue #8672: Add a zlib test ensuring that an incomplete stream can be
  handled by a decompressor object without errors (it returns incomplete
  uncompressed data).
........
2010-05-11 23:36:40 +00:00
Giampaolo Rodolà 8fc1178cf8 Merged revisions 81043 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81043 | giampaolo.rodola | 2010-05-10 17:33:22 +0200 (lun, 10 mag 2010) | 1 line

  Issue #8490: adds a more solid test suite for asyncore
........
2010-05-10 15:40:49 +00:00
Giampaolo Rodolà bd576b75b7 Fix issue #4972: adds ftplib.FTP context manager protocol 2010-05-10 14:53:29 +00:00
Gregory P. Smith 3ea0062e0b Replace /s with os.sep in the new internal_execvpe test. Hopefully fixes
this test on windows.
2010-05-09 03:36:42 +00:00
Benjamin Peterson 31191a9cc5 make condition more specific 2010-05-09 03:22:58 +00:00
Jean-Paul Calderone 6f137ca469 Merged revisions 81007 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81007 | jean-paul.calderone | 2010-05-08 16:06:02 -0400 (Sat, 08 May 2010) | 1 line

  Skip signal handler re-installation if it is not necessary.  Issue 8354.
........
2010-05-09 03:18:57 +00:00
Victor Stinner bf9bcab98e Write tests for the new function os.fsencode() 2010-05-09 03:15:33 +00:00
Gregory P. Smith 4ae377755a Adds a unittest for the internal os._execvpe function. 2010-05-08 18:05:46 +00:00
Benjamin Peterson 06507eb791 Merged revisions 80991 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80991 | benjamin.peterson | 2010-05-08 11:44:52 -0500 (Sat, 08 May 2010) | 1 line

  run and fix enumerate start test cases #8636
........
2010-05-08 16:51:16 +00:00
Benjamin Peterson 3c451e6d9e Merged revisions 80986-80987 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80986 | benjamin.peterson | 2010-05-08 10:41:44 -0500 (Sat, 08 May 2010) | 1 line

  r80967 introduced a new scheme
........
  r80987 | benjamin.peterson | 2010-05-08 10:42:29 -0500 (Sat, 08 May 2010) | 1 line

  add underscore
........
2010-05-08 15:51:23 +00:00
Mark Dickinson 0381e3f16a Issue #8644: Improve accuracy of timedelta.total_seconds, by doing intermediate
computations with integer arithmetic instead of floating point.
td.total_seconds() now agrees with td / timedelta(seconds = 1).

Thanks Alexander Belopolsky for the patch.
2010-05-08 14:35:02 +00:00
Senthil Kumaran 4fbed10455 Merged revisions 80953 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80953 | senthil.kumaran | 2010-05-08 08:41:50 +0530 (Sat, 08 May 2010) | 3 lines

  Fix Issue8656 - urllib2 mangles file://-scheme URLs
........
2010-05-08 03:29:09 +00:00
Antoine Pitrou 8956271f11 Merged revisions 80926 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80926 | antoine.pitrou | 2010-05-07 18:50:34 +0200 (ven., 07 mai 2010) | 5 lines

  Issue #8571: Fix an internal error when compressing or decompressing a
  chunk larger than 1GB with the zlib module's compressor and decompressor
  objects.
........
2010-05-07 17:04:02 +00:00
Senthil Kumaran dd3820f275 Merged revisions 80908 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80908 | senthil.kumaran | 2010-05-07 09:37:29 +0530 (Fri, 07 May 2010) | 3 lines

  Testsuite for RFC3986 based parsing scenario. Related Issue1462525.
........
2010-05-07 04:19:23 +00:00
Victor Stinner a3032807f9 regrtest.py: disable replace_stdout() on Windows until it is fixed
See issue #8533 (problem with newlines on Windows).
2010-05-07 00:57:12 +00:00
Victor Stinner 208d28cd41 Fix test_os: os.environb doesn't exist on Windows 2010-05-07 00:54:14 +00:00
Benjamin Peterson 932d3f4177 self.skip -> self.skipTest 2010-05-06 22:26:31 +00:00
Benjamin Peterson 180799d4b3 wrap long lines 2010-05-06 22:25:42 +00:00
Benjamin Peterson 9eafe10783 use concise skipping 2010-05-06 22:23:58 +00:00
Victor Stinner 17b490d706 Fix test_posix (regression introduced by r80885) 2010-05-06 22:19:30 +00:00
Victor Stinner 84ae118006 Issue #8603: Create a bytes version of os.environ for Unix
Create os.environb mapping and os.getenvb() function, os.unsetenv() encodes str
argument to the file system encoding with the surrogateescape error handler
(instead of utf8/strict) and accepts bytes, and posix.environ keys and values
are bytes.
2010-05-06 22:05:07 +00:00
Giampaolo Rodolà d930b63583 Merged revisions 80882 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80882 | giampaolo.rodola | 2010-05-06 22:19:32 +0200 (gio, 06 mag 2010) | 1 line

  adds handle_error(self):raise to test modules using asyncore to provide a clearer error message in case something goes wrong
........
2010-05-06 20:21:57 +00:00
Giampaolo Rodolà 8d2dc85154 Merged revisions 80875 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80875 | giampaolo.rodola | 2010-05-06 19:57:06 +0200 (gio, 06 mag 2010) | 1 line

  Fix asyncore issues 8573 and 8483: _strerror might throw ValueError; asyncore.__getattr__ cheap inheritance caused confusing error messages when accessing undefined class attributes; added an alias for __str__ which now is used as a fallback for __repr__
........
2010-05-06 18:06:30 +00:00
Antoine Pitrou d75b2a90d9 Merged revisions 80869 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80869 | antoine.pitrou | 2010-05-06 16:11:23 +0200 (jeu., 06 mai 2010) | 3 lines

  `self` doesn't exist here
........
2010-05-06 14:15:10 +00:00
Mark Dickinson 85b53533e4 Issue #1533: Merge added trunk range tests to py3k. (The fix itself
doesn't need to be merged.)  Patch by Alexander Belopolsky.
2010-05-05 22:39:58 +00:00
Tarek Ziadé ae4d5c6b64 Merged revisions 80830 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80830 | tarek.ziade | 2010-05-06 00:15:31 +0200 (Thu, 06 May 2010) | 1 line

  Fixed #4265: shutil.copyfile() was leaking file descriptors when disk fills
........
2010-05-05 22:27:31 +00:00
Victor Stinner de629d46f2 Issue #8390: tarfile uses surrogateespace as the default error handler
(instead of replace in read mode or strict in write mode)
2010-05-05 21:43:57 +00:00
Ronald Oussoren 94f25283c9 Remove traces of MacOS9 support.
Fix for issue #7908
2010-05-05 19:11:21 +00:00
Antoine Pitrou a045f191b4 Merged revisions 80802 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80802 | antoine.pitrou | 2010-05-05 20:29:02 +0200 (mer., 05 mai 2010) | 3 lines

  Issue #8600: fix test_gdb failures when gdb issues some spurious warnings.
........
2010-05-05 18:30:22 +00:00
Barry Warsaw 83d8998390 Bug 7755: audiotest.au is arguably copyrighted material, but definitely makes
Debian unhappy.  The actual contents of the audio clip are unimportant, so
replace it with something that we know is okay.  Guido likes woodpeckers.
2010-05-05 16:18:31 +00:00
Ronald Oussoren ac764d3d5f Merged revisions 80784 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80784 | ronald.oussoren | 2010-05-05 16:48:37 +0200 (Wed, 05 May 2010) | 9 lines

  The C function used by uuid.uuid4 is broken on
  OSX 10.6 in that after os.fork() the parent and
  child generate the same sequence of UUIDs.

  This patch falls back to the the Python implementation
  on OSX 10.6 or later.

  Fixes issue #8621.
........
2010-05-05 15:32:33 +00:00
Michael Foord 2d9c2d5ecd Fix error handling removing files in test.support.unlink 2010-05-04 22:29:10 +00:00
Mark Dickinson c69160e808 Merged revisions 80753 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80753 | mark.dickinson | 2010-05-04 15:25:50 +0100 (Tue, 04 May 2010) | 10 lines

  Issue #8567: Fix incorrect precedence of signals in Decimal module.

  When a Decimal operation raises multiple signals and more than one of
  those signals is trapped, the specification determines the order in
  which the signals should be handled.  In many cases this order wasn't
  being followed, leading to the wrong Python exception being raised.
  This commit fixes those cases, and adds extra tests.  The tests are
  only enabled when EXTENDEDERRORTESTS is True, since they involve
  rerunning each Decimal testcase several times.
........
2010-05-04 14:35:33 +00:00
Alexandre Vassalotti a714257a66 Forward port unit tests for set operation and repr.
Patch by Alexander Belopolsky.
2010-05-04 03:41:49 +00:00
Antoine Pitrou 6be8876623 Merged revisions 80720 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80720 | antoine.pitrou | 2010-05-03 18:25:33 +0200 (lun., 03 mai 2010) | 5 lines

  Issue #7865: The close() method of :mod:`io` objects should not swallow
  exceptions raised by the implicit flush().  Also ensure that calling
  close() several times is supported.  Patch by Pascal Chambon.
........
2010-05-03 16:48:20 +00:00
Victor Stinner f58087ba29 Issue #8533: revert r80694; try a different fix: regrtest uses backslashreplace
error handler for stdout to avoid UnicodeEncodeError (write non-ASCII character
to stdout using ASCII encoding)
2010-05-02 17:24:51 +00:00
Victor Stinner 0d80a5874a Issue #8533: Write tracebacks and failed tests to sys.stderr instead of
sys.stdout to avoid UnicodeEncodeError (use backslashreplace error handler)
2010-05-02 09:37:08 +00:00
Antoine Pitrou 70d8a86ea0 Merged revisions 80690 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80690 | antoine.pitrou | 2010-05-01 22:26:58 +0200 (sam., 01 mai 2010) | 3 lines

  Remove duplicate test
........
2010-05-01 20:29:38 +00:00
Senthil Kumaran f6c456d323 Merged revisions 80675 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80675 | senthil.kumaran | 2010-05-01 13:31:56 +0530 (Sat, 01 May 2010) | 3 lines

  Fix issue8582: urllib.urlretrieve fails with ValueError: Invalid format string
........
2010-05-01 08:29:18 +00:00
Antoine Pitrou 043bad00bc Merged revisions 80669 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80669 | antoine.pitrou | 2010-05-01 01:08:48 +0200 (sam., 01 mai 2010) | 4 lines

  Issue #8576: Remove use of find_unused_port() in test_smtplib and
  test_multiprocessing.  Patch by Paul Moore.
........
2010-04-30 23:20:15 +00:00
Barry Warsaw c8a99de751 Bug 8563 - compileall.compile_file() creates empty __pycache__ directories in
data directories where there is no source.

Fix by: Arfrever Frehtes Taifersar Arahesis (Arfrever)
Test by: Barry
2010-04-29 18:43:10 +00:00
Lars Gustäbel d6eb70b7b4 Merged revisions 80616 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80616 | lars.gustaebel | 2010-04-29 17:23:38 +0200 (Thu, 29 Apr 2010) | 4 lines

  Issue #8464: tarfile.open(name, mode="w|") no longer creates
  files with execute permissions set.
........
2010-04-29 15:37:02 +00:00
Tarek Ziadé ffa155ad83 make sure shutil checks for bz2 availability before it uses it. 2010-04-29 13:34:35 +00:00
Antoine Pitrou 764b8780db Fix test failure with -bb 2010-04-28 22:57:15 +00:00
Victor Stinner 45df820591 Merged revisions 80552-80556,80564-80566,80568-80571 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80552 | victor.stinner | 2010-04-27 23:46:03 +0200 (mar., 27 avril 2010) | 3 lines

  Issue #7449, part 1: fix test_support.py for Python compiled without thread
........
  r80553 | victor.stinner | 2010-04-27 23:47:01 +0200 (mar., 27 avril 2010) | 1 line

  Issue #7449, part 2: regrtest.py -j option requires thread support
........
  r80554 | victor.stinner | 2010-04-27 23:51:26 +0200 (mar., 27 avril 2010) | 9 lines

  Issue #7449 part 3, test_doctest: import trace module in test_coverage()

  Import trace module fail if the threading module is missing. test_coverage() is
  only used if test_doctest.py is used with the -c option. This commit allows to
  execute the test suite without thread support.

  Move "import trace" in test_coverage() and use
  test_support.import_module('trace').
........
  r80555 | victor.stinner | 2010-04-27 23:56:26 +0200 (mar., 27 avril 2010) | 6 lines

  Issue #7449, part 4: skip test_multiprocessing if thread support is disabled

  import threading after _multiprocessing to raise a more revelant error message:
  "No module named _multiprocessing". _multiprocessing is not compiled without
  thread support.
........
  r80556 | victor.stinner | 2010-04-28 00:01:24 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 5: split Test.test_open() of ctypes/test/test_errno.py

   * Split Test.test_open() in 2 functions: test_open() and test_thread_open()
   * Skip test_open() and test_thread_open() if we are unable to find the C
     library
   * Skip test_thread_open() if thread support is disabled
   * Use unittest.skipUnless(os.name == "nt", ...) on test_GetLastError()
........
  r80564 | victor.stinner | 2010-04-28 00:59:35 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 6: fix test_hashlib for missing threading module

  Move @test_support.reap_thread decorator from test_main() to test_threaded_hashing().
........
  r80565 | victor.stinner | 2010-04-28 01:01:29 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 7: simplify threading detection in test_capi

   * Skip TestPendingCalls if threading module is missing
   * Test if threading module is present or not, instead of test the presence of
     _testcapi._test_thread_state
........
  r80566 | victor.stinner | 2010-04-28 01:03:16 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #7449, part 8: don't skip the whole test_asynchat if threading is missing

  TestFifo can be executed without the threading module
........
  r80568 | victor.stinner | 2010-04-28 01:14:58 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, part 9: fix test_xmlrpclib for missing threading module

   * Skip testcases using threads if threading module is missing
   * Use "http://" instead of URL in ServerProxyTestCase if threading is missing
     because URL is not set in this case
........
  r80569 | victor.stinner | 2010-04-28 01:33:58 +0200 (mer., 28 avril 2010) | 6 lines

  Partial revert of r80556 (Issue #7449, part 5, fix ctypes test)

  Rewrite r80556: the thread test have to be executed just after the test on
  libc_open() and so the test cannot be splitted in two functions (without
  duplicating code, and I don't want to duplicate code).
........
  r80570 | victor.stinner | 2010-04-28 01:51:16 +0200 (mer., 28 avril 2010) | 8 lines

  Issue #7449, part 10: test_cmd imports trace module using test_support.import_module()

  Use test_support.import_module() instead of import to raise a SkipTest
  exception if the import fail. Import trace fails if the threading module is
  missing.

  See also part 3: test_doctest: import trace module in test_coverage().
........
  r80571 | victor.stinner | 2010-04-28 01:55:59 +0200 (mer., 28 avril 2010) | 6 lines

  Issue #7449, last part (11): fix many tests if thread support is disabled

   * Use try/except ImportError or test_support.import_module() to import thread
     and threading modules
   * Add @unittest.skipUnless(threading, ...) to testcases using threads
........
2010-04-28 22:31:17 +00:00
Antoine Pitrou 480a124973 Merged revisions 80596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80596 | antoine.pitrou | 2010-04-28 23:11:01 +0200 (mer., 28 avril 2010) | 3 lines

  Fix style issues in test_ssl
........
2010-04-28 21:37:09 +00:00
Tarek Ziadé 6ac91723bd #8295 : Added shutil.unpack_archive and related APIs 2010-04-28 17:51:36 +00:00
Senthil Kumaran 71fb6c88a8 Merged revisions 80583 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80583 | senthil.kumaran | 2010-04-28 22:50:43 +0530 (Wed, 28 Apr 2010) | 3 lines

  Fixed Issue6312 - httplib fails with HEAD requests to pages with "transfer-encoding: chunked"
........
2010-04-28 17:39:48 +00:00
Antoine Pitrou 9bfbe61961 Merged revisions 80557 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

(the bug was already fixed in py3k, just merging in the tests)

........
  r80557 | antoine.pitrou | 2010-04-28 00:03:37 +0200 (mer., 28 avril 2010) | 4 lines

  Issue #8086: In :func:`ssl.DER_cert_to_PEM_cert()`, fix missing newline
  before the certificate footer.  Patch by Kyle VanderBeek.
........
2010-04-27 22:08:08 +00:00
Antoine Pitrou 05830aa4ff Merged revisions 80534 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80534 | antoine.pitrou | 2010-04-27 15:13:26 +0200 (mar., 27 avril 2010) | 3 lines

  socket.error can really happen here, and fix a possible NameError
........
2010-04-27 13:15:18 +00:00
Antoine Pitrou 18c913e2b1 Merged revisions 80529 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80529 | antoine.pitrou | 2010-04-27 12:32:58 +0200 (mar., 27 avril 2010) | 4 lines

  Qualify or remove or bare excepts.  Simplify exception handling in places.
  Remove uses of test_support.TestFailed.
........
2010-04-27 10:59:39 +00:00
Antoine Pitrou af7c6026c7 Merged revisions 80526 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80526 | antoine.pitrou | 2010-04-27 11:51:18 +0200 (mar., 27 avril 2010) | 5 lines

  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:56:02 +00:00
Antoine Pitrou 773b5db01a Merged revisions 80522 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80522 | antoine.pitrou | 2010-04-27 10:40:51 +0200 (mar., 27 avril 2010) | 3 lines

  Remove uses of find_unused_port() in test_ssl, and small cleanups
........
2010-04-27 08:53:36 +00:00
R. David Murray ad78d15acc Merged revisions 80512 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80512 | r.david.murray | 2010-04-26 17:17:14 -0400 (Mon, 26 Apr 2010) | 7 lines

  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-27 02:45:53 +00:00
R. David Murray 0ba81e004a Merged revisions 80503 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80503 | r.david.murray | 2010-04-26 12:54:57 -0400 (Mon, 26 Apr 2010) | 2 lines

  Issue 8325: Improve regrtest --help text.
........
2010-04-26 17:02:32 +00:00
Barry Warsaw c04317fdc4 Bug 8527 - multiple compileall calls produce cascading __pycache__ directories.
* Patch contributed by Arfrever Frehtes Taifersar Arahesis.
* Test added by Barry

Also, improve Makefile's deletion of __pycache__ directories so e.g. 'make
distclean' doesn't fail if no __pycache__ directories exist.
2010-04-26 15:59:03 +00:00
Antoine Pitrou 08911bd33e Merged revisions 80480 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80480 | antoine.pitrou | 2010-04-25 23:15:50 +0200 (dim., 25 avril 2010) | 3 lines

  Replace a Lock with a better suited Event.
........
2010-04-25 22:19:43 +00:00