-
Notifications
You must be signed in to change notification settings - Fork 167
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
WIP: Optionally use pickle5 #364
Conversation
Before doing more work here, would be curious to get people's thoughts on this approach 🙂 Does this generally seem reasonable? Or would we want to approach this in a different way? |
The general approach (optionally rely on |
Tries to use `pickle5` for `pickle` if available on older Python versions.
4228e6f
to
e98d98e
Compare
Codecov Report
@@ Coverage Diff @@
## master #364 +/- ##
===========================================
- Coverage 92.95% 59.95% -33.01%
===========================================
Files 2 3 +1
Lines 809 824 +15
Branches 164 168 +4
===========================================
- Hits 752 494 -258
- Misses 29 313 +284
+ Partials 28 17 -11
Continue to review full report at Codecov.
|
It seems `pickle5` doesn't include this or an alias to it. So just import it from `pickle` directly.
As `CellType` was added in Python 3.8, it won't be available in Python 3.6 or 3.7. So check before adding it to the dispatch table.
49ade3f
to
8c6518b
Compare
Have run into some test issues around |
With regards to the The clean way though would be to refactor the organization of the reducers in |
If we refactor the reducers, we should make a best effort to still make it possible to unpickle older pickles. Even if this is not part of the cloudpickle public API (see the diclaimer for the scope of the project in the README) it would be great to preserve backward compat with previous version pickles if not too costly from a maintenance / tech debt point of view. |
That is a very good remark @ogrisel. Would the "deprecation" cycle I suggested in #359 (comment) work for you? IMHO it achieves a good tradeoff between all the stakes (code complexity, user friendliness, contract of |
+1 for deprecation warnings when possible. |
Closing as this has been superseded by PR ( #370 ). |
Fixes #179
Optionally uses
pickle5
incloudpickle
.