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
Release 1.5.1 breaks backward compatibility #351
Comments
My guess from quickly looking at the code is, that the issue comes from this a5725d8 |
@davvid Important problem with backwards compatibility being broken on a patch release |
Hmm I guess it's a question of whether the on-the-wire format is considered part of the semver API or not. What I could do is revert that change and deploy another patch release so that the wire format does not change. Then we'll bump up a major version and re-apply the change. What do you all think? |
I think it's part of the semver API (it affects user-facing function output), so I think you'd need to release 1.5.2 with this fixed and then do 2.0.0 with this change, yeah (also can you comment on #350 please, it's about adding pytest benchmarks to the test suite) |
Just a comment from a person without any deep knowledge of your library: Why not fix the issue by having the dict's occupying the last py/id numbers. That would keep the feature working while not breaking the previous pickles. |
The fix, as you said, should be relatively straightforward, so I think the issue is more so the versioning than the fix. A backwards-incompatible patch release happened, which should be avoided at all costs. |
@davvid Sorry if I'm rushing, but I think it's important to fix this and properly version it ASAP so a new working version can be released. |
Reapply the changes to references to dictionaries. Closes jsonpickle#351 Related-to: jsonpickle#255 jsonpickle#322 Signed-off-by: David Aguilar <davvid@gmail.com>
Sorry for missing that. v1.5.2 has been deployed to pypi. There is also a new major release, v2.0.0, that brings back the dict identity preservation. |
* Theelgirl/master: Update benchmark running instructions Update images Add images Add images Add images Add image benchmarks Add space to makefile for formatting Fix mro error in python 2 looks like i was editing an old version of this file woooo new requirement Add "make benchmark" to commands Fix black and flake8 errors Update BENCHMARKS.md Create BENCHMARKS.md Create jsonpickle_benchmarks.py Closes jsonpickle#351 Signed-off-by: David Aguilar <davvid@gmail.com>
Hi, the recent release of jsonpickle counts object ids differently, which breaks the backward compatibility.
A way to reproduce
Dump
Output1
Output2
Load
Obviously, when we try to load the Output1 pickle with jsonpickle 1.5.1 the id mismatch causes incorrect reconstruction:
Output3 - correctly reconstructs the
obj
under both indexesOutput4 - incorrectly reconstructs a dictionary on the index
b
The text was updated successfully, but these errors were encountered: