]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629) (#143872...
authorVictor Stinner <vstinner@python.org>
Fri, 16 Jan 2026 13:23:03 +0000 (14:23 +0100)
committerGitHub <noreply@github.com>
Fri, 16 Jan 2026 13:23:03 +0000 (14:23 +0100)
commit201e8193553a79529ee508c8f457b21bd6da665f
tree21c043879f365e00f8003d1cafb5674d99c24021
parentd7f11ea0548c255aec83473538d02b454802dce9
[3.13] gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629) (#143872) (#143878)

[3.14] gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629) (#143872)

gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629)

Fix an inconsistency issue in io.BytesIO.write() where the buffer was exported
twice, which could lead to unexpected data overwrites and position drift when
the buffer changes between exports.

(cherry picked from commit c461aa99e2fabbaf5859c0a8a93e08306ee8115d)

(cherry picked from commit 1241432150f6342e3d38c5a80a19c8c157a4ebe8)

Co-authored-by: zhong <60600792+superboy-zjc@users.noreply.github.com>
Lib/_pyio.py
Lib/test/test_memoryio.py
Misc/NEWS.d/next/Library/2026-01-09-12-37-19.gh-issue-143602.V8vQpj.rst [new file with mode: 0644]