Antoine Pitrou pit...@free.fr added the comment:
Unpickling e.g. StringIO objects doesn't seem to work:
s = pickle.load(open(stringio.pickle, rb))
Traceback (most recent call last):
File stdin, line 1, in module
File /home/antoine/py3k/picklecompat-6137/Lib/pickle.py, line 1351,
in load
Antoine Pitrou pit...@free.fr added the comment:
An improved patch with tests.
It has no tests for fix_imports=False, though.
--
Added file: http://bugs.python.org/file14175/compat_pickle2.diff
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
A new patch which also includes reverse mappings, so that protocol = 2
pickles created with 3.x can also work under 2.x.
(that is, it also solves #3675)
--
dependencies: +Python 2.6 can't read sets pickled with Python 3.0
Added file:
Antoine Pitrou pit...@free.fr added the comment:
Updated patch with a couple of documentation and function prototype fixes.
--
dependencies: -Python 2.6 can't read sets pickled with Python 3.0
Added file: http://bugs.python.org/file14178/compat_pickle4.diff
Antoine Pitrou pit...@free.fr added the comment:
Sorry, last patch had a couple of minor issues
--
Added file: http://bugs.python.org/file14179/compat_pickle5.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6137
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file14177/compat_pickle3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6137
___
Changes by Antoine Pitrou pit...@free.fr:
Removed file: http://bugs.python.org/file14178/compat_pickle4.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6137
___
Matthias Kievernagel mkie...@web.de added the comment:
Applied the patch
http://bugs.python.org/file14124/compat_pickle.diff
to rev. 73106.
Patch applies fine, 'make test' passes
and it solves my problem.
(which is far from a complete test case though
- only 5 small pickles)
Thanks,
Matthias
Antoine Pitrou pit...@free.fr added the comment:
Some comments on the patch:
- I don't understand why you create a static twotuple object rather
than simply using Py_BuildValue((OO), ...). Mutating tuples is bad.
- I don't think you need to call PyDict_Contains() before
PyDict_GetItem(). The
Changes by Antoine Pitrou pit...@free.fr:
--
components: +Library (Lib) -None
priority: - critical
type: - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6137
___
Antoine Pitrou pit...@free.fr added the comment:
If I understood correctly, #3675 is about making pickle data generated
by Python 3 readable by Python 2.
Only if a protocol = 2 is specified. Therefore it seems it's only a
matter of translating module names.
--
Alexandre Vassalotti alexan...@peadrop.com added the comment:
If I understood correctly, #3675 is about making pickle data generated
by Python 3 readable by Python 2. However, this issue is about
compatibility in the other direction—i.e., making Python 2 pickles
readable by Python 3, which is
New submission from Matthias Kievernagel mkie...@web.de:
Hello,
while porting something to Python 3.1a1
I found out that Python 3 cannot load most Python 2 pickles
of any protocol because copy_reg has been renamed to copyreg.
Found this comment by Skip Montanaro in related issue:
Antoine Pitrou pit...@free.fr added the comment:
#3675 is a similar issue, too bad nothing could be done to solve it...
--
nosy: +alexandre.vassalotti, pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6137
14 matches
Mail list logo