Serhiy Storchaka added the comment:

Oh, sorry, I did not notice test_yaml_linkage. And in any case this test was 
broken (should be rv[1][0] instead of rv[1]).

I don't like to revert these changes, and the reversion can break a code 
written for 3.4 which pickles recursive OrderedDicts. I suggest following 
solution. PyYAML calls __reduce_ex_(2) or __reduce__(). Therefore we can return 
to old behavior with protocol < 3 and left current behavior with protocol >= 3. 
Recursive OrderedDicts will be pickleable with default protocol and with 
highest protocol, and PyYAML will be happy.

Does this patch look good to your?

----------
stage: needs patch -> patch review
Added file: http://bugs.python.org/file37106/OrderedDict_pickle_PyYAML.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17900>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to