[Python-checkins] cpython (merge default -> default): Merge.

stefan.krah python-checkins at python.org
Mon Apr 2 15:13:19 CEST 2012


http://hg.python.org/cpython/rev/f00fae41f95d
changeset:   76064:f00fae41f95d
parent:      76063:2345a042c08a
parent:      76062:9fcb2676696c
user:        Stefan Krah <skrah at bytereef.org>
date:        Mon Apr 02 15:04:14 2012 +0200
summary:
  Merge.

files:
  Include/patchlevel.h |   2 +-
  Misc/NEWS            |  64 +++++++++++++++++++-------------
  Objects/typeobject.c |  22 ++++------
  3 files changed, 48 insertions(+), 40 deletions(-)


diff --git a/Include/patchlevel.h b/Include/patchlevel.h
--- a/Include/patchlevel.h
+++ b/Include/patchlevel.h
@@ -23,7 +23,7 @@
 #define PY_RELEASE_SERIAL	2
 
 /* Version as a string */
-#define PY_VERSION      	"3.3.0a2"
+#define PY_VERSION      	"3.3.0a2+"
 /*--end constants--*/
 
 /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -2,10 +2,10 @@
 Python News
 +++++++++++
 
-What's New in Python 3.3.0 Alpha 2?
+What's New in Python 3.3.0 Alpha 3?
 ===================================
 
-*Release date: 01-Apr-2012*
+*Release date: XXXX-XX-XX*
 
 Core and Builtins
 -----------------
@@ -13,30 +13,6 @@
 - Issue #13019: Fix potential reference leaks in bytearray.extend().  Patch
   by Suman Saha.
 
-- Issue #1683368: object.__new__ and object.__init__ raise a TypeError if they
-  are passed arguments and their complementary method is not overridden.
-
-- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as
-  the module name that was not interned.
-
-- Issue #14331: Use significantly less stack space when importing modules by
-  allocating path buffers on the heap instead of the stack.
-
-- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not
-  passed strings.
-
-- Issue #1469629: Allow cycles through an object's __dict__ slot to be
-  collected. (For example if ``x.__dict__ is x``).
-
-- Issue #14205: dict lookup raises a RuntimeError if the dict is modified
-  during a lookup.
-
-- Issue #14220: When a generator is delegating to another iterator with the
-  yield from syntax, it needs to have its ``gi_running`` flag set to True.
-
-- Issue #14435: Remove dedicated block allocator from floatobject.c and rely
-  on the PyObject_Malloc() api like all other objects.
-
 Library
 -------
 
@@ -44,6 +20,42 @@
   a multiprocessing Client or Listener with an AF_PIPE type address under
   non-Windows platforms.  Patch by Popa Claudiu.
 
+
+What's New in Python 3.3.0 Alpha 2?
+===================================
+
+*Release date: 01-Apr-2012*
+
+Core and Builtins
+-----------------
+
+- Issue #1683368: object.__new__ and object.__init__ raise a TypeError if they
+  are passed arguments and their complementary method is not overridden.
+
+- Issue #14378: Fix compiling ast.ImportFrom nodes with a "__future__" string as
+  the module name that was not interned.
+
+- Issue #14331: Use significantly less stack space when importing modules by
+  allocating path buffers on the heap instead of the stack.
+
+- Issue #14334: Prevent in a segfault in type.__getattribute__ when it was not
+  passed strings.
+
+- Issue #1469629: Allow cycles through an object's __dict__ slot to be
+  collected. (For example if ``x.__dict__ is x``).
+
+- Issue #14205: dict lookup raises a RuntimeError if the dict is modified
+  during a lookup.
+
+- Issue #14220: When a generator is delegating to another iterator with the
+  yield from syntax, it needs to have its ``gi_running`` flag set to True.
+
+- Issue #14435: Remove dedicated block allocator from floatobject.c and rely
+  on the PyObject_Malloc() api like all other objects.
+
+Library
+-------
+
 - Issue #14300: Under Windows, sockets created using socket.dup() now allow
   overlapped I/O.  Patch by sbt.
 
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -490,26 +490,22 @@
     for (i = 0; i < PyTuple_GET_SIZE(value); i++) {
         ob = PyTuple_GET_ITEM(value, i);
         if (!PyType_Check(ob)) {
-            PyErr_Format(
-                PyExc_TypeError,
-    "%s.__bases__ must be tuple of classes, not '%s'",
-                            type->tp_name, Py_TYPE(ob)->tp_name);
-                    return -1;
+            PyErr_Format(PyExc_TypeError,
+                         "%s.__bases__ must be tuple of classes, not '%s'",
+                         type->tp_name, Py_TYPE(ob)->tp_name);
+            return -1;
         }
-        if (PyType_Check(ob)) {
-            if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
-                PyErr_SetString(PyExc_TypeError,
-            "a __bases__ item causes an inheritance cycle");
-                return -1;
-            }
+        if (PyType_IsSubtype((PyTypeObject*)ob, type)) {
+            PyErr_SetString(PyExc_TypeError,
+                            "a __bases__ item causes an inheritance cycle");
+            return -1;
         }
     }
 
     new_base = best_base(value);
 
-    if (!new_base) {
+    if (!new_base)
         return -1;
-    }
 
     if (!compatible_for_assignment(type->tp_base, new_base, "__bases__"))
         return -1;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list