gh-60107: Remove a copy from RawIOBase.read (#141532)

If the underlying I/O class keeps a reference to the memory, raise BufferError.

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Cody Maloney 2025-11-20 09:37:04 -08:00 committed by GitHub
parent 722f4bb8c9
commit e90061f5f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 39 additions and 11 deletions

View file

@ -793,6 +793,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(symmetric_difference_update)
STRUCT_FOR_ID(tabsize)
STRUCT_FOR_ID(tag)
STRUCT_FOR_ID(take_bytes)
STRUCT_FOR_ID(target)
STRUCT_FOR_ID(target_is_directory)
STRUCT_FOR_ID(task)