Skip to content

Compatibility: expose cloudpickle.CloudPickler also as cloudpickle.Pickler - #392

Merged
pierreglaser merged 6 commits into
cloudpipe:masterfrom
twoertwein:master
Aug 13, 2020
Merged

Compatibility: expose cloudpickle.CloudPickler also as cloudpickle.Pickler#392
pierreglaser merged 6 commits into
cloudpipe:masterfrom
twoertwein:master

Conversation

@twoertwein

Copy link
Copy Markdown
Contributor

Some people/projects expect that a module implementing a Pickler, provides the Pickler class as <module>.Pickler, for example pytorch/pytorch#38098.

Since the current version of Cloudpickler doesn't define cloudpickle.Pickler, let's define cloudpickle.Pickler as cloudpickle.CloudPickler.

Fixes#366

@codecov

codecovBot commented Jul 22, 2020

Copy link
Copy Markdown

Codecov Report

Merging #392 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@## master #392 +/- ##
=======================================
Coverage 91.61% 91.61% =======================================
Files 3 3 Lines 656 656 Branches 135 135 =======================================
Hits 601 601 Misses 34 34 Partials 21 21 

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4510be8...dde84cf. Read the comment docs.

@pierreglaserpierreglaser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @twoertwein. This also needs a changelog entry - can you write one?
Regarding the README, issue, I think that at some point we should make it clear that accessing cloudpickle.Pickler is now the recommended way to use cloudpickle's Pickler subclass. But it is not urgent, so I won't mind if we leave the README as it is for now.

Comment threadtests/cloudpickle_test.py Outdated
twoertweinand others added 2 commits August 12, 2020 14:59
Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
Comment threadCHANGES.md Outdated
Comment threadCHANGES.md Outdated
Comment threadcloudpickle/__init__.py
@pierreglaser

Copy link
Copy Markdown
Member

Alright, let's merge! Thank you very much @twoertwein.

@pierreglaser
pierreglaser merged commit a3d2a19 into cloudpipe:masterAug 13, 2020
@pierreglaser

pierreglaser commented Aug 13, 2020

Copy link
Copy Markdown
Member

I'll do a release of cloudpickle in the near future (to whom it may concern).

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose CloudPickler as Pickler instead of pickle.Pickler

2 participants

@twoertwein@pierreglaser