Skip to content

Conversation

@software-dov
Copy link
Contributor

Clarify that proto-plus messages are not pickleable, describe the
alternative, and give a multiprocessing example.

Note: in the future, we may enable pickling proto-plus messages
through custom extensions as described in
https://docs.python.org/3/library/pickle.html#pickling-class-instances

This is not guaranteed. For the foreseeable future, the preferred
method of serializing and deserializing proto-plus messages is
Message.serialize and Message.deserialize

Closes #162

@software-dov software-dov requested a review from a team as a code owner October 7, 2021 21:44
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 7, 2021
Clarify that proto-plus messages are not pickleable, describe the
alternative, and give a multiprocessing example.

Note: in the future, we _may_ enable pickling proto-plus messages
through custom extensions as described in
https://docs.python.org/3/library/pickle.html#pickling-class-instances

This is _not_ guaranteed. For the foreseeable future, the preferred
method of serializing and deserializing proto-plus messages is
Message.serialize and Message.deserialize
@codecov
Copy link

codecov bot commented Oct 7, 2021

Codecov Report

Merging #260 (af2ca49) into master (6a43682) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #260   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        21    +1     
  Lines          862       933   +71     
  Branches       149       169   +20     
=========================================
+ Hits           862       933   +71     
Impacted Files Coverage Δ
proto/modules.py 100.00% <ø> (ø)
proto/enums.py 100.00% <100.00%> (ø)
proto/fields.py 100.00% <100.00%> (ø)
proto/marshal/collections/repeated.py 100.00% <100.00%> (ø)
proto/marshal/marshal.py 100.00% <100.00%> (ø)
proto/marshal/rules/bytes.py 100.00% <100.00%> (ø)
proto/message.py 100.00% <100.00%> (ø)

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 37c7550...af2ca49. Read the comment docs.

@software-dov software-dov merged commit 6e691dc into googleapis:master Oct 8, 2021
tseaver added a commit that referenced this pull request Dec 8, 2021
FBO of frameworks such as Apache Beam, which use them for sharing
state between trusted hosts.

Closes #260.
tseaver added a commit that referenced this pull request Dec 9, 2021
FBO of frameworks such as Apache Beam, which use them for sharing
state between trusted hosts.

Closes #260.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proto Plus messages are not pickleable

2 participants