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

Add custom loads and dumps settings #57

Closed
wants to merge 2 commits into from

Conversation

massover
Copy link

This allows me to customize the loads and dumps via settings to use dill instead of the default pickle. If no setting exists, defaults to pickle.loads and pickle.dumps

eg.

# settings.py
PICKLEFIELD_DUMPS = 'dill.dumps'
PICKLEFIELD_LOADS = 'dill.loads'

@massover massover force-pushed the add-loads-and-dumps-settings branch from 4684411 to a075744 Compare May 28, 2021 21:51
@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 99.145% when pulling a075744 on massover:add-loads-and-dumps-settings into c6e018e on gintas:master.

@massover
Copy link
Author

@jayvdb

Collecting https://github.com/django/django/archive/master.tar.gz
  ERROR: HTTP error 404 while getting https://github.com/django/django/archive/master.tar.gz
  ERROR: Could not install requirement https://github.com/django/django/archive/master.tar.gz because of error 404 Client Error: Not Found for url: https://codeload.github.com/django/django/tar.gz/master
ERROR: Could not install requirement https://github.com/django/django/archive/master.tar.gz because of HTTP error 404 Client Error: Not Found for url: https://codeload.github.com/django/django/tar.gz/master for URL https://github.com/django/django/archive/master.tar.gz

This is the error from the build. Is it expected? If not can we re-run ci to get it merged?

@jayvdb
Copy link

jayvdb commented Aug 10, 2021

could be https://github.com/django/django/ now uses 'main' branch ?

@massover
Copy link
Author

could be https://github.com/django/django/ now uses 'main' branch ?

That seems like it!

@massover
Copy link
Author

massover commented Jan 4, 2022

@jayvdb

Since June 15th, 2021, the building on travis-ci.org is ceased. Please use travis-ci.com from now on.

I have updated the tox.ini file but I think that CI is no longer configured to run.

@jayvdb
Copy link

jayvdb commented Jan 4, 2022

ping @gintas

@charettes
Copy link
Collaborator

Closing as the PR has conflict and that in order to support this feature we'd likely want to encode the prefix to the loader / dumper in the payload as well to allow for migration.

Given this projects has pickle on its tin I'm also not sure configurable loader and dumpers are warranted as this is not meant to be a generic serde storage layer.

@charettes charettes closed this Apr 4, 2024
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.

None yet

4 participants