[New-bugs-announce] [issue7128] cPickle looking for non-existent package copyreg
Joseph C Wang
report at bugs.python.org
Wed Oct 14 18:12:34 CEST 2009
New submission from Joseph C Wang <joequant at gmail.com>:
When running cPickle in restricted mode, the module tries to import
copyreg which does not appear to exist anywhere. The problem is in
cPickle.c
2980 if (PyEval_GetRestricted()) {
2981 /* Restricted execution, get private tables */
2982 PyObject *m = PyImport_Import(copyreg_str);
2983
2984 if (m == NULL)
2985 goto err;
2986 self->dispatch_table = PyObject_GetAttr(m, dispatch_table_str);
2987 Py_DECREF(m);
2988 if (self->dispatch_table == NULL)
2989 goto err;
2990 }
2991 else {
2992 self->dispatch_table = dispatch_table;
2993 Py_INCREF(dispatch_table);
2994 }
copyreg_str should probably be copy_reg_str
----------
components: Interpreter Core
messages: 94004
nosy: joequant
severity: normal
status: open
title: cPickle looking for non-existent package copyreg
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7128>
_______________________________________
More information about the New-bugs-announce
mailing list