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
bpo-44439: BZ2File.write() / LZMAFile.write() handle buffer protocol correctly #26764
Conversation
1861618
to
fbec8e5
No longer use len() to get the length of the input data. For some buffer protocol objects, the length obtained by using len() is wrong.
|
Thanks @animalize for the PR, and @serhiy-storchaka for merging it |
|
Sorry, @animalize and @serhiy-storchaka, I could not cleanly backport this to |
|
GH-26845 is a backport of this pull request to the 3.10 branch. |
…correctly (pythonGH-26764) No longer use len() to get the length of the input data. For some buffer protocol objects, the length obtained by using len() is wrong. (cherry picked from commit bc6c12c) Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
|
|
…correctly (pythonGH-26764) No longer use len() to get the length of the input data. For some buffer protocol objects, the length obtained by using len() is wrong.


The underlying C codes handle buffer protocol objects correctly, so only fix the wrong length in Python code is fine.
https://bugs.python.org/issue44439
The text was updated successfully, but these errors were encountered: