Christian Heimes [Mon, 25 Feb 2008 17:32:07 +0000 (17:32 +0000)]
Thomas Herve explained to me that PyCrypto depends on the constants. I'm adding the aliases because C code for Python 2.x should compile under 2.6 as well. The aliases aren't available in Python 3.x though.
Neal Norwitz [Sun, 24 Feb 2008 18:47:03 +0000 (18:47 +0000)]
Create a db_home directory with a unique name so multiple users can
run the test simultaneously. The simplest thing I found that worked
on both Windows and Unix was to use the PID. It's unique so should be
sufficient. This should prevent many of the spurious failures of
the automated tests since they run as different users.
Also cleanup the directory consistenly in the tearDown methods.
It would be nice if someone ensured that the directories are always
created with a consistent name.
Neal Norwitz [Sun, 24 Feb 2008 07:21:56 +0000 (07:21 +0000)]
Get ctypes working on the Alpha (Tru64). The problem was that there
were two module_methods and the one used depended on the order the
modules were loaded. By making the test module_methods static,
it is not exported and the correct version is picked up.
Georg Brandl [Sun, 24 Feb 2008 00:03:22 +0000 (00:03 +0000)]
#900744: If an invalid chunked-encoding header is sent by a server,
httplib will now raise IncompleteRead and close the connection instead
of raising ValueError.
Jeffrey Yasskin [Sat, 23 Feb 2008 19:40:54 +0000 (19:40 +0000)]
Prevent classes like:
class RunSelfFunction(object):
def __init__(self):
self.thread = threading.Thread(target=self._run)
self.thread.start()
def _run(self):
pass
from creating a permanent cycle between the object and the thread by having the
Thread delete its references to the object when it completes.
As an example of the effect of this bug, paramiko.Transport inherits from
Thread to avoid it.
#1330538: Improve comparison of xmlrpclib.DateTime and datetime instances.
Remove automatic handling of datetime.date and datetime.time.
This breaks backward compatibility, but python-dev discussion was strongly
against this automatic conversion; see the bug for a link.
#1119331: ncurses will just call exit() if the terminal name isn't found.
Call setupterm() first so that we get a Python exception instead of just existing.
Facundo Batista [Sat, 23 Feb 2008 15:07:35 +0000 (15:07 +0000)]
Issue 1089358. Adds the siginterrupt() function, that is just a
wrapper around the system call with the same name. Also added
test cases, doc changes and NEWS entry. Thanks Jason and Ralf
Schmitt.
Facundo Batista [Sat, 23 Feb 2008 12:46:10 +0000 (12:46 +0000)]
Issue 1781. Now ConfigParser.add_section does not let you add a
DEFAULT section any more, because it duplicated sections with
the rest of the machinery. Thanks Tim Lesher and Manuel Kaufmann.
Facundo Batista [Sat, 23 Feb 2008 12:01:13 +0000 (12:01 +0000)]
Issue 1881. Increased the stack limit from 500 to 1500. Also added
a test for this (and because of this test you'll see in stderr a
message that parser.c sends before raising MemoryError).
Thanks Ralf Schmitt.
* Fix-up issues pointed-out by Neal Norwitz.
* Add extensive comments.
* The lz->result variable is now a tuple instead of a list.
* Use fast macro getitem/setitem calls so most code is in-line.
* Re-use the result tuple if available (modify in-place instead of copy).
Eric Smith [Fri, 22 Feb 2008 16:30:22 +0000 (16:30 +0000)]
Added bin() builtin. I'm going to check in the tests in a seperate checkin, because the builtin doesn't need to be ported to py3k, but the tests are missing in py3k and need to be merged there.
Thomas Heller [Thu, 21 Feb 2008 18:28:48 +0000 (18:28 +0000)]
configure.ac: Remove the configure check for _Bool, it is already done in the
top-level Python configure script.
configure, fficonfig.h.in: regenerated.
Guido van Rossum [Thu, 21 Feb 2008 18:18:37 +0000 (18:18 +0000)]
Removed uses of dict.has_key() from distutils, and uses of
callable() from copy_reg.py, so the interpreter now starts up
without warnings when '-3' is given. More work like this needs to
be done in the rest of the stdlib.
Eric Smith [Wed, 20 Feb 2008 23:34:22 +0000 (23:34 +0000)]
Trim leading zeros from a floating point exponent, per C99. See issue 1600. As far as I know, this only affects Windows. Add float type 'n' to PyOS_ascii_formatd (see PEP 3101 for 'n' description).
The files in Objects/stringlib that implement PEP 3101 (stringdefs.h,
unicodedefs.h, formatter.h, string_format.h) are identical in trunk
and py3k. Any changes from here on should be made to trunk, and
changes will propogate to py3k).
Crashers of the day: Py_CLEAR must be used when there is a chance that the
function can be called recursively.
This was discussed in issue1020188.
In python codebase, all occurrences of Py_[X]DECREF(xxx->yyy) are suspect,
except when they appear in tp_new or tp_dealloc functions, or when
the member cannot be of a user-defined class.
Note that tp_init is not safe.
I do have a (crashing) example for every changed line.
Is it worth adding them to the test suite?
Example:
class SpecialStr(str):
def __del__(self):
s.close()
import cStringIO
s = cStringIO.StringIO(SpecialStr("text"))
s.close() # Segfault