Skip to content

Commit f65395c

Browse files
committed
Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
_PyObject_GetState() due to regressions observed in Cython-based projects.
1 parent c2ccb73 commit f65395c

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎Misc/NEWS‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ What's New in Python 2.7.12?
1010
Core and Builtins
1111
-----------------
1212

13+
- Issue #22995: [UPDATE] Comment out the one of the pickleability tests in
14+
_PyObject_GetState() due to regressions observed in Cython-based projects.
15+
1316
- Issue #25961: Disallowed null characters in the type name.
1417

1518
- Issue #22995: Instances of extension types with a state that aren't

‎Objects/typeobject.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3279,6 +3279,14 @@ reduce_2(PyObject *obj)
32793279
if (names == NULL)
32803280
goto end;
32813281
assert(names == Py_None || PyList_Check(names));
3282+
#if 0
3283+
/* 2016-01-11 barry - This clause breaks at least three packages which
3284+
rely on Cython: kivy, pysam, and s3ql. Cython may be doing
3285+
something funny under the hood, but as this is clearly a regression
3286+
and the rationale for this prohibition is suspect, I am commenting
3287+
this out. Perhaps it should just be removed. See issue #22995 for
3288+
details.
3289+
*/
32823290
if (required_state) {
32833291
Py_ssize_t basicsize = PyBaseObject_Type.tp_basicsize;
32843292
if (obj->ob_type->tp_dictoffset)
@@ -3294,6 +3302,7 @@ reduce_2(PyObject *obj)
32943302
goto end;
32953303
}
32963304
}
3305+
#endif
32973306

32983307
if (names != Py_None) {
32993308
slots = PyDict_New();

0 commit comments

Comments
 (0)