subprocess: mark arg keyword-only, fix name, add property (#4024)

This commit is contained in:
Shantanu
2020-05-18 09:59:34 -07:00
committed by GitHub
parent 5fe6a5ba8b
commit 1f7023b957
3 changed files with 8 additions and 7 deletions

View File

@@ -448,6 +448,7 @@ def call(args: _CMD,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: Optional[float] = ...) -> int: ...
# Same args as Popen.__init__
@@ -751,9 +752,9 @@ else:
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
*,
timeout: Optional[float] = ...,
universal_newlines: Literal[True],
) -> str: ...
@overload
@@ -773,8 +774,9 @@ else:
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
*,
timeout: Optional[float] = ...,
) -> bytes: ...
@overload
def check_output(args: _CMD,
@@ -793,8 +795,9 @@ else:
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
*,
timeout: Optional[float] = ...,
) -> Any: ... # morally: -> _TXT
@@ -837,6 +840,7 @@ class Popen(Generic[AnyStr]):
stderr: Optional[IO[AnyStr]]
pid: int
returncode: int
universal_newlines: bool
# Technically it is wrong that Popen provides __new__ instead of __init__
# but this shouldn't come up hopefully?
@@ -1166,7 +1170,7 @@ class Popen(Generic[AnyStr]):
timeout: Optional[float] = ...,
# morally this should be optional
) -> Tuple[AnyStr, AnyStr]: ...
def send_signal(self, signal: int) -> None: ...
def send_signal(self, sig: int) -> None: ...
def terminate(self) -> None: ...
def kill(self) -> None: ...
def __enter__(self: _S) -> _S: ...

View File

@@ -49,7 +49,6 @@ smtpd.SMTPChannel.__init__
smtpd.SMTPServer.__init__
socket.NETLINK_CRYPTO
sre_compile.dis
subprocess.check_output
tracemalloc.Filter.__init__
typing.AbstractSet.isdisjoint
typing.Coroutine.cr_await

View File

@@ -436,8 +436,6 @@ ssl.SSLSocket.recvfrom
ssl.SSLSocket.recvfrom_into
ssl.SSLSocket.sendto
ssl._ASN1Object.__new__
subprocess.Popen.send_signal
subprocess.call
sunau.Au_write.getmark
sunau.Au_write.getmarkers
sunau.Au_write.setcomptype