Skip to content
This repository has been archived by the owner on Dec 27, 2021. It is now read-only.

Commit

Permalink
Remove some TODOs from IO classes (python#4654)
Browse files Browse the repository at this point in the history
At this point, it is too late to add methods to these semi-protocols as
it would break lots of existing code. Additionally, we are moving away
from these classes to finer-grained protocols anyway.
  • Loading branch information
srittau authored Nov 1, 2020
1 parent fd6bb39 commit 8aa3346
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions stdlib/3/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ Text = str
TYPE_CHECKING = True

class IO(Iterator[AnyStr], Generic[AnyStr]):
# TODO detach
# TODO use abstract properties
@property
def mode(self) -> str: ...
Expand All @@ -497,7 +496,6 @@ class IO(Iterator[AnyStr], Generic[AnyStr]):
def flush(self) -> None: ...
@abstractmethod
def isatty(self) -> bool: ...
# TODO what if n is None?
@abstractmethod
def read(self, n: int = ...) -> AnyStr: ...
@abstractmethod
Expand All @@ -516,7 +514,6 @@ class IO(Iterator[AnyStr], Generic[AnyStr]):
def truncate(self, size: Optional[int] = ...) -> int: ...
@abstractmethod
def writable(self) -> bool: ...
# TODO buffer objects
@abstractmethod
def write(self, s: AnyStr) -> int: ...
@abstractmethod
Expand All @@ -533,9 +530,6 @@ class IO(Iterator[AnyStr], Generic[AnyStr]):
) -> Optional[bool]: ...

class BinaryIO(IO[bytes]):
# TODO readinto
# TODO read1?
# TODO peek?
@abstractmethod
def __enter__(self) -> BinaryIO: ...

Expand Down

0 comments on commit 8aa3346

Please sign in to comment.