Author: brett.cannon
Date: Mon Oct 8 01:54:40 2007
New Revision: 58355
Modified:
python/branches/py3k-importlib/ (props changed)
python/branches/py3k-importlib/Doc/library/stdtypes.rst
python/branches/py3k-importlib/Modules/_bsddb.c
python/branches/py3k-importlib/Objects/memoryobject.c
python/branches/py3k-importlib/setup.py
Log:
Merged revisions 58287-58354 via svnmerge from
svn+ssh://[EMAIL PROTECTED]/python/branches/py3k
Modified: python/branches/py3k-importlib/Doc/library/stdtypes.rst
==============================================================================
--- python/branches/py3k-importlib/Doc/library/stdtypes.rst (original)
+++ python/branches/py3k-importlib/Doc/library/stdtypes.rst Mon Oct 8
01:54:40 2007
@@ -218,7 +218,7 @@
There are three distinct numeric types: :dfn:`integers`, :dfn:`floating point
numbers`, and :dfn:`complex numbers`. In addition, Booleans are a subtype of
-plain integers. Integers have unlimited precision. loating point numbers are
+plain integers. Integers have unlimited precision. Floating point numbers are
implemented using :ctype:`double` in C. All bets on their precision are off
unless you happen to know the machine you are working with.
@@ -233,7 +233,7 @@
pair: complex number; literals
pair: hexadecimal; literals
pair: octal; literals
- pair: binary: literals
+ pair: binary; literals
Numbers are created by numeric literals or as the result of built-in functions
and operators. Unadorned integer literals (including hex, octal and binary
@@ -263,7 +263,7 @@
+---------------------+---------------------------------+-------+--------------------+
| Operation | Result | Notes | Full
documentation |
-+====================
+=================================+=======+====================|
++=====================+=================================+=======+====================+
| ``x + y`` | sum of *x* and *y* | |
|
+---------------------+---------------------------------+-------+--------------------+
| ``x - y`` | difference of *x* and *y* | |
|
Modified: python/branches/py3k-importlib/Modules/_bsddb.c
==============================================================================
--- python/branches/py3k-importlib/Modules/_bsddb.c (original)
+++ python/branches/py3k-importlib/Modules/_bsddb.c Mon Oct 8 01:54:40 2007
@@ -5024,14 +5024,20 @@
{
int err;
DBT key;
+ PyObject *retval;
+ key.flags = DB_DBT_MALLOC;
CHECK_SEQUENCE_NOT_CLOSED(self)
MYDB_BEGIN_ALLOW_THREADS
err = self->sequence->get_key(self->sequence, &key);
MYDB_END_ALLOW_THREADS
+ if (!err)
+ retval = PyBytes_FromStringAndSize(key.data, key.size);
+
+ free_dbt(&key);
RETURN_IF_ERR();
- return PyBytes_FromStringAndSize(key.data, key.size);
+ return retval;
}
static PyObject*
Modified: python/branches/py3k-importlib/Objects/memoryobject.c
==============================================================================
--- python/branches/py3k-importlib/Objects/memoryobject.c (original)
+++ python/branches/py3k-importlib/Objects/memoryobject.c Mon Oct 8
01:54:40 2007
@@ -513,12 +513,11 @@
else {
/* Return a new memory-view object */
Py_buffer newview;
- PyMemoryView_FromMemory(&newview);
+ memset(&newview, 0, sizeof(newview));
+ return PyMemoryView_FromMemory(&newview);
}
}
-
-
Py_INCREF(Py_NotImplemented);
return Py_NotImplemented;
}
Modified: python/branches/py3k-importlib/setup.py
==============================================================================
--- python/branches/py3k-importlib/setup.py (original)
+++ python/branches/py3k-importlib/setup.py Mon Oct 8 01:54:40 2007
@@ -630,16 +630,15 @@
# implementation independent wrapper for these; dumbdbm.py provides
# similar functionality (but slower of course) implemented in Python.
- # Sleepycat^WOracle Berkeley DB interface. http://www.sleepycat.com
+ # Sleepycat^WOracle Berkeley DB interface.
+ # http://www.oracle.com/database/berkeley-db/db/index.html
#
# This requires the Sleepycat^WOracle DB code. The supported versions
- # are set below. Visit http://www.sleepycat.com/ to download
+ # are set below. Visit the URL above to download
# a release. Most open source OSes come with one or more
# versions of BerkeleyDB already installed.
- # XXX(gps) - Do not allow BerkeleyDB 4.6.x until Oracle fixes
- # the DB_HASH lockup bug that is present in 4.6.19.
- max_db_ver = (4, 5)
+ max_db_ver = (4, 6)
min_db_ver = (3, 3)
db_setup_debug = False # verbose debug prints from this script?
@@ -710,6 +709,15 @@
db_minor = int(m.group(1))
db_ver = (db_major, db_minor)
+ # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug
+ if db_ver == (4, 6):
+ m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)",
f)
+ db_patch = int(m.group(1))
+ if db_patch < 21:
+ print("db.h:", db_ver, "patch", db_patch,
+ "being ignored (4.6.x must be >=
4.6.21)")
+ continue
+
if ( (db_ver not in db_ver_inc_map) and
(db_ver <= max_db_ver and db_ver >= min_db_ver) ):
# save the include directory with the db.h version
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins