Commit Graph

15950 Commits

Author SHA1 Message Date
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