summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-01-18 19:36:03 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-01-18 19:36:03 (GMT)
commit905a97d4c28a6bd924eda0234af8f3398bde5fe7 (patch)
tree390b7292cb8dcebbaa218b683719198e69235771
parent75ed70828580e7733356541efacef0e245b10a2f (diff)
parent111c7b9011c5838f8276e8729bc8cbeb693d4ac7 (diff)
downloadcpython-905a97d4c28a6bd924eda0234af8f3398bde5fe7.zip
cpython-905a97d4c28a6bd924eda0234af8f3398bde5fe7.tar.gz
cpython-905a97d4c28a6bd924eda0234af8f3398bde5fe7.tar.bz2
Issue #26013: Added compatibility with broken protocol 2 pickles created
in old Python 3 versions (3.4.3 and lower).
-rw-r--r--Lib/_compat_pickle.py7
-rw-r--r--Misc/NEWS3
2 files changed, 10 insertions, 0 deletions
diff --git a/Lib/_compat_pickle.py b/Lib/_compat_pickle.py
index 6e39d4a..c0e0443 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({
diff --git a/Misc/NEWS b/Misc/NEWS
index d3edac7..f5a2afc 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -131,6 +131,9 @@ Core and Builtins
Library
-------
+- Issue #26013: Added compatibility with broken protocol 2 pickles created
+ in old Python 3 versions (3.4.3 and lower).
+
- Issue #26129: Deprecated accepting non-integers in grp.getgrgid().
- Issue #25850: Use cross-compilation by default for 64-bit Windows.