Georg Brandl [Mon, 21 Jan 2008 18:35:52 +0000 (18:35 +0000)]
Issue #1882: when compiling code from a string, encoding cookies in the
second line of code were not always recognized correctly.
(backport from rev. 60168)
Gregory P. Smith [Sat, 19 Jan 2008 22:29:41 +0000 (22:29 +0000)]
backport r60104 + r60111 from trunk.
- Issue #1336: fix a race condition in subprocess.Popen if the garbage
collector kicked in at the wrong time that would cause the process
to hang when the child wrote to stderr.
Guido van Rossum [Fri, 18 Jan 2008 21:31:32 +0000 (21:31 +0000)]
Backport r55080:
Fix for #1303614 and #1174712:
- __dict__ descriptor abuse for subclasses of built-in types
- subclassing from both ModuleType and another built-in types
Gregory P. Smith [Thu, 17 Jan 2008 07:54:47 +0000 (07:54 +0000)]
** backport r60015 from trunk.
- Issue829951: In the smtplib module, SMTP.starttls() now complies with
RFC 3207 and forgets any knowledge obtained from the server not obtained
from the TLS negotiation itself. Patch contributed by Bill Fenner.
Thomas Heller [Wed, 16 Jan 2008 19:24:20 +0000 (19:24 +0000)]
Backport from trunk:
Fix a potential 'SystemError: NULL result without error'.
NULL may be a valid return value from PyLong_AsVoidPtr.
Also move an older ctypes NEWS item in the correct category.
Facundo Batista [Tue, 8 Jan 2008 16:20:31 +0000 (16:20 +0000)]
Decimal module and test cases were updated to their state of
the art. It now complies latest specification and tests.
The only difference of this version with the one in the trunk
is that a small subset that hash tests were removed, because
they rely on modifications to core hash() function (see
issue 1182 for further details).
Backport r57216 (see issue #1731).
Add a hack (originally devised in a slightly different form by Thomas Wouters)
to prevent spurious tracebacks when a daemon thread's cleanup happens to wake
up when the world around it has already been destroyed.
This also backports other small changes to this file, essentially making
it identical to the trunk version.
Add some news items I missed. Careful inspection of the svn log output
reveals that a lot more are missing. If you checked anything into the
2.5.2 branch without updating Misc/NEWS, please correct your mistake!
Guido van Rossum [Thu, 13 Dec 2007 20:42:33 +0000 (20:42 +0000)]
Bug #1608: use -fwrapv when GCC supports it. This is important, newer
GCC versions may optimize away overflow buffer overflow checks without
this option! Thanks to Ismail Donmez. No thanks to the GCC devs.
Ronald Oussoren [Wed, 5 Dec 2007 20:43:57 +0000 (20:43 +0000)]
This is a backport of the fix in rev. 59369.
This patch doesn't remove the wrappers for OSADebug* API's but only defines
them when configure detects that the API's are present in the system's
header files.
Gerhard Häring [Sun, 25 Nov 2007 17:40:35 +0000 (17:40 +0000)]
- Backported a workaround for a bug in SQLite 3.2.x/3.3.x versions where a
statement recompilation with no bound parameters lead to a segfault
- Backported a fix necessary because of an SQLite API change in version 3.5.
This prevents segfaults when executing empty queries, like our test suite
does.
Ronald Oussoren [Thu, 22 Nov 2007 10:14:26 +0000 (10:14 +0000)]
A test that should test for osx >= 10.4.0 actually tested for os versions <= 10.4. The end result is that
a universal ("fat") build will claim to be a single-architecture on on OSX 10.5 (Leopard).
Walter Dörwald [Mon, 19 Nov 2007 12:43:39 +0000 (12:43 +0000)]
Backport r59049:
Fix for #1444: utf_8_sig.StreamReader was (indirectly through decode())
calling codecs.utf_8_decode() with final==True, which falled with incomplete
byte sequences. Fix and test by James G. Sack.
Backport for issue1265 (pdb bug with "with" statement).
When an unfinished generator-iterator is garbage collected, PyEval_EvalFrameEx
is called with a GeneratorExit exception set. This leads to funny results
if the sys.settrace function itself makes use of generators.
A visible effect is that the settrace function is reset to None.
Another is that the eventual "finally" block of the generator is not called.
It is necessary to save/restore the exception around the call to the trace
function.
This happens a lot with py3k: isinstance() of an ABCMeta instance runs
def __instancecheck__(cls, instance):
"""Override for isinstance(instance, cls)."""
return any(cls.__subclasscheck__(c)
for c in {instance.__class__, type(instance)})
which lets an opened generator expression each time it returns True.
And the problem can be reproduced in 2.5 with pure python code.
Fred Drake [Fri, 9 Nov 2007 16:53:20 +0000 (16:53 +0000)]
when talking about an imminent 2.5.2c1, the build should identify itself
as being some form of 2.5.2 (this is admittedly a bit conservative);
we can make this 2.5.2c1 when making the release
Backport r58868:
Fixes Issue 1385: The hmac module now computes the correct hmac when using
hashes with a block size other than 64 bytes (such as sha384 and sha512).
Georg Brandl [Fri, 2 Nov 2007 22:46:38 +0000 (22:46 +0000)]
Backport r58709 from trunk:
Backport fixes for the code that decodes octal escapes (and for PyString
also hex escapes) -- this was reaching beyond the end of the input string
buffer, even though it is not supposed to be \0-terminated.
This has no visible effect but is clearly the correct thing to do.
(In 3.0 it had a visible effect after removing ob_sstate from PyString.)
Also fixes #1098.
Fix bug introduced in revision 58385. Database keys could no longer
have NULL bytes in them. Replace the errant strdup with a
malloc+memcpy. Adds a unit test for the correct behavior.
Neal Norwitz [Tue, 23 Oct 2007 05:35:11 +0000 (05:35 +0000)]
Backport 58594:
Issue #1307, patch by Derek Shockey.
When "MAIL" is received without args, an exception happens instead of
sending a 501 syntax error response.
Gregory P. Smith [Thu, 18 Oct 2007 17:15:20 +0000 (17:15 +0000)]
Backport 58532, 58533, 58534:
- Fix bsddb.dbtables: Don't randomly corrupt newly inserted rows by
picking a rowid string with null bytes in it. Such rows could not
later be deleted, modified or individually selected. Existing
bsdTableDb databases created with such rows are out of luck.
- Use mkdtemp for the test_dbtables test database environment and
clean it up afterwards using shutil.rmtree.
Gregory P. Smith [Fri, 12 Oct 2007 18:49:36 +0000 (18:49 +0000)]
Merge trunk 58434:
Fixes http://bugs.python.org/issue1233 - bsddb.dbshelve.DBShelf.append
was useless due to inverted logic. Also adds a test case for RECNO dbs
to test_dbshelve.