gh-127647: Add typing.Reader and Writer protocols (#127648)

This commit is contained in:
Sebastian Rittau 2025-03-06 16:36:19 +01:00 committed by GitHub
parent 9c691500f9
commit c6dd2348ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 192 additions and 9 deletions

View file

@ -16,7 +16,7 @@ else:
_setmode = None
import io
from io import (__all__, SEEK_SET, SEEK_CUR, SEEK_END) # noqa: F401
from io import (__all__, SEEK_SET, SEEK_CUR, SEEK_END, Reader, Writer) # noqa: F401
valid_seek_flags = {0, 1, 2} # Hardwired values
if hasattr(os, 'SEEK_HOLE') :