]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629) (#143872)
authorVictor Stinner <vstinner@python.org>
Thu, 15 Jan 2026 16:02:46 +0000 (17:02 +0100)
committerGitHub <noreply@github.com>
Thu, 15 Jan 2026 16:02:46 +0000 (16:02 +0000)
commit1241432150f6342e3d38c5a80a19c8c157a4ebe8
treea3c3cb382bb247bbf51c447ae22116c370481a82
parentbbd11568a71a47df934d1eb9318b5177ae7bc8a7
[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)

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]