Skip to content

Update asyncio streams stub #2845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions stdlib/3/asyncio/streams.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,15 @@ def start_server(
) -> Generator[Any, None, events.AbstractServer]: ...

if sys.platform != 'win32':
if sys.version_info >= (3, 7):
from os import PathLike
path_type = Union[str, PathLike[str]]
else:
path_type = str

@coroutines.coroutine
def open_unix_connection(
path: str = ...,
path: path_type = ...,
*,
loop: Optional[events.AbstractEventLoop] = ...,
limit: int = ...,
Expand All @@ -54,7 +60,7 @@ if sys.platform != 'win32':
@coroutines.coroutine
def start_unix_server(
client_connected_cb: _ClientConnectedCallback,
path: str = ...,
path: path_type = ...,
*,
loop: Optional[events.AbstractEventLoop] = ...,
limit: int = ...,
Expand Down Expand Up @@ -85,6 +91,10 @@ class StreamWriter:
def write_eof(self) -> None: ...
def can_write_eof(self) -> bool: ...
def close(self) -> None: ...
if sys.version_info >= (3, 7):
def is_closing(self) -> bool: ...
@coroutines.coroutine
def wait_closed(self) -> None: ...
def get_extra_info(self, name: str, default: Any = ...) -> Any: ...
@coroutines.coroutine
def drain(self) -> Generator[Any, None, None]: ...
Expand Down