mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #6784: Strings from Python 2 can now be unpickled as bytes objects.
Initial patch by Merlijn van Deen. I've added a few unrelated docstring fixes in the patch while I was at it, which makes the documentation for pickle a bit more consistent.
This commit is contained in:
parent
ee07b94788
commit
d05c9ff845
8 changed files with 447 additions and 366 deletions
|
@ -83,13 +83,17 @@ class PyPicklerUnpicklerObjectTests(AbstractPicklerUnpicklerObjectTests):
|
|||
|
||||
|
||||
class PyDispatchTableTests(AbstractDispatchTableTests):
|
||||
|
||||
pickler_class = pickle._Pickler
|
||||
|
||||
def get_dispatch_table(self):
|
||||
return pickle.dispatch_table.copy()
|
||||
|
||||
|
||||
class PyChainDispatchTableTests(AbstractDispatchTableTests):
|
||||
|
||||
pickler_class = pickle._Pickler
|
||||
|
||||
def get_dispatch_table(self):
|
||||
return collections.ChainMap({}, pickle.dispatch_table)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue