Commit Graph

16186 Commits

Author SHA1 Message Date
Ronald Oussoren 5719c2f97e Merged revisions 83133 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83133 | ronald.oussoren | 2010-07-24 15:15:19 +0100 (Sat, 24 Jul 2010) | 5 lines

  Fix for issue 9367: the test code for os.getgroups
  assumes that the result of getgroups and the output
  of the id(1) command return groups in the same
  order.  That assumption is both fragile and false.
........
2010-07-24 14:21:29 +00:00
Ronald Oussoren 9e7ffae537 Merged revisions 83088 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83088 | ronald.oussoren | 2010-07-23 14:53:51 +0100 (Fri, 23 Jul 2010) | 8 lines

  This fixes issue7900 by adding code that deals
  with the fact that getgroups(2) might return
  more that MAX_GROUPS on OSX.

  See the issue (and python-dev archives) for the
  gory details. Summarized: OSX behaves rather oddly
  and Apple says this is intentional.
........
2010-07-24 09:46:41 +00:00
Victor Stinner 8b0d84e3d5 Backport of 83120 (#9032)
XML-RPC client: Transport.request() retries on EPIPE error

The EPIPE error occurs when the server closes the socket and the client sends a
"big" XML-RPC request (I don't know exactly the size threshold).

request() just have to ignore the error because single_request() closes the
socket on error, and so the next call to single_request() will open a new
socket.

Remove also a comment in the HTTP client because it's now wrong: see r70643 and
issue #5542.
2010-07-24 02:51:49 +00:00
Victor Stinner 2c6aee9096 Forward port r70643 (#5542) + part of r83120 (just remove the comment)
Remove special logic that closes HTTPConnection socket on EPIPE.

If the socket is closed, the client has no chance to read the response
from the server.  EPIPE means that it isn't possible to write more
data from the socket, but not that it is impossible to read.
2010-07-24 02:46:16 +00:00
Victor Stinner 4c16d122c4 Merged revisions 83116 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83116 | victor.stinner | 2010-07-24 02:49:20 +0200 (sam., 24 juil. 2010) | 4 lines

  Issue #4629: getopt raises an error if an argument ends with = whereas getopt
  doesn't except a value (eg. --help= is rejected if getopt uses ['help='] long
  options).
........
2010-07-24 01:07:52 +00:00
Ezio Melotti c569cfebce Merged revisions 83103 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83103 | ezio.melotti | 2010-07-23 19:48:22 +0300 (Fri, 23 Jul 2010) | 1 line

  #9359: fix typo. Thanks to Piotr Kasprzyk for the patch.
........
2010-07-23 16:55:21 +00:00
Ronald Oussoren 3a04a25206 Merged revisions 83075 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83075 | ronald.oussoren | 2010-07-23 12:54:59 +0100 (Fri, 23 Jul 2010) | 5 lines

  Fix for issue 7895. Avoid crashing the interpreter
  when calling platform.mac_ver after calling os.fork by
  reading from a system configuration file instead of
  using OSX APIs.
........
2010-07-23 12:41:00 +00:00
Ronald Oussoren 21b44e0ea2 Merged revisions 83067 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83067 | ronald.oussoren | 2010-07-23 10:50:05 +0100 (Fri, 23 Jul 2010) | 8 lines

  Workaround for issue 4047: in some configurations of
  the Crash Reporter on OSX test_subprocess will trigger
  the reporter.

  This patch prints a warning when the Crash Reporter will
  get triggered intentionally, which should avoid confusing
  people.
........
2010-07-23 12:26:30 +00:00
Senthil Kumaran 880685f698 Reverting the checkin made in revision 82940, as it was adding new parameters to quote function in a bugfix release.
Discussed in issue1712522
2010-07-22 01:47:30 +00:00
Antoine Pitrou 7a7013e830 Merged revisions 83030 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83030 | antoine.pitrou | 2010-07-21 18:41:31 +0200 (mer., 21 juil. 2010) | 5 lines

  Issue #5395: check that array.fromfile() re-raises an IOError instead of replacing it
  with EOFError.
  (this is only an added test, but 2.x will get a fix too)
........
2010-07-21 16:47:28 +00:00
Doug Hellmann f31db93fc1 Apply patch from Ray Allen for issue 9296 2010-07-21 12:36:33 +00:00
Stefan Krah 0b9201fa1c Sub-issue of #9036: Fix incorrect use of Py_CHARMASK. 2010-07-19 18:06:46 +00:00
Senthil Kumaran c7743aaac3 Fix Issue9301 - urllib.quote(None) to raise TypeError 2010-07-19 17:35:50 +00:00
Stefan Krah e9a6a7dd4c Issue #9265: Incorrect name passed as arg[0] when shell=True
and executable specified.
2010-07-19 14:41:08 +00:00
Senthil Kumaran 5dba6dfe6a Fixing Issue1712522 - urllib.quote to support Unicode. The default
encoding='utf-8' and errors='strict'.
2010-07-18 02:27:10 +00:00
R. David Murray 05b7631c17 Merged revisions 82922 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82922 | r.david.murray | 2010-07-16 21:19:57 -0400 (Fri, 16 Jul 2010) | 4 lines

  #1555570: correctly handle a \r\n that is split by the read buffer.

  Patch and test by Tony Nelson.
........
2010-07-17 01:35:16 +00:00
Alexander Belopolsky 84305c5153 Merged revisions 82915 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82915 | alexander.belopolsky | 2010-07-16 10:39:45 -0400 (Fri, 16 Jul 2010) | 1 line

  Corrected TUPLE<N> opcodes' docs.
........
2010-07-16 14:53:52 +00:00
Senthil Kumaran 0fdd385e2c Merged revisions 82895 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82895 | senthil.kumaran | 2010-07-15 01:40:52 +0530 (Thu, 15 Jul 2010) | 3 lines

  Fix a mistake, https proxy shoud be https://
........
2010-07-14 20:22:17 +00:00
Senthil Kumaran 836a2bba2f Merged revisions 82890 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82890 | senthil.kumaran | 2010-07-15 00:45:23 +0530 (Thu, 15 Jul 2010) | 3 lines

  Fix: Issue6853 - Get HTTPS system proxy in Windows.
........
2010-07-14 19:25:26 +00:00
Senthil Kumaran 9a5bc1d001 Merged revisions 82881 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82881 | senthil.kumaran | 2010-07-14 15:51:22 +0530 (Wed, 14 Jul 2010) | 3 lines

  Fix Issue5842 - Moving the tests out of urllib.parse module
........
2010-07-14 10:39:35 +00:00
Alexander Belopolsky eeb666ccf3 Merged revisions 82850 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82850 | alexander.belopolsky | 2010-07-13 10:50:16 -0400 (Tue, 13 Jul 2010) | 1 line

  Set sys.modules[name] to None instead of 0 to block module import.
........
2010-07-14 00:05:00 +00:00
Stefan Krah 182ae64235 Issue #9185: On Solaris and OpenBSD, posix_getcwd() could loop indefinitely
if the path length exceeded PATH_MAX.
2010-07-13 19:17:08 +00:00
Ezio Melotti c425f8fcb4 Merged revisions 82839 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82839 | ezio.melotti | 2010-07-12 22:49:41 +0300 (Mon, 12 Jul 2010) | 1 line

  #6026: skip test_get_file_list when zlib is not available.
........
2010-07-12 19:52:15 +00:00
Mark Dickinson 42add99f77 Merged revisions 82821 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82821 | mark.dickinson | 2010-07-11 19:53:06 +0100 (Sun, 11 Jul 2010) | 3 lines

  Issue #9137: Fix issue in MutableMapping.update, which incorrectly
  treated keyword arguments called 'self' or 'other' specially.
........
2010-07-11 19:17:28 +00:00
Ronald Oussoren 7595620105 Fix for issue #9164: with this patch sysconfig and distuls don't break
when duplicate '-arch foo' flags end up in CFLAGS (which may happen when
building a universal build using macports)
2010-07-11 08:52:52 +00:00
Senthil Kumaran 87ed31a414 Merged revisions 82780 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82780 | senthil.kumaran | 2010-07-11 08:42:43 +0530 (Sun, 11 Jul 2010) | 3 lines

  Stricter verification for file based url scheme and reliance on ftp protocol.
........
2010-07-11 03:18:51 +00:00
Benjamin Peterson 9d8c456696 Merged revisions 82777 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82777 | benjamin.peterson | 2010-07-10 10:14:45 -0500 (Sat, 10 Jul 2010) | 1 line

  ValueError is eventually what we want to move to, I suppose
........
2010-07-10 15:17:08 +00:00
R. David Murray 2ab02f0e16 Merged revisions 82766 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

Since 'purge' is an API change, modified it to be _purge for 2.x
and deleted the doc update.

........
  r82766 | r.david.murray | 2010-07-10 09:52:13 -0400 (Sat, 10 Jul 2010) | 5 lines

  Fix 'refleak' introduced by fnmatch cache purge tests.

  This introduces a 'purge' function for the fnmatch module analogous
  to the 'purge' function in the re module.
........
2010-07-10 14:06:51 +00:00
Michael Foord 94f071c715 Fix error message for comparing single line strings in unittest.TestCase.assertEqual.
Issue 9174
2010-07-10 13:51:42 +00:00
Benjamin Peterson 8e93f4e791 this makes checking for warnings less error prone 2010-07-09 18:15:28 +00:00
Benjamin Peterson 0b00b6b987 Merged revisions 82739,82741 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82739 | benjamin.peterson | 2010-07-09 08:28:42 -0500 (Fri, 09 Jul 2010) | 1 line

  allow more exceptions
........
  r82741 | benjamin.peterson | 2010-07-09 08:31:11 -0500 (Fri, 09 Jul 2010) | 1 line

  wrap
........
2010-07-09 13:33:03 +00:00
Benjamin Peterson 306d88fc76 Merged revisions 82735 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82735 | benjamin.peterson | 2010-07-09 08:20:40 -0500 (Fri, 09 Jul 2010) | 1 line

  OverflowError is fine
........
2010-07-09 13:21:35 +00:00
R. David Murray abd4553fd4 Merged revisions 82730 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

'merge' in the sense that this is the same fix by the same author.

........
  r82730 | r.david.murray | 2010-07-09 08:23:21 -0400 (Fri, 09 Jul 2010) | 4 lines

  7846: limit fnmatch pattern cache to _MAXCACHE=100 entries.

  Patch by Andrew Clegg.
........
2010-07-09 13:16:00 +00:00
Mark Dickinson 9b9e12530d Merged revisions 82654 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82654 | mark.dickinson | 2010-07-08 22:15:36 +0100 (Thu, 08 Jul 2010) | 3 lines

  Issue #9136: Profiling Decimal gave 'dictionary changed size during iteration'.
  Remove the use of locals() that caused this error.
........
2010-07-08 21:22:54 +00:00
Mark Dickinson e85aa739ab Merged revisions 82646,82649-82650 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82646 | mark.dickinson | 2010-07-08 18:23:40 +0100 (Thu, 08 Jul 2010) | 1 line

  In test_decimal, convert heuristic for skipping tests into an explicit skiplist.
........
  r82649 | mark.dickinson | 2010-07-08 20:03:34 +0100 (Thu, 08 Jul 2010) | 1 line

  Fix a performance issue in Decimal.pow.  Thanks Stefan Krah for finding this.
........
  r82650 | mark.dickinson | 2010-07-08 20:09:16 +0100 (Thu, 08 Jul 2010) | 1 line

  Fix misplaced exactness check that was causing unnecessary work in Decimal.__pow__.
........
2010-07-08 19:24:40 +00:00
Antoine Pitrou 22db73523c Merged revisions 82647 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82647 | antoine.pitrou | 2010-07-08 20:51:30 +0200 (jeu., 08 juil. 2010) | 3 lines

  Issue #8605: Skip test_gdb if Python is compiled with optimizations.
........
2010-07-08 18:54:04 +00:00
Benjamin Peterson 86ac22e338 Merged revisions 82637 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82637 | benjamin.peterson | 2010-07-07 17:45:06 -0500 (Wed, 07 Jul 2010) | 1 line

  ValueError in this case is also acceptable
........
2010-07-07 23:26:57 +00:00
Benjamin Peterson 489113fd5f Merged revisions 82628,82630 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r82628 | benjamin.peterson | 2010-07-07 13:44:05 -0500 (Wed, 07 Jul 2010) | 1 line

  this needn't be in the loop
........
  r82630 | benjamin.peterson | 2010-07-07 13:54:59 -0500 (Wed, 07 Jul 2010) | 1 line

  don't ignore exceptions from PyObject_IsTrue
........
2010-07-07 19:03:36 +00:00
Benjamin Peterson ba303c82d1 these tests are the result of cpython's incorrect implementation 2010-07-07 15:51:17 +00:00
Benjamin Peterson bace6764fa be more generous to implementations that have implemented correctly 2010-07-05 17:13:21 +00:00
R. David Murray 3caf7b9c88 #9161: Fix regression in acceptance of unicode strings in add_option calls.
The original change in 2.6 was made during rc1 changeover, and did not
get ported to 2.7.  The original change may not even have been
intentional, but if so it doesn't seem to have caused any problems.
2010-07-05 16:06:05 +00:00
Benjamin Peterson 9d7003e353 Merged revisions 82542 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r82542 | benjamin.peterson | 2010-07-04 11:44:15 -0500 (Sun, 04 Jul 2010) | 17 lines

  Merged revisions 81478,82530-82531 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r81478 | benjamin.peterson | 2010-05-22 13:47:39 -0500 (Sat, 22 May 2010) | 1 line

    ensure doctests have some future_features
  ........
    r82530 | benjamin.peterson | 2010-07-04 11:11:41 -0500 (Sun, 04 Jul 2010) | 1 line

    simplify ignore star imports from itertools #8892
  ........
    r82531 | benjamin.peterson | 2010-07-04 11:13:20 -0500 (Sun, 04 Jul 2010) | 1 line

    wrap with parenthesis not \
  ........
................
2010-07-04 16:53:16 +00:00
Mark Dickinson 75b44b3437 Issue #9130: Fix validation of relative imports in parser module. 2010-07-04 16:47:56 +00:00
Mark Dickinson a7ee59b3d3 Issue #9128: Validate class decorator syntax correctly in parser module. 2010-07-04 16:23:54 +00:00
Florent Xicluna 96c4df4532 Issue #9145: Fix a regression due to r79539 2010-07-04 14:24:40 +00:00
Benjamin Peterson e3c104554b prepare for 2.7.1 2010-07-03 14:51:25 +00:00
Benjamin Peterson c60082d283 update to 2.7 final 2010-07-03 13:56:13 +00:00
Benjamin Peterson 6728d14b28 update pydoc-topics 2010-07-03 13:53:45 +00:00
Benjamin Peterson 743242af90 add release date 2010-07-03 13:49:03 +00:00
Victor Stinner 15e5b1bf0b Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module,
ensure that the input string length is a multiple of the frame size
2010-07-03 13:36:19 +00:00
Jesse Noller 2f8c8f47c7 Submit patch for bug 9144; broken imports due to r81380 2010-07-03 12:26:02 +00:00
Benjamin Peterson 0df5a858e7 don't require the presence of __getformat__ or __setformat__; use requires_IEEE_754 globally 2010-07-02 23:05:27 +00:00
Benjamin Peterson c262a69f54 an AttributeError is perfectly acceptable here 2010-06-30 18:41:08 +00:00
Giampaolo Rodolà e00e2f0082 fix issue #6589: cleanup asyncore.socket_map if smtpd.SMTPServer constructor raises an exception 2010-06-30 17:38:28 +00:00
Benjamin Peterson 10947a6416 mark test depending on ref counting 2010-06-30 17:11:08 +00:00
Mark Dickinson 070f0abc19 Issue #9125: Update parser module for "except ... as ..." syntax. 2010-06-30 16:27:57 +00:00
Mark Dickinson 858624944c Spelling. 2010-06-29 07:37:25 +00:00
Benjamin Peterson d6a8e6d234 fix skipping condition 2010-06-28 15:41:06 +00:00
Benjamin Peterson 8eeb1dcbbc testcapi tests are definitely cpython only 2010-06-28 15:36:40 +00:00
Senthil Kumaran 5871a8d744 Fix Issue8653 - Docstring for urlunsplit function. 2010-06-28 13:56:46 +00:00
Benjamin Peterson a70e91c284 mark tracking tests as implementation details 2010-06-27 22:40:26 +00:00
Ronald Oussoren b96fbb8d00 Fix for Issue8883: without this patch test_urllib will fail
when there is a bare IP address in the "Bypass proxy settings
for these Hosts & Domains" list on MacOSX.
2010-06-27 13:59:39 +00:00
Ronald Oussoren 76002c8f1d The uuid library on OSX 10.5 seems to contain the same bug as the one
on OSX 10.6, therefore don't use it there either.

This fixes issue8621.
2010-06-27 12:43:47 +00:00
Ronald Oussoren cd17213e8e Two small fixes for the support for SDKs on MacOSX:
1) The code that checks if an path should be located in the SDK
   explicitly excludes /usr/local. This fixes issue9046

2) The SDK variant for filtering "db_dirs_to_check" in setup.py
   was not doing anything because of a missing assignment.
2010-06-27 12:36:16 +00:00
Georg Brandl ad72bcc864 Untabify. 2010-06-27 11:24:15 +00:00
R. David Murray 62a14db9f4 #9085: email versions have gotten out of sync, 2.7 is actually 4.0.3.
In 2.5 the email version was bumped to 4.0.2 just before release but
after the maintenance branch was set up.  The bump was not backported
to trunk, and 2.6 went out the door with a version number of 4.0.1.
I bumped this to 4.0.2 because of a behavior change, but that makes
it look the same as 2.5.  So bump it again to 4.0.3.
2010-06-26 18:39:50 +00:00
R. David Murray 04a3439ba6 Fix indentation in recently added test. 2010-06-26 03:27:32 +00:00
R. David Murray 32e0681156 #4640: add a test to optparse that proves issue is invalid. 2010-06-26 00:06:44 +00:00
Benjamin Peterson cf3e20c8e8 mark implementation detail as such 2010-06-25 22:58:47 +00:00
Benjamin Peterson 0badae4748 this must be a typo 2010-06-25 21:19:04 +00:00
Benjamin Peterson 4b26acbf03 mark implementation detail as such 2010-06-25 20:34:01 +00:00
Benjamin Peterson 947ce58a90 prevent assignment to set literals 2010-06-24 00:12:40 +00:00
Benjamin Peterson f6d31cb8b5 cpython only gc tests 2010-06-23 20:29:26 +00:00
Benjamin Peterson 7f8ede4db9 mark ref counting as impl detail 2010-06-22 20:32:02 +00:00
Benjamin Peterson 694781b1d3 must force gc here 2010-06-22 20:26:20 +00:00
Benjamin Peterson bde67df0cd keep UserDict an old-style class
Be generous in abc.py to allow this.
2010-06-22 18:09:02 +00:00
Ronald Oussoren 934f4e1f39 Fix for issue8446:
* Don't import 'ic' in webbrowser, that module is no longer used
* Remove 'MacOS' from the list of modules that should emit a Py3kWarning on import.
  This is needed because one of the earlier tests triggers and import of this
  extension, and that causes a failure in test_py3kwarn (running test_py3kwarn
  separately worked fine)

With these changes 'make tests' no longer says that test_py3kwarn fails.
2010-06-22 09:18:28 +00:00
Benjamin Peterson bfcedf4cb7 bump verson to 2.7rc2 2010-06-21 15:57:57 +00:00
Benjamin Peterson bb937092f7 update pydoc-topics 2010-06-21 15:56:45 +00:00
Benjamin Peterson afa1b30969 fix finding visual studio 2008 on 64 bit #8854 2010-06-21 15:27:46 +00:00
Thomas Heller a45e6d5791 Add tests for problems reported in issue 8959. 2010-06-21 15:01:18 +00:00
Thomas Heller f180099ec6 Fix #8959 by reverting revision 80761. 2010-06-21 14:00:24 +00:00
Mark Dickinson 801923681c Merge test_strtod and test_float string-to-float conversion tests. 2010-06-20 18:50:19 +00:00
Jean-Paul Calderone b33f0c1ccd Revert r60115
This revision introduced quoting for strings containing | based
on a misunderstanding of the commonly used quoting rules used
on Windows.

| is interpreted by cmd.exe, not by the MS C runtime argv initializer.
It only needs to be quoted if it is part of an argument passed through
cmd.exe.

See issue1300, issue7839, and issue8972.
2010-06-18 20:00:17 +00:00
Florent Xicluna a37b7af4d7 Add few words about test.test_genericpath.CommonTest 2010-06-17 20:30:56 +00:00
R. David Murray df1cf301c2 #8720: fix inspect regression by teaching getsourcefile about linecache.
The fix for issue 4050 caused a regression:  before that fix, source
lines in the linecache would eventually be found by inspect.  After the
fix inspect reports an error earlier, and the source isn't found.
The fix for the fix is to have getsourcefile look in the linecache for
the file and return the psuedo-filename if the source is there, just as
it already returns it if there is a PEP 302 loader.
2010-06-17 01:36:52 +00:00
Mark Dickinson e979ec8fbf Issue #8986: erfc was raising OverflowError on Linux for arguments in
the (approximate) range (-27.3, 30.0), as a result of an escaped errno
value.
2010-06-13 10:50:29 +00:00
Vinay Sajip 936efc791a Issue #8924: logging: Improved error handling for Unicode in exception text. 2010-06-11 22:56:50 +00:00
Antoine Pitrou cca3a3f396 Issue #8941: decoding big endian UTF-32 data in UCS-2 builds could crash
the interpreter with characters outside the Basic Multilingual Plane
(higher than 0x10000).
2010-06-11 21:42:26 +00:00
Mark Dickinson 40228912c8 Fix possible undefined behaviour from signed overflow in struct module.
Backport of revisions 81897, 81898 and 81902 from py3k.
2010-06-11 20:27:05 +00:00
Michael Foord 33958b87f2 Fix issue with nested test suites debug method and module setups. (unittest) 2010-06-10 20:40:21 +00:00
Michael Foord ae1bb9a00c Typo correction. 2010-06-09 12:29:56 +00:00
Michael Foord 0fedb28951 Issue 8948. cleanup functions are not run by unittest.TestCase.debug(), plus class and module teardowns are not run by unittest.TestSuite.debug(). 2010-06-08 22:44:52 +00:00
Benjamin Peterson eabdeba25e use unicode literals 2010-06-07 22:33:09 +00:00
Benjamin Peterson 13e934acc0 correctly overflow when indexes are too large 2010-06-07 22:23:23 +00:00
Ezio Melotti 0b41707dde Silence deprecation warning in test___all__ caused by an import bsddb. 2010-06-07 22:00:18 +00:00
Benjamin Peterson 0229e8495f update pydoc-topics 2010-06-06 00:49:27 +00:00
Benjamin Peterson 77d534e59d bump version to 2.7 rc1 2010-06-06 00:22:09 +00:00
Michael Foord c532c57d44 Code formatting change. 2010-06-05 23:58:40 +00:00
Ezio Melotti 62c3c79426 Replace deprecated fail* methods with the equivalent assert* ones. 2010-06-05 22:28:10 +00:00
Michael Foord db919f0188 Tests for issue 8302, skipped test in a setUpClass or a setUpModule are reported as skips rather than errors. 2010-06-05 20:59:00 +00:00
Michael Foord c1d7c5b7fa Tests for unittest.TestCase.maxDiff. 2010-06-05 20:33:43 +00:00
Michael Foord 20e287caed Issue 8302. SkipTest exception is setUpClass or setUpModule is now reported as a skip rather than an error. 2010-06-05 19:38:42 +00:00
Ezio Melotti ab2eb0ee84 Add a NEWS entry for r81758 and clarify a comment. 2010-06-05 19:21:32 +00:00
Ezio Melotti e57e50c8e7 Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.
1) #8271: when a byte sequence is invalid, only the start byte and all the
   valid continuation bytes are now replaced by U+FFFD, instead of replacing
   the number of bytes specified by the start byte.
   See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95);
2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes
   in behavior);
3) Add code and tests to reject surrogates (U+D800-U+DFFF) as defined in
   RFC 3629, but leave it commented out since it's not backward compatible;
4) Change the error messages "unexpected code byte" to "invalid start byte"
   and "invalid data" to "invalid continuation byte";
5) Add an extensive set of tests in test_unicode;
6) Fix test_codeccallbacks because it was failing after this change.
2010-06-05 17:51:07 +00:00
Michael Foord f2c25c5cb0 Fix unittest tests after previous commit. 2010-06-05 13:48:27 +00:00
Michael Foord 5fe21ff91a unittest.TestCase assertion methods inform you when they have omitted an over long diff on failure. Issue 8351. 2010-06-05 13:38:16 +00:00
Mark Dickinson ec27d91741 Fix test_py3kwarn not to test for __cmp__-related DeprecationWarning. 2010-06-05 13:18:33 +00:00
Michael Foord 674648e3f2 unittest.TestCase.assertDictEqual and assertMultilineEqual provide better default failure messages in the event of long diffs. 2010-06-05 12:58:39 +00:00
Michael Foord e37d75fce2 Removed the new max_diff argument to assertSequenceEqual. All unittest.TestCase assert methods that use difflib to produce failure messages now truncate overly long messages. New class attribute unittest.TestCase.maxDiff to configure this if necessary. Issue 8351. 2010-06-05 12:10:52 +00:00
Mark Dickinson 23f0d6b57b Issue #8627: remove out-of-date warning about overriding __cmp__ 2010-06-05 11:52:24 +00:00
Michael Foord a441287f79 Extract error message truncating into a method (unittest.TestCase._truncateMessage). 2010-06-05 11:46:59 +00:00
Michael Foord 0100702b9a Issue 8351. Suppress large diffs in unittest.TestCase.assertSequenceEqual. 2010-06-05 11:23:51 +00:00
Michael Foord 9ef5d33084 unittest TestLoader test discovery filename matching done in a method. This makes it easier to override the matching strategy in subclasses. No behaviour change in actual implementation. 2010-06-05 10:39:42 +00:00
Benjamin Peterson 2aa6c38237 properly lookup the __format__ special method 2010-06-05 00:32:50 +00:00
R. David Murray e7e505ba6e #4487: have Charset check with codecs for possible aliases.
Previously, unexpected results occurred when email was passed, for example,
'utf8' as a charset name, since email would accept it but would *not* use
the 'utf-8' codec for it, even though Python itself recognises that as
an alias for utf-8.  Now Charset checks with codecs for aliases as well
as its own internal table.  Issue 8898 has been opened to change this
further in py3k so that all aliasing is routed through the codecs module.
2010-06-04 19:51:06 +00:00
Martin v. Löwis eba67c0eac Issue #6470: Drop UNC prefix in FixTk.py
Patch by Christop Gohlke and Amaury Forgeot d'Arc.
2010-06-04 19:39:07 +00:00
Senthil Kumaran fb6950140a test verifying the resp object is closed for HEAD response. 2010-06-04 17:17:09 +00:00
Senthil Kumaran dfaced5d3d Fix issue6312 - close the resp object for HEAD response. 2010-06-04 16:32:14 +00:00
Benjamin Peterson 3b95934e05 use a set for membership testing 2010-06-03 21:21:03 +00:00
R. David Murray 4653fb556c #8889: rewrite transient_internet so we don't use EAI_NODATA on FreeBSD.
FreeBSD doesn't have socket.EAI_NODATA.  I rewrote the routine because
there's no easy way to conditionally include a context manager in a
with statement.  As a side benefit, instead of a stack of context
managers there's now only one.
2010-06-03 20:19:25 +00:00
R. David Murray 61746d580e #5610: use \Z not $ so we don't eat extra chars when body part ends with \r\n.
If a body part ended with \r\n, feedparser, using '$' to terminate its
search for the newline, would match on the \r\n, and think that it needed
to strip two characters in order to account for the line end before the
boundary.  That made it chop one too many characters off the end of
the body part.  Using \Z makes the match correct.

Patch and test by Tony Nelson.
2010-06-03 15:43:20 +00:00
Stefan Krah 449aa86bd6 Issue #7384: If the system readline library is linked against ncurses,
the curses module must be linked against ncurses as well. Otherwise it
is not safe to load both the readline and curses modules in an application.

Thanks Thomas Dickey for answering questions about ncurses/ncursesw
and readline!
2010-06-03 12:39:50 +00:00
Lars Gustäbel 4da7d410b3 Issue #8741: Fixed the TarFile.makelink() method that is responsible
for extracting symbolic and hard link entries as regular files as a
work-around on platforms that do not support filesystem links.

This stopped working reliably after a change in r74571. I also added
a few tests for this functionality.
2010-06-03 12:34:14 +00:00
Lars Gustäbel 2ee9c6fa50 Issue #8833: tarfile created hard link entries with a size
field != 0 by mistake. The associated testcase did not
expose this bug because it was broken too.
2010-06-03 09:56:22 +00:00
Ronald Oussoren 593e4ca7a5 Fix for issue #7724: ensure that distutils and python's own setup.py
honor the MacOSX SDK when one is specified.

This is needed to be able to build using the 10.4u SDK while running
on OSX 10.6.

This is a fixed version of the patch in r80963, I've tested this patch
on OSX and Linux.
2010-06-03 09:47:21 +00:00
R. David Murray 52dcd45906 #1368247: make set_charset/MIMEText automatically encode unicode _payload.
Fixes (mysterious, to the end user) UnicodeErrors when using utf-8 as
the charset and unicode as the _text argument.  Also makes the way in
which unicode gets encoded to quoted printable for other charsets more
sane (it only worked by accident previously).  The _payload now is encoded
to the charset.output_charset if it is unicode.
2010-06-02 22:03:15 +00:00
Vinay Sajip 3b4849a21d Logging: improved error reporting for BaseConfigurator.resolve(). 2010-06-02 10:05:31 +00:00
Brian Curtin 824912eb30 Fix #8618. Ask the Windows mixer API if there are any playback devices
configured before attempting to test PlaySound.
2010-06-01 13:29:13 +00:00
Senthil Kumaran 4f0108b0d9 Fix Issue8797 - urllib2 basic authentication fix for wrong passwords. It fails after 5 retries. 2010-06-01 12:40:07 +00:00
Mark Dickinson 4ca7c3c089 Issue #8748: Fix incorrect results from comparisons between an integer
and a complex instance.  Based on a patch by Meador Inge.
2010-05-30 13:18:10 +00:00
Mark Dickinson 813363743d Issue #5211: Complete removal of implicit coercions for the complex
type.  Coercion for arithmetic operations was already removed in
r78280, but that commit didn't remove coercion for rich comparisons.
2010-05-30 12:12:25 +00:00
Brian Curtin 83cba05c30 Fix #8405 for slow buildbots. Remove the sleep on startup and move the
pipe communication into a loop to retry in case a buildbot gets even slower.
2010-05-28 15:49:21 +00:00
Benjamin Peterson 29d438c96c remove non-ascii coding per PEP 8 2010-05-28 02:12:36 +00:00
Victor Stinner 03883624a4 Issue #8835: test_support.transient_internet() catchs gaierror(EAI_NONAME) and
gaierror(EAI_NODATA)
2010-05-27 22:29:48 +00:00
Alexander Belopolsky 9292ee0667 Issue #7150: Raise OverflowError if the result of adding or subtracting
timedelta from date or datetime falls outside of the MINYEAR:MAXYEAR range.
2010-05-27 20:55:27 +00:00
Alexander Belopolsky 58451d2dd7 Issue #7879: Skip negative timestamps test on any Windows platform
using unittest.skipIf decorator.
2010-05-26 20:45:37 +00:00
Alexander Belopolsky a26cf46dd4 Issue #7879: Do not test negative timestamps on any Windows platform
including Windows CE.
2010-05-26 19:43:16 +00:00
Mark Dickinson 784a47f2c0 Issue #8825: additional testcases for int(string, 0) and long(string, 0). 2010-05-26 19:06:33 +00:00
Victor Stinner 708c0727f9 Issue #7449: Skip test_socketserver if threading support is disabled 2010-05-26 17:25:28 +00:00
Victor Stinner c49dfcc8dc Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding and
error handler, instead of writing to the C stderr file in utf-8
2010-05-25 22:30:32 +00:00
Mark Dickinson ecb8316885 Fix a NameError in test_enumerate. 2010-05-25 19:44:49 +00:00
Mark Dickinson 2066559913 Issue #8816: Extra tests for some built-in functions. These tests are
ports of IronPython tests.  Thanks Gregory Nofi.
2010-05-25 19:01:08 +00:00
R. David Murray bfbdefe539 Issue 8143: sync unquote in urlparse with urllib; add comment about doing so.
unquote is duplicated in the two files to avoid a circular reference.
(This is fixed in Python3.)  Updates keep getting made to the public unquote
without fixing the urlparse one, however, so this fix syncs the two
and adds a comment to both to make sure changes are applied to both.
2010-05-25 15:20:46 +00:00
Brian Curtin b64c89bd7a Fix #2810 - handle the case where some registry calls return
ERROR_MORE_DATA, requiring another call to get the remaining data.

Patch by Daniel Stutzbach
2010-05-25 15:06:15 +00:00
Victor Stinner 554a3b82e4 Issue #6662: Fix parsing of malformatted charref (&#bad;) 2010-05-24 21:33:24 +00:00
Georg Brandl f0757a2937 #8016: add the CP858 codec (approved by Benjamin). (Also add CP720 to the tests, it was missing there.) 2010-05-24 21:29:07 +00:00
Steven Bethard dce6e1bd5a Fix default value for version help. Approved by Benjamin on python-dev: http://mail.python.org/pipermail/python-dev/2010-May/100231.html 2010-05-24 03:45:26 +00:00
Benjamin Peterson 36cd75ab8d Merged revisions 80937,81478 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r80937 | benjamin.peterson | 2010-05-07 14:10:58 -0500 (Fri, 07 May 2010) | 1 line

  remove redundant unicode call
........
  r81478 | benjamin.peterson | 2010-05-22 13:47:39 -0500 (Sat, 22 May 2010) | 1 line

  ensure doctests have some future_features
........
2010-05-22 18:52:21 +00:00
Victor Stinner 54b40ee929 Fix my last commit (r81471) about codecs
Rememder: don't touch the code just before a commit
2010-05-22 13:44:25 +00:00
Victor Stinner 7df55dad3b Issue #6268: More bugfixes about BOM, UTF-16 and UTF-32
* Fix seek() method of codecs.open(), don't write the BOM twice after seek(0)
 * Fix reset() method of codecs, UTF-16, UTF-32 and StreamWriter classes
 * test_codecs: use "w+" mode instead of "wt+". "t" mode is not supported by
   Solaris or Windows, but does it really exist? I found it the in the issue.
2010-05-22 13:37:56 +00:00
Georg Brandl a19baf58e6 Underscore the name of an internal utility function. 2010-05-22 11:31:16 +00:00
Georg Brandl 5d0ca2c832 Issue #3924: Ignore cookies with invalid "version" field in cookielib. 2010-05-22 11:29:19 +00:00
Victor Stinner 262be5e70b Issue #6268: Fix seek() method of codecs.open(), don't read the BOM twice
after seek(0)
2010-05-22 02:11:07 +00:00
Victor Stinner d6703b5e38 Issue #5640: Fix Shift-JIS incremental encoder for error handlers different
than strict
2010-05-21 22:50:28 +00:00
Benjamin Peterson 26da187193 simplify and modernize updatecache() 2010-05-21 21:35:44 +00:00
Benjamin Peterson b9e7c01294 remove debugging rubish 2010-05-21 21:32:49 +00:00
Benjamin Peterson 266e454866 ensure the last line has a trailing newline #8782 2010-05-21 21:31:24 +00:00
Benjamin Peterson bd289dae35 fix name 2010-05-21 21:17:22 +00:00
Benjamin Peterson 6722ac2f00 use addCleanup 2010-05-21 21:16:12 +00:00
Benjamin Peterson eb318d3b16 return NotImplemented from Mapping when comparing to a non-mapping #8729 2010-05-21 20:51:45 +00:00
Brett Cannon eb3cd301ae Turned out that if you used explicit relative import syntax
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.

Fixes issue #7902. Thanks to Meador Inge for the patch.
2010-05-20 18:37:55 +00:00
Victor Stinner b1556c537d libpython.py: fix support of non-BMP unicode characters
Forward port some code from Python3:

 * join surrogate pairs if sizeof(Py_UNICODE)==2
 * Enable non-BMP test on narrow builds using u"\U0001D121" instead of
   unichr(0x1D121)
2010-05-20 11:29:45 +00:00
Tarek Ziadé 8f692275e9 #8759: Fixed user paths in sysconfig for posix and os2 schemes 2010-05-19 22:20:14 +00:00
Stefan Krah 8a6f3fe3b5 Fix typos in docstrings. 2010-05-19 15:46:39 +00:00
Giampaolo Rodolà e3a84e857f 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:04:31 +00:00
Antoine Pitrou 83137c2e16 Issue #7079: Fix a possible crash when closing a file object while using
it from another thread.  Patch by Daniel Stutzbach.
2010-05-17 19:56:59 +00:00
Florent Xicluna af87f9f09f Issue #1285086: Speed up urllib.quote and urllib.unquote for simple cases. 2010-05-17 13:35:09 +00:00
Tarek Ziadé 4fc2a008b8 upgraded distutils docs w.r.t. the manifest regeneration 2010-05-17 10:54:43 +00:00
Florent Xicluna e127e24359 Slight style cleanup. 2010-05-17 10:39:07 +00:00
Tarek Ziadé 422545f0e7 Fixed #8688: Distutils now recalculates MANIFEST everytime. 2010-05-17 10:06:20 +00:00
Victor Stinner 8a470d6039 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:34:40 +00:00
Benjamin Peterson 5b5134b8d1 use TestCase skip method 2010-05-15 17:48:55 +00:00
Stefan Krah 7622eba757 If the timeout is exceeded, count the tests as skipped instead of just
issuing a warning.
2010-05-15 09:31:08 +00:00
Victor Stinner 2b271f7e30 Fix regression introduced by r81154 (Issue #5099, subprocess destructor) 2010-05-14 21:52:26 +00:00
Brett Cannon 42a0ba7b2c subprocess.Popen.__del__ referenced global objects, which is a no-no thanks to
interpreter shutdown semantics. Same issue goes for the methods that __del__
called. Now all the methods capture the global objects it needs as default
values to private parameters (could have stuck them on the class object itself,
but since the objects have nothing directly to do with the class that seemed
wrong).

There is no test as making one that works is hard. This patch was
verified against a consistently failing test in Mercurial's test suite, though,
so it has been tested in some regard.

Closes issue #5099. Thanks to Mary Stern for the bug report and Gabriel
Genellina for writing another patch for the same issue and attempting to write
a test.
2010-05-14 00:21:48 +00:00
Brett Cannon da9af75d5f 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-13 23:59:41 +00:00
Florent Xicluna b3d0554040 Revert changeset r81150 which helped diagnose issue #8423 on some OS X buildbot. 2010-05-13 23:46:48 +00:00
Florent Xicluna 9cf210f392 Improve test feedback to troubleshoot issue #8423 on OS X. 2010-05-13 21:41:05 +00:00
Florent Xicluna 9ac6114dc9 Better test skipping, with message in the log. 2010-05-13 21:40:01 +00:00
Florent Xicluna 8652f2e83e Revert the additional OS X information (r81140). Keep the endianness information. 2010-05-13 18:16:06 +00:00
Florent Xicluna b7d413f9bc Add sensible information about the OS X platform to diagnose issue #8423:
test_pep277 fails on "x86 Tiger" buildbot but not on "PPC Tiger".
2010-05-13 17:05:29 +00:00
Victor Stinner 37368163bd Fix verb tense in skip message.
Ooops, merge also r80334 (patch by r.david.murray)
2010-05-13 16:22:15 +00:00
Victor Stinner 20c3258bf2 Issue #8422, test_genericpath: skip the creation of a directory with an invalid
UTF name on Mac OS X because the OS deny it (the name have to be a valid UTF8
string).

Merge r80163 from py3k branch.
2010-05-13 16:18:14 +00:00
Senthil Kumaran 81a0450cb5 Fix Issue8657 - adding git and git+ssh as know schemes. 2010-05-13 03:25:21 +00:00
Mark Dickinson 62f7e8b0b8 Fix unused variable in test_factorial. 2010-05-12 19:53:36 +00:00
Giampaolo Rodolà fd25594aa4 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:29:27 +00:00
Antoine Pitrou fc3bfad2e0 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:42:28 +00:00
Antoine Pitrou 37ffc3e3ba 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:32:31 +00:00
Michael Foord 72b1977221 Improving help message for python -m unittest. Issue 8303. 2010-05-10 20:21:16 +00:00
Giampaolo Rodolà ff46d6e844 Issue #8490: adds a more solid test suite for asyncore 2010-05-10 15:33:22 +00:00
Michael Foord 53a92eb3c3 Adding a test for unittest.BaseTestSuite. 2010-05-09 09:58:25 +00:00
Mark Dickinson 7000e9e01b Issue #8644: Improve accuracy of timedelta.total_seconds method.
(Backport of r80979 to py3k.)  Thanks Alexander Belopolsky.
2010-05-09 09:30:06 +00:00
Gregory P. Smith 860852fdf4 Revert r81012. buildbot problems and its questionable of me to even
add this to trunk while we're on the way to 2.7rc1.

When fixed this can go into py3k first.  Sorry.
2010-05-09 01:20:20 +00:00
Gregory P. Smith 56fe6569fd Fixes [issue7245] Better Ctrl-C support in pdb. 2010-05-08 23:38:49 +00:00
Jean-Paul Calderone e54ddf1ed2 Skip signal handler re-installation if it is not necessary. Issue 8354. 2010-05-08 20:06:02 +00:00
Benjamin Peterson c251607d59 bump version to 2.7 beta 2 2010-05-08 17:08:17 +00:00
Michael Foord 9c164af6c3 unittest: issue 8301. Adding functions to test suites no longer crashes. 2010-05-08 17:06:25 +00:00
Benjamin Peterson 7daf0e4aa1 update pydoc-topics 2010-05-08 17:05:19 +00:00
Benjamin Peterson f063d15873 run and fix enumerate start test cases #8636 2010-05-08 16:44:52 +00:00