[issue29628] struct objects can no longer be pickled

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As a workaround you can make Struct pickleable: from struct import Struct import copy, copyreg def pickle_struct(s): return Struct, (s.format,) copyreg.pickle(Struct, pickle_struct) s1 = Struct('

[issue29628] struct objects can no longer be pickled

2017-02-22 Thread mesheb82
mesheb82 added the comment: Thank you. On Wed, Feb 22, 2017 at 9:22 PM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > > When I run the following code on Windows/Linux for < Python 3.6, I have > no problems. > > You have a problem. Did you try to

[issue29628] struct objects can no longer be pickled

2017-02-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > When I run the following code on Windows/Linux for < Python 3.6, I have no > problems. You have a problem. Did you try to use the copied object? It is a broken Struct object. >>> copied = copy.deepcopy(this_fails) >>> copied.format >>> copied.size -1 >>>

[issue29628] struct objects can no longer be pickled

2017-02-22 Thread mesheb82
New submission from mesheb82: When I run the following code on Windows/Linux for < Python 3.6, I have no problems. When I run in Python 3.6.0, I get the subsequent traceback. I checked the release notes and only saw the following struct module note related to half-floats: Issue #11734 from