[Python-checkins] cpython (merge 3.5 -> default): Issue #26013: Added compatibility with broken protocol 2 pickles created
serhiy.storchaka
python-checkins at python.org
Mon Jan 18 14:36:31 EST 2016
https://hg.python.org/cpython/rev/35ff0976b211
changeset: 99966:35ff0976b211
parent: 99964:96a7603d25ea
parent: 99965:270add17f203
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Jan 18 21:36:03 2016 +0200
summary:
Issue #26013: Added compatibility with broken protocol 2 pickles created
in old Python 3 versions (3.4.3 and lower).
files:
Lib/_compat_pickle.py | 7 +++++++
Misc/NEWS | 3 +++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Lib/_compat_pickle.py b/Lib/_compat_pickle.py
--- a/Lib/_compat_pickle.py
+++ b/Lib/_compat_pickle.py
@@ -177,6 +177,13 @@
'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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -131,6 +131,9 @@
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.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list