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

Allow call args of arbitrary type #953

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jamesob
Copy link

@jamesob jamesob commented Aug 11, 2022

Closes #894.

This change allows end-users to specify allowable globals for unpickling, which is done to allow CALL_FUNCTION arguments to be of potentially arbitrary type. I think there's very high convenience here, since it's nice to be able to pass user-defined objects to children as call arguments to encapsulate, for example, complex configuration parameters.

This change also adds default deserialization capabilities for types.SimpleNamespace (in Python 3), since this is another handy and safe container for task arguments.

If there's conceptual interest here, I can add some tests.

@jamesob jamesob changed the title Allow Allow call args of arbitrary type Aug 11, 2022
jamesob added a commit to chaincodelabs/bmon that referenced this pull request Aug 11, 2022
@jamesob jamesob force-pushed the jamesob-22-01-unpickling branch 2 times, most recently from 6980192 to 79a5052 Compare August 11, 2022 19:43
End users can now control which types can be unpickled using
`Connection.pickle_whitelist_patterns`, which allows remote
function call arguments of any type to be used.
@jamesob
Copy link
Author

jamesob commented Nov 1, 2022

Is this project not maintained?

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.

How to use non-primitive task arguments?
1 participant