Stefan Krah [Thu, 24 Jun 2010 09:33:05 +0000 (09:33 +0000)]
Issue #9020: The Py_IS* macros from pyctype.h should generally only be
used with signed/unsigned char arguments. For integer arguments, EOF
has to be handled separately.
Ronald Oussoren [Tue, 22 Jun 2010 09:32:22 +0000 (09:32 +0000)]
The code in _scproxy (a mac specific helper module to
detect proxy settings) had the wrong logic for detecting
if the checkbox 'Exclude simple hostnames' is checked. This
checkin fixes that.
As a result the test failure 'Issue8455' goes away on systems
where the checkbox is not checked.
I'm carefully avoiding saying that is fixes that issue,
test_urllib2_localnet assumes that system proxy settings are
empty (not just on OSX, see Issue8455 for details).
Ronald Oussoren [Tue, 22 Jun 2010 09:18:28 +0000 (09:18 +0000)]
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.
R. David Murray [Thu, 17 Jun 2010 01:36:52 +0000 (01:36 +0000)]
#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.
Antoine Pitrou [Fri, 11 Jun 2010 21:42:26 +0000 (21:42 +0000)]
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).
Michael Foord [Sat, 5 Jun 2010 21:57:03 +0000 (21:57 +0000)]
Documentation updates for issues 8302 and 8351 (truncating excessive diffs in unittest failure messages and reporting SkipTest exceptions in setUpClass and setUpModule as skips rather than errors).
Ezio Melotti [Sat, 5 Jun 2010 17:51:07 +0000 (17:51 +0000)]
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.
Mark Dickinson [Sat, 5 Jun 2010 12:14:43 +0000 (12:14 +0000)]
Issue #8627: Fix "XXX undetected error" from unchecked PyErr_WarnPy3k return.
This is just a quick fix: if the warning is turned into an exception, the
exception simply gets ignored.
Michael Foord [Sat, 5 Jun 2010 12:10:52 +0000 (12:10 +0000)]
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.