]> 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:52:23 +0000 (13:52 -0500)
committerBarry Warsaw <barry@python.org>
Mon, 11 Jan 2016 18:52:23 +0000 (13:52 -0500)
_PyObject_GetState() due to regressions observed in Cython-based projects.

Misc/NEWS
Objects/typeobject.c

index e28bc87fd01966335587c624414d09bdcd60229c..bda940f38105b2d0b51aff575b7f7df25b368f66 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@ What's New in Python 2.7.12?
 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 #22995: Instances of extension types with a state that aren't
index 8375f5fdad6bc577ec38d65238b12f5f1877ed08..1ddcc59d12c436077cd31c85f9c3dad5b37dcf03 100644 (file)
@@ -3279,6 +3279,14 @@ reduce_2(PyObject *obj)
         if (names == NULL)
             goto end;
         assert(names == Py_None || PyList_Check(names));
+#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_state) {
             Py_ssize_t basicsize = PyBaseObject_Type.tp_basicsize;
             if (obj->ob_type->tp_dictoffset)
@@ -3294,6 +3302,7 @@ reduce_2(PyObject *obj)
                 goto end;
             }
         }
+#endif
 
         if (names != Py_None) {
             slots = PyDict_New();