Skip, where's your 2.2.2 Wiki? (Or should we just pick a page name in the moinmoin on python.org?) I've backported the following items to 2.2.2, most of which were my responsibility and/or 64-bit issues needed for the snake farm: ---------------------------------------------------------------------- Modified Files: Tag: release22-maint regrtest.py Log Message: Backport 1.96 from trunk (because I want Xenofarm to test 2.2.2): Add a bunch of sys.stdout.flush() calls that will hopefully improve the usability of the output of the Xenofarm builds. ---------------------------------------------------------------------- Modified Files: Tag: release22-maint unicodeobject.c Log Message: Backport 2.166 from trunk: Fix SF bug 599128, submitted by Inyeol Lee: .replace() would do the wrong thing for a unicode subclass when there were zero string replacements. The example given in the SF bug report was only one way to trigger this; replacing a string of length >= 2 that's not found is another. The code would actually write outside allocated memory if replacement string was longer than the search string. ---------------------------------------------------------------------- Modified Files: Tag: release22-maint test_unicode.py Log Message: Backport 1.56 and 1.68 from trunk: 1.56: Apply diff3.txt from SF patch http://www.python.org/sf/536241 If a str or unicode method returns the original object, make sure that for str and unicode subclasses the original will not be returned. This should prevent SF bug http://www.python.org/sf/460020 from reappearing. 1.68: Fix SF bug 599128, submitted by Inyeol Lee: .replace() would do the wrong thing for a unicode subclass when there were zero string replacements. The example given in the SF bug report was only one way to trigger this; replacing a string of length >= 2 that's not found is another. The code would actually write outside allocated memory if replacement string was longer than the search string. ---------------------------------------------------------------------- Modified Files: Tag: release22-maint structmodule.c Log Message: Backport 2.57 from trunk: (Most of) SF patch 601369 (Christos Georgiou): obmalloc,structmodule: 64bit, big endian (issue 2 only). This adds a bunch of memcpy calls via a temporary variable to avoid alignment errors. That's needed for some platforms. ---------------------------------------------------------------------- Modified Files: Tag: release22-maint test_b1.py Log Message: Backport 1.51 and 1.54 from trunk. 1.51: Bug #556025: list(xrange(1e9)) --> seg fault Close the bug report again -- this time for Cygwin due to a newlib bug. See the following for the details: http://sources.redhat.com/ml/newlib/2002/msg00369.html Note that this commit is only a documentation (i.e., comment) change. 1.54: The list(xrange(sys.maxint / 4)) test blew up on 64-bit platforms. Because ob_size is a 32-bit int but sys.maxint is LONG_MAX which is a 64-bit value, there's no way to make this test succeed on a 64-bit platform. So just skip it when sys.maxint isn't 0x7fffffff. ---------------------------------------------------------------------- Modified Files: Tag: release22-maint intobject.c Log Message: Backport 2.93 from trunk: Insert an overflow check when the sequence repetition count is outside the range of ints. The old code would pass random truncated bits to sq_repeat() on a 64-bit machine. ---------------------------------------------------------------------- Modified Files: Tag: release22-maint unicodeobject.c stringobject.c Log Message: Backport from trunk: unicodeobject.c 2.169 stringobject.c 2.189 Fix warnings on 64-bit platforms about casts from pointers to ints. Two of these were real bugs. ---------------------------------------------------------------------- Modified Files: Tag: release22-maint exceptions.c Log Message: Backported 1.39 and 1.40 from trunk: 1.39: Fix SF bug 610610 (reported by Martijn Pieters, diagnosed by Neal Norwitz). The switch in Exception__str__ didn't clear the error if PySequence_Size() raised an exception. Added a case -1 which clears the error and falls through to the default case. 1.40: Two more cases of switch(PySequence_Size()) without checking for case -1. (Same problem as last checkin for SF bug 610610) Need to clear the error and proceed. ---------------------------------------------------------------------- Note that I've been careful to vary the formatting of my log messages a bit. :-) Michael Hudson backported a bunch of things too. I notice a test suite failure with rfc822 as a result of these. Michael, did you run the test suite? FAILED (errors=1) Traceback (most recent call last): File "../Lib/test/test_rfc822.py", line 211, in ? test_main() File "../Lib/test/test_rfc822.py", line 207, in test_main test_support.run_unittest(MessageTestCase) File "../Lib/test/test_support.py", line 180, in run_unittest run_suite(unittest.makeSuite(testclass), testclass) File "../Lib/test/test_support.py", line 175, in run_suite raise TestFailed(err) test_support.TestFailed: Traceback (most recent call last): File "../Lib/test/test_rfc822.py", line 199, in test_parseaddr eq(rfc822.parseaddr('<>'), ('', '')) File "/home/guido/branch-2.2/Lib/rfc822.py", line 491, in parseaddr list = a.addresslist AttributeError: AddrlistClass instance has no attribute 'addresslist' --Guido van Rossum (home page: http://www.python.org/~guido/)