-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-120380: fix Python implementation of pickle.Pickler
for bytes
and bytearray
objects in protocol version 5.
#120422
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
Conversation
I'll fix the |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix!
I have a few suggestions.
The test_pyclbr
fix would be better off in a separate PR.
The |
This reverts commit 236efc0360a8e1ccfb8890845c2e75944e836179.
This reverts commit 13c969d.
Thank you! |
…ytes` and `bytearray` objects in protocol version 5. (pythonGH-120422) (cherry picked from commit 7595e67) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…ytes` and `bytearray` objects in protocol version 5. (pythonGH-120422) (cherry picked from commit 7595e67) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
GH-120832 is a backport of this pull request to the 3.13 branch. |
GH-120833 is a backport of this pull request to the 3.12 branch. |
…bytes` and `bytearray` objects in protocol version 5. (GH-120422) (GH-120832) gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` and `bytearray` objects in protocol version 5. (GH-120422) (cherry picked from commit 7595e67) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…bytes` and `bytearray` objects in protocol version 5. (GH-120422) (GH-120833) gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` and `bytearray` objects in protocol version 5. (GH-120422) (cherry picked from commit 7595e67) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
…ytes` and `bytearray` objects in protocol version 5. (pythonGH-120422)
…ytes` and `bytearray` objects in protocol version 5. (pythonGH-120422)
…ytes` and `bytearray` objects in protocol version 5. (pythonGH-120422)
The issue is not only for the one in #120380 but also affected 0-copy bytes objects. Actually, the issue is only for the empty case.
I'm not entirely sure it's the simplest way to do it and whether I could perhaps just special-case the empty case.