summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2016-01-11 20:14:53 (GMT)
committerBarry Warsaw <barry@python.org>2016-01-11 20:14:53 (GMT)
commit09880c89e9736efe590243876d777e52b1d6abf2 (patch)
treeed2e57b189fd628cddf2fbb2395521e0483bff57 /Objects
parent885e1939beb3ab95cc4e06d86815261256cd1d03 (diff)
downloadcpython-09880c89e9736efe590243876d777e52b1d6abf2.zip
cpython-09880c89e9736efe590243876d777e52b1d6abf2.tar.gz
cpython-09880c89e9736efe590243876d777e52b1d6abf2.tar.bz2
Comment out some tests that won't pass now that we've reverted the
picklability regression. Also, as per further discussion, remove the regressing code.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index ff4ae11..415f916 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3866,33 +3866,6 @@ _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)
- basicsize += sizeof(PyObject *);
- if (obj->ob_type->tp_weaklistoffset)
- basicsize += sizeof(PyObject *);
- if (slotnames != Py_None)
- basicsize += sizeof(PyObject *) * Py_SIZE(slotnames);
- if (obj->ob_type->tp_basicsize > basicsize) {
- Py_DECREF(slotnames);
- Py_DECREF(state);
- PyErr_Format(PyExc_TypeError,
- "can't pickle %.200s objects",
- Py_TYPE(obj)->tp_name);
- return NULL;
- }
- }
-#endif
-
if (slotnames != Py_None && Py_SIZE(slotnames) > 0) {
PyObject *slots;
Py_ssize_t slotnames_size, i;