Skip to content

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

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

Merged
merged 6 commits into from
Aug 13, 2020

Conversation

twoertwein
Copy link
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
Copy link

codecov bot commented Jul 22, 2020

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.

Copy link
Member

@pierreglaser pierreglaser left a comment

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.

@pierreglaser
Copy link
Member

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

@pierreglaser pierreglaser merged commit a3d2a19 into cloudpipe:master Aug 13, 2020
@pierreglaser
Copy link
Member

pierreglaser commented Aug 13, 2020

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

Sign up for free to 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