New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Final, full protocol 2 support #82
Conversation
refresh from jsonpickle master
… that, adds support for pickling of iterators.
This looks good. Please run Enable travis notifications on your repo; the tests seem to be failing under python3. There's also an isinstance(basestring, ...) part which might be better written as from jsonpickle.compat import unicode ... isinstance(x, (str, unicode)) to make it compatible across all python versions. |
dba2b02
to
82c5996
Compare
@davvid All done, but I still have tests failing for 3.3. I'll figure that out and update you when it's ready. |
@davvid All done, all tests pass: https://travis-ci.org/marcintustin/jsonpickle/builds/34202884 |
…port for __getinitargs__; this makes for full pickle protocol 2 support. Also has full PY3 compatibility.
And here's the latest CI results for that last commit, which cleans up some comments: https://travis-ci.org/marcintustin/jsonpickle/builds/34204325 |
This should close out #78 |
Thanks Marcin, it's all merged now. I rebased your branch so you might need to I also added a commit that eliminates the need for MAX_ITER since it looks like max_iter is still a generally useful feature so I exposed it in the Thanks a ton for making this happen! 👏 |
@davvid Awesome, thanks for collaborating on that. I'm very pleased to be working on the project. I'm fairly certain this is now the most-pickling pickler for python 2 (in that it supports a proper superset of what python 2 ships with). With the Protocol 4 stuff I plan to add, it will be the most pickling pickler for python in general. As to |
This adds full pickle protocol 2 support:
__reduce__
and__reduce_ex__
may redirect to another object__reduce__
or__reduce_ex__
if provided, in preference to object__dict__
or__slots__
; will not use__reduce__
or__reduce_ex__
for special-cased classes, and will not use the defaultobject
implementations of those methods.max_iter
to avoid livelocking on infinite iterators).__getinitargs__
and unpickling classic classes which take__init__
parameters, even if__getinitargs__
is not provided.@davvid