Skip to content

Commit 3ebe3d7

Browse files
authored
Revert "gh-129005: _pyio.BufferedIO remove copy on readall (#129454)" (#129500)
This reverts commit e1c4ba9.
1 parent c07ac3c commit 3ebe3d7

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

Lib/_pyio.py

-3
Original file line numberDiff line numberDiff line change
@@ -1062,9 +1062,6 @@ def _read_unlocked(self, n=None):
10621062
if chunk is None:
10631063
return buf[pos:] or None
10641064
else:
1065-
# Avoid slice + copy if there is no data in buf
1066-
if not buf:
1067-
return chunk
10681065
return buf[pos:] + chunk
10691066
chunks = [buf[pos:]] # Strip the consumed bytes.
10701067
current_size = 0

Misc/NEWS.d/next/Library/2025-01-29-00-00-01.gh-issue-129005.aV_3O8.rst

-2
This file was deleted.

0 commit comments

Comments
 (0)