[issue17810] Implement PEP 3154 (pickle protocol 4)

Antoine Pitrou report at bugs.python.org
Thu May 2 23:16:18 CEST 2013


Antoine Pitrou added the comment:

> One concern is we need to make sure the C implementation call
> _Pickler_OpcodeBoundary often enough to keep the frames around the
> sizes. For example, batch_save_list and batch_save_dict can currently
> create a frame much larger than expected.

I don't understand how that can happen. batch_list() and batch_dict()
both call save() for each item, and save() calls
_Pickler_OpcodeBoundary() at the end. Have I missed something?

> Interestingly enough, I found pickle, with patch applied, crashes when
> handling such frames:

Interesting, I'll take a look when I have some time.

> Also, I think we should try to make pickletools.dis display the frame
> boundaries to help with debugging. This could be implemented by adding
> an option to pickletools.genops which could be helpful for testing the
> framing implementation as well.

Agreed.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17810>
_______________________________________


More information about the Python-bugs-list mailing list