[Python-checkins] cpython (merge 3.5 -> default): As per further discussion, re-enable the typeobject.c guard for picklability.

barry.warsaw python-checkins at python.org
Mon Jan 11 15:53:57 EST 2016


https://hg.python.org/cpython/rev/f1cfac294af2
changeset:   99857:f1cfac294af2
parent:      99849:927fd0e14d49
parent:      99856:54dd5c105334
user:        Barry Warsaw <barry at python.org>
date:        Mon Jan 11 15:51:27 2016 -0500
summary:
  As per further discussion, re-enable the typeobject.c guard for picklability.
upstreams such as Cython will have to adjust.

files:
  Misc/NEWS            |  3 ---
  Objects/typeobject.c |  9 ---------
  2 files changed, 0 insertions(+), 12 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,9 +10,6 @@
 Core and Builtins
 -----------------
 
-- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
-  _PyObject_GetState() due to regressions observed in Cython-based projects.
-
 - Issue #25961: Disallowed null characters in the type name.
 
 - Issue #25973: Fix segfault when an invalid nonlocal statement binds a name
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3872,14 +3872,6 @@
         }
 
         assert(slotnames == Py_None || PyList_Check(slotnames));
-#if 0
-        /* 2016-01-11 barry - This clause breaks at least three packages which
-           rely on Cython: kivy, pysam, and s3ql.  Cython may be doing
-           something funny under the hood, but as this is clearly a regression
-           and the rationale for this prohibition is suspect, I am commenting
-           this out.  Perhaps it should just be removed.  See issue #22995 for
-           details.
-        */
         if (required) {
             Py_ssize_t basicsize = PyBaseObject_Type.tp_basicsize;
             if (obj->ob_type->tp_dictoffset)
@@ -3897,7 +3889,6 @@
                 return NULL;
             }
         }
-#endif
 
         if (slotnames != Py_None && Py_SIZE(slotnames) > 0) {
             PyObject *slots;

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


More information about the Python-checkins mailing list