Uh oh!
There was an error while loading. Please reload this page.
WIP: Optionally use pickle5 - #364
Conversation
jakirkham
commented
May 7, 2020
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? |
pierreglaser
commented
May 8, 2020
The general approach (optionally rely on |
Tries to use `pickle5` for `pickle` if available on older Python versions.
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.
jakirkham
commented
May 11, 2020
Have run into some test issues around |
pierreglaser
commented
May 12, 2020
With regards to the The clean way though would be to refactor the organization of the reducers in |
ogrisel
commented
May 12, 2020
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 |
ogrisel
commented
May 14, 2020
+1 for deprecation warnings when possible. |
jakirkham
commented
May 29, 2020
Closing as this has been superseded by PR ( #370 ). |
Fixes#179
Optionally uses
pickle5incloudpickle.