summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2009-11-24 17:53:23 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2009-11-24 17:53:23 (GMT)
commit8b2d713d3294b148afe5e31a0d284e4a5065b63a (patch)
tree669f9600b1d77490ba629b4eb51b6cc717f5c44a /Modules
parent1d2c16db7ee7cd14a98fef4b3ec689be861bdcf0 (diff)
downloadcpython-8b2d713d3294b148afe5e31a0d284e4a5065b63a.zip
cpython-8b2d713d3294b148afe5e31a0d284e4a5065b63a.tar.gz
cpython-8b2d713d3294b148afe5e31a0d284e4a5065b63a.tar.bz2
Issue 7128: Removed reference to the non-existent copyreg module.
The reference to copyreg was a unnoticed leftover from the compatibility support for the grand renaming of the standard library in Python 3. The compatibility support was reverted in r63493, but not completely as this patch shows. Based on a patch by Amaury Forgeot d'Arc.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/cPickle.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index ab59b76..f97959b 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -132,7 +132,7 @@ static PyObject *__class___str, *__getinitargs___str, *__dict___str,
*__reduce_ex___str,
*write_str, *append_str,
*read_str, *readline_str, *__main___str,
- *copyreg_str, *dispatch_table_str;
+ *dispatch_table_str;
/*************************************************************************
Internal Data type for pickle data. */
@@ -3069,7 +3069,7 @@ newPicklerobject(PyObject *file, int proto)
if (PyEval_GetRestricted()) {
/* Restricted execution, get private tables */
- PyObject *m = PyImport_Import(copyreg_str);
+ PyObject *m = PyImport_ImportModule("copy_reg");
if (m == NULL)
goto err;
@@ -5852,7 +5852,6 @@ init_stuff(PyObject *module_dict)
INIT_STR(append);
INIT_STR(read);
INIT_STR(readline);
- INIT_STR(copyreg);
INIT_STR(dispatch_table);
if (!( copyreg = PyImport_ImportModule("copy_reg")))