[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-04 Thread Anil Kulkarni

New submission from Anil Kulkarni:

Pickles created with python 3.4.X will not load with python 3.5.X if they 
include a collections.OrderedDict

To reproduce this issue, simply create a pickle of an OrderedDict on python 
3.4.3 with protocol=2 and try to open it on 3.5. I have included a simple 
script to demonstrate this issue.


I believe this is related to this bug: https://bugs.python.org/issue18473

As to the real-world implications: The python package Celery uses protocol=2 by 
default when serializing with pickle, and thus a celery web running 3.5 cannot 
receive the results of a worker running 3.4
For celery specifically, there is a workaround by setting the PICKLE_PROTOCOL 
environment variable, but this is a core python issue.

P.S. This is the first bug I've filed with python so please let me know if 
there's something else I should be including.

Thanks!

--
files: b.py
messages: 257524
nosy: anilredshift
priority: normal
severity: normal
status: open
title: Pickle protocol 2.0 not loading in python 3.5
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file41503/b.py

___
Python tracker 
<http://bugs.python.org/issue26013>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-05 Thread Anil Kulkarni

Anil Kulkarni added the comment:

Hi Serhiy,

I have done some more investigation this morning and I have come across two 
distinct issues.

The first is that pickles (specifically the pickle in my earlier message) 
created in python 3.0->3.4.3 do not load on python 2.7.10. The exception is 
3.5.1, which produces a pickle that DOES load on 2.7.10
This is unfortunate but not a regression

The second issue is that pickles created by python 3.0->3.4.3 do NOT load in 
python 3.5

This is a regression, in the sense that the pickle created by 3.0->3.4.3 is 
compatible with every other version of python (I haven't tested every single 
combination here, but several)

>From the language perspective, it may be that 3.4.X has incorrect code, but 
>from a compatibility perspective, 3.5 is breaking the promise that pickles are 
>compatible across versions of python.

I write this as justification that python 3.5 should fix this regression in 
compatibility with 3.0 -> 3.4.3. At the very least 3.5 should have a shim 
behavior to fallback and allow it to import these pickles correctly.

Thanks,
Anil

--

___
Python tracker 
<http://bugs.python.org/issue26013>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26013] Pickle protocol 2.0 not loading in python 3.5

2016-01-05 Thread Anil Kulkarni

Anil Kulkarni added the comment:

Ah, sorry I misunderstood. Thanks for the quick turnaround!

--

___
Python tracker 
<http://bugs.python.org/issue26013>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com