[Python-checkins] cpython (2.7): Issue #22995: [UPDATE] Comment out the one of the pickleability tests in

barry.warsaw python-checkins at python.org
Mon Jan 11 14:45:04 EST 2016


https://hg.python.org/cpython/rev/9d3ac16b78dc
changeset:   99850:9d3ac16b78dc
branch:      2.7
parent:      99825:84fdbdd483a3
user:        Barry Warsaw <barry at python.org>
date:        Mon Jan 11 13:52:23 2016 -0500
summary:
  Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
_PyObject_GetState() due to regressions observed in Cython-based projects.

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


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,9 @@
 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
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3279,6 +3279,14 @@
         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 @@
                 goto end;
             }
         }
+#endif
 
         if (names != Py_None) {
             slots = PyDict_New();

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


More information about the Python-checkins mailing list