Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: See trunk/Modules/cPickle.c(609).
static Py_ssize_t read_cStringIO(Unpicklerobject *self, char **s, Py_ssize_t n) { char *ptr; if (PycStringIO->cread((PyObject *)self->file, &ptr, n) != n) { PyErr_SetNone(PyExc_EOFError); return -1; } *s = ptr; return n; } It's checking the length of returned string and if not match, raises EOFError. But there is no corresponding code in py3k. I hope attached patch will fix this issue. ---------- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file11987/py3k_set_EOFError_when_invalid_result_size.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4298> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com