Skip to content

Commit 1f7023b

Browse files
authored
subprocess: mark arg keyword-only, fix name, add property (#4024)
1 parent 5fe6a5b commit 1f7023b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

stdlib/3/subprocess.pyi

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ def call(args: _CMD,
448448
restore_signals: bool = ...,
449449
start_new_session: bool = ...,
450450
pass_fds: Any = ...,
451+
*,
451452
timeout: Optional[float] = ...) -> int: ...
452453

453454
# Same args as Popen.__init__
@@ -751,9 +752,9 @@ else:
751752
restore_signals: bool = ...,
752753
start_new_session: bool = ...,
753754
pass_fds: Any = ...,
754-
timeout: Optional[float] = ...,
755755
input: _TXT = ...,
756756
*,
757+
timeout: Optional[float] = ...,
757758
universal_newlines: Literal[True],
758759
) -> str: ...
759760
@overload
@@ -773,8 +774,9 @@ else:
773774
restore_signals: bool = ...,
774775
start_new_session: bool = ...,
775776
pass_fds: Any = ...,
776-
timeout: Optional[float] = ...,
777777
input: _TXT = ...,
778+
*,
779+
timeout: Optional[float] = ...,
778780
) -> bytes: ...
779781
@overload
780782
def check_output(args: _CMD,
@@ -793,8 +795,9 @@ else:
793795
restore_signals: bool = ...,
794796
start_new_session: bool = ...,
795797
pass_fds: Any = ...,
796-
timeout: Optional[float] = ...,
797798
input: _TXT = ...,
799+
*,
800+
timeout: Optional[float] = ...,
798801
) -> Any: ... # morally: -> _TXT
799802

800803

@@ -837,6 +840,7 @@ class Popen(Generic[AnyStr]):
837840
stderr: Optional[IO[AnyStr]]
838841
pid: int
839842
returncode: int
843+
universal_newlines: bool
840844

841845
# Technically it is wrong that Popen provides __new__ instead of __init__
842846
# but this shouldn't come up hopefully?
@@ -1166,7 +1170,7 @@ class Popen(Generic[AnyStr]):
11661170
timeout: Optional[float] = ...,
11671171
# morally this should be optional
11681172
) -> Tuple[AnyStr, AnyStr]: ...
1169-
def send_signal(self, signal: int) -> None: ...
1173+
def send_signal(self, sig: int) -> None: ...
11701174
def terminate(self) -> None: ...
11711175
def kill(self) -> None: ...
11721176
def __enter__(self: _S) -> _S: ...

tests/stubtest_whitelists/py35.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ smtpd.SMTPChannel.__init__
4949
smtpd.SMTPServer.__init__
5050
socket.NETLINK_CRYPTO
5151
sre_compile.dis
52-
subprocess.check_output
5352
tracemalloc.Filter.__init__
5453
typing.AbstractSet.isdisjoint
5554
typing.Coroutine.cr_await

tests/stubtest_whitelists/py3_common.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,6 @@ ssl.SSLSocket.recvfrom
436436
ssl.SSLSocket.recvfrom_into
437437
ssl.SSLSocket.sendto
438438
ssl._ASN1Object.__new__
439-
subprocess.Popen.send_signal
440-
subprocess.call
441439
sunau.Au_write.getmark
442440
sunau.Au_write.getmarkers
443441
sunau.Au_write.setcomptype

0 commit comments

Comments
 (0)