summaryrefslogtreecommitdiff
path: root/Lib/_compat_pickle.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/_compat_pickle.py')
-rw-r--r--Lib/_compat_pickle.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/_compat_pickle.py b/Lib/_compat_pickle.py
index 6e39d4aee3..c0e0443cf2 100644
--- a/Lib/_compat_pickle.py
+++ b/Lib/_compat_pickle.py
@@ -177,6 +177,13 @@ IMPORT_MAPPING.update({
'DocXMLRPCServer': 'xmlrpc.server',
'SimpleHTTPServer': 'http.server',
'CGIHTTPServer': 'http.server',
+ # For compatibility with broken pickles saved in old Python 3 versions
+ 'UserDict': 'collections',
+ 'UserList': 'collections',
+ 'UserString': 'collections',
+ 'whichdb': 'dbm',
+ 'StringIO': 'io',
+ 'cStringIO': 'io',
})
REVERSE_IMPORT_MAPPING.update({