-
Notifications
You must be signed in to change notification settings - Fork 184
Use protocol=pickle.HIGHEST_PROTOCOL by default #127
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #127 +/- ##
==========================================
+ Coverage 83.99% 84.08% +0.08%
==========================================
Files 2 2
Lines 531 534 +3
Branches 96 97 +1
==========================================
+ Hits 446 449 +3
Misses 63 63
Partials 22 22
Continue to review full report at Codecov.
|
tox.ini
Outdated
| @@ -1,5 +1,5 @@ | |||
| [tox] | |||
| envlist = py26, py27, py33, py34, py35, pypy, pypy3 | |||
| envlist = py26, py27, py33, py34, py35,i py36, pypy, pypy3 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the i do here? Thought that would make Travis fail, but it has not. 😊
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, will fix
7ae75a1 to
8053a83
Compare
|
Would it make sense to define Not that I am interested, but maybe someone is? I can think of someone that "accidentally" stores serialized objects for a long time, then one day tries to run everything again and it does not work. At least they can |
Certainly not by early-binding the value as in |
|
@pitrou Maybe Pickler.__init__(self, file, protocol=None):
if protocol is None:
protocol = DEFAULT_PROTOCOL? Maybe there is a better way. Anyway if that is too much just drop it, it was just an idea (and could simply be added to an issue for the future). 😂 |
|
This is what I am trying to do but that does not work under Python 2 for some reason. |
|
I don't think there is much point in making |
|
Alright. I still changed the code to support |
tox.ini
Outdated
| @@ -1,5 +1,5 @@ | |||
| [tox] | |||
| envlist = py26, py27, py33, py34, py35, pypy, pypy3 | |||
| envlist = py26, py27, py33, py34, py35, py36, pypy, pypy3 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could probably remove py26 and py33, since we don't support those versions anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
814771e to
81ff9ac
Compare
|
If we merge this and if we still plan to do a 0.4.2 release we should be careful to branch 0.4.X from the 0.4.1 tag and only put bugfixes in the 0.4.X branch and not the content of this PR. |
|
Actually, we should have @nikhaldi weigh in since he took the effort of reporting the issue and attempting a fix + tests (this last part is super important to me). |
|
If you're planning to put out 0.5.0 soon, I'm in favor of including my fix #128 as is. Here's why: I think documentation & design work is needed to address the general issue of how compatibility across versions should work going forward. I think this is not trivial and I don't know who would do this work and when. I don't know the details of how cloudpickle is organized as a project, but extrapolating from others I assume it could be months out? During that time it would be kinder to users to have at least some backwards compatibility. You'll very likely have to fully break compatibility again when more fundamental versioning changes are made. |
|
I would say, if I may jump in, include it for 0.4.2 (a fix release) and do not include it for 0.5.0. Don't need to leave a branch hanging for that release, you may simply add the fix, release and revert the fix. As long as the version is 0.x.y I think:
Anyway there should be a "formal" policy about the finally chosen rules or release strategy. |
Basically, if There is no organized practice other than that there are several distributed systems libraries that rely on cloudpickle underneath. The primary maintainers run systems where we control the deployments of workers and servers such that versions are consistent. Speaking a little more for my largely undefined role -- I tend to act as a steward of the project, helping people collaborate and come to conclusions, even if I'm merely a moderator.
I definitely agree that we should be kinder in terms of backwards compatibility. This is the first time it has occurred. |
|
If it's possible, I'd rather have someone take the time (probably not much) to implement the suggestion in #128 (comment), so at least the breakage makes us more future-proof. |
81ff9ac to
6bf7406
Compare
|
@pitrou's suggestion was implemented and merged in master and then released as 0.4.2. I rebased this PR on top of master. If CI is still green and people agree I can merge and release 0.5.0. |
|
Thanks all! 0.5.0 is online on PyPI. |
This is a fix for #123.