Skip to content

Conversation

@vstinner
Copy link
Member

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 c461aa9)

(cherry picked from commit 1241432)

…ite (python#143629) (python#143872)

pythongh-143602: Fix duplicate buffer exports in io.BytesIO.write (python#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 c461aa9)

Co-authored-by: zhong <60600792+superboy-zjc@users.noreply.github.com>
(cherry picked from commit 1241432)
@vstinner vstinner changed the title [3.14] gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629) (#143872) [3.13] gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629) (#143872) Jan 15, 2026
@vstinner vstinner merged commit 201e819 into python:3.13 Jan 16, 2026
42 checks passed
@vstinner vstinner deleted the bytesio_write13 branch January 16, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant