mirror of
https://github.com/python/cpython.git
synced 2026-01-26 12:55:08 +00:00
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>
Source files for standard library extension modules, and former extension modules that are now builtin modules.