Skip to content
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

FIX do not override Pickler's dispatch_table #203

Merged

Conversation

pierreglaser
Copy link
Collaborator

If a Pickler instance already has methods in its dispatch table, do not override them. This bug showed up in cloudpipe/cloudpickle#253 and running this benchmark where the Cloudpickler instances derives from the C _Pickler and most custom saving methods are inside dispatch_table, not dispatch.

Given the current set_loky_pickler structure (private, nested CustomizablePickler class), it is hard to write a proper test for it.

If a Pickler instance already has methods in its dispatch table, do not
override them. This bug showed up in
cloudpipe/cloudpickle#253, where the
Cloudpickler instances derives from the C Pickler, and most custom
saving methods are inside dispatch_table, not dispatch.
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.

2 participants