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
PEP 554: Issues with data passing and pickle #3309
Comments
@ericsnowcurrently Your view on this? If I were to suggest a colour for this particular bike shed, it would be a length-preceded format. |
hugovk
changed the title
PEP 554 Issues with data passing and pickle
PEP 554: Issues with data passing and pickle
Aug 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe the example program given in PEP 554: https://peps.python.org/pep-0554/#passing-objects-via-pickle has some issues. It's based on a zero value (
b'\x00'
) being a data terminator, but my attempts to recreate this (using threads instead of interpreters) showed thatpickle
will insert zero values in the middle of the data stream:I think the goal here is to simply demonstrate passing pickled objects through the pipe. To that end, it might make a better example to change the reading portion to read a fixed, relatively large, buffer at once and then decode that. Something like:
This is clearly not a general purpose solution, but I think for an example like this, not solving all of the corner cases is OK.
Thanks for all of the tremendous work already put into this! This will be very cool!
The text was updated successfully, but these errors were encountered: