Guido van Rossum [Mon, 29 Oct 2007 22:15:05 +0000 (22:15 +0000)]
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.)
Georg Brandl [Sat, 20 Oct 2007 18:08:14 +0000 (18:08 +0000)]
* Add new toplevel chapter, "Using Python." (how to install,
configure and setup python on different platforms -- at least
in theory.)
* Move the Python on Mac docs in that chapter.
* Add a new chapter about the command line invocation, by stargaming.
Facundo Batista [Fri, 19 Oct 2007 19:25:57 +0000 (19:25 +0000)]
The constructor from tuple was way too permissive: it allowed bad
coefficient numbers, floats in the sign, and other details that
generated directly the wrong number in the best case, or triggered
misfunctionality in the alorithms.
Test cases added for these issues. Thanks Mark Dickinson.
Gregory P. Smith [Thu, 18 Oct 2007 08:34:20 +0000 (08:34 +0000)]
Fix a weird bug in dbtables: if it chose a random rowid string that contained
NULL bytes it would cause the database all sorts of problems in the future
leading to very strange random failures and corrupt dbtables.bsdTableDb dbs.
Gregory P. Smith [Thu, 18 Oct 2007 07:56:54 +0000 (07:56 +0000)]
cleanup test_dbtables to use mkdtemp. cleanup dbtables to pass txn as a
keyword argument whenever possible to avoid bugs and confusion. (dbtables.py
line 447 self.db.get using txn as a non-keyword was an actual bug due to this)
Facundo Batista [Thu, 18 Oct 2007 03:16:03 +0000 (03:16 +0000)]
Issue #1580738. When HTTPConnection reads the whole stream with read(),
it closes itself. When the stream is read in several calls to read(n),
it should behave in the same way if HTTPConnection knows where the end
of the stream is (through self.length). Added a test case for this
behaviour.
Brett Cannon [Tue, 16 Oct 2007 23:24:06 +0000 (23:24 +0000)]
Remove ``:const:`` notation on None in parameter list. Since the markup is not
rendered for parameters it just showed up as ``:const:`None` `` in the output.
Neal Norwitz [Sun, 14 Oct 2007 00:18:40 +0000 (00:18 +0000)]
Let the O/S supply a port if none of the default ports can be used.
This should make the tests more robust at the expense of allowing
tests to be sloppier by not requiring them to cleanup after themselves.
(It will legitamitely help when running two test suites simultaneously
or if another process is already using one of the predefined ports.)
Also simplifies (slightLy) the exception handling elsewhere.
Gregory P. Smith [Fri, 12 Oct 2007 18:44:06 +0000 (18:44 +0000)]
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.
Thomas Heller [Thu, 11 Oct 2007 19:51:32 +0000 (19:51 +0000)]
On OS X, use os.uname() instead of gestalt.sysv(...) to get the
operating system version. This allows to use ctypes when Python
was configured with --disable-toolbox-glue.
Fix a double free when positioning a database cursor to a non-existant
string key (and probably a few other situations with string keys).
This was reported with a patch as pybsddb sourceforge bug 1708868 by
jjjhhhlll at gmail.
Splits Modules/_bsddb.c up into bsddb.h and _bsddb.c and adds a C API
object available as bsddb.db.api. This is based on the patch submitted
by Duncan Grisby here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1551895&group_id=13900&atid=313900
See this thread for additional info:
http://sourceforge.net/mailarchive/forum.php?thread_name=E1GAVDK-0002rk-Iw%40apasphere.com&forum_name=pybsddb-users
It also cleans up the code a little by removing some ifdef/endifs for
python prior to 2.1 and for unsupported Berkeley DB <= 3.2.