This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry
Recipients Arfrever, alexandre.vassalotti, barry, josh.r, kitterma, nadeem.vawda, pitrou, python-dev, serhiy.storchaka
Date 2016-01-07.02:36:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20160106213612.65adafe3@limelight.wooz.org>
In-reply-to <1452118417.4.0.321051515733.issue22995@psf.upfronthosting.co.za>
Content
On Jan 06, 2016, at 10:13 PM, Serhiy Storchaka wrote:

>What return __reduce_ex__(4) for the NameAssignment instance in 3.5.0?

I'm not sure yet (it takes some time to set up the right environment to test
this), but I do know which TypeError is getting triggered.  In typeobject.c,
it's this stanza in _PyObject_GetState():

        assert(slotnames == Py_None || PyList_Check(slotnames));
        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;
            }
        }

I don't yet know why the basicsize isn't matching up.
History
Date User Action Args
2016-01-07 02:36:21barrysetrecipients: + barry, pitrou, alexandre.vassalotti, nadeem.vawda, Arfrever, kitterma, python-dev, serhiy.storchaka, josh.r
2016-01-07 02:36:21barrylinkissue22995 messages
2016-01-07 02:36:18barrycreate