]> granicus.if.org Git - python/commitdiff
Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
authorBarry Warsaw <barry@python.org>
Mon, 11 Jan 2016 18:24:02 +0000 (13:24 -0500)
committerBarry Warsaw <barry@python.org>
Mon, 11 Jan 2016 18:24:02 +0000 (13:24 -0500)
_PyObject_GetState() due to regressions observed in Cython-based projects.

Misc/NEWS
Objects/typeobject.c

index 72db7599f8cbda43fae40b6528342cc8b5bc36dd..7bdce713012c00b8274bd8d55cb84f0442925395 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ Release date: tba
 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
index 2e680430532d104d8470fe2c79a88d943e0efd82..ff4ae1116408e595dfbc45989ee804a7766e26f0 100644 (file)
@@ -3866,6 +3866,14 @@ _PyObject_GetState(PyObject *obj, int required)
         }
 
         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)
@@ -3883,6 +3891,7 @@ _PyObject_GetState(PyObject *obj, int required)
                 return NULL;
             }
         }
+#endif
 
         if (slotnames != Py_None && Py_SIZE(slotnames) > 0) {
             PyObject *slots;