SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

72153 0 0 Python

gh-143689: Fix BufferedReader.read1 leaving object in reentrant state on error (#143690)

BufferedReader.read1() could leave the buffered object in a
reentrant (locked) state when an exception was raised while
allocating the output buffer.

This change ensures the internal buffered lock is always released
on error, keeping the object in a consistent state after failures.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Y
Yongtao Huang committed
375e372c6661d818b85d1405c5ba681a06988ebd
Parent: 72bacb0
Committed by GitHub <noreply@github.com> on 1/19/2026, 2:09:30 PM