Skip to content

Commit aa4d6d8

Browse files
asyncio: fix default for subprocess_exec (#9561)
1 parent eb4d170 commit aa4d6d8

File tree

7 files changed

+10
-4
lines changed

7 files changed

+10
-4
lines changed

stdlib/asyncio/base_events.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class BaseEventLoop(AbstractEventLoop):
399399
stdout: int | IO[Any] | None = -1,
400400
stderr: int | IO[Any] | None = -1,
401401
universal_newlines: Literal[False] = False,
402-
shell: Literal[True] = ...,
402+
shell: Literal[False] = False,
403403
bufsize: Literal[0] = 0,
404404
encoding: None = None,
405405
errors: None = None,

stdlib/asyncio/events.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ class AbstractEventLoop:
542542
stdout: int | IO[Any] | None = -1,
543543
stderr: int | IO[Any] | None = -1,
544544
universal_newlines: Literal[False] = ...,
545-
shell: Literal[True] = ...,
545+
shell: Literal[False] = ...,
546546
bufsize: Literal[0] = ...,
547547
encoding: None = ...,
548548
errors: None = ...,

tests/stubtest_allowlists/py310.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ _collections_abc.ItemsView.__reversed__
77
_collections_abc.KeysView.__reversed__
88
_collections_abc.ValuesView.__reversed__
99
_weakref.ProxyType.__reversed__ # Doesn't really exist
10+
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
11+
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
1012
asyncio.Future.__init__ # Usually initialized from c object
1113
asyncio.futures.Future.__init__ # Usually initialized from c object
1214
builtins.float.__setformat__ # Internal method for CPython test suite

tests/stubtest_allowlists/py311.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ types.GenericAlias.__getattr__
101101
types.GenericAlias.__mro_entries__
102102
weakref.ProxyType.__reversed__ # Doesn't really exist
103103
inspect._ParameterKind.description # Still exists, but stubtest can't see it
104+
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
105+
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
104106

105107
# C signature is broader than what is actually accepted
106108
ast.Bytes.__new__

tests/stubtest_allowlists/py38.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ ast.Ellipsis.__new__
1111
ast.NameConstant.__new__
1212
ast.Num.__new__
1313
ast.Str.__new__
14+
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
15+
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
1416
asyncio.Future.__init__ # Usually initialized from c object
1517
asyncio.futures.Future.__init__ # Usually initialized from c object
1618
asyncio.locks._ContextManagerMixin.__enter__ # Always raises; deliberately omitted from the stub

tests/stubtest_allowlists/py39.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ ast.Index.__new__
1313
ast.NameConstant.__new__
1414
ast.Num.__new__
1515
ast.Str.__new__
16+
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
17+
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
1618
asyncio.Future.__init__ # Usually initialized from c object
1719
asyncio.futures.Future.__init__ # Usually initialized from c object
1820
builtins.float.__setformat__ # Internal method for CPython test suite

tests/stubtest_allowlists/py3_common.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,10 @@ argparse.Namespace.__getattr__ # The whole point of this class is its attribute
3434
asynchat.async_chat.encoding # Removal planned for 3.12, can add if someone needs this
3535
asynchat.async_chat.use_encoding # Removal planned for 3.12, can add if someone needs this
3636
asynchat.find_prefix_at_end # Removal planned for 3.12, can add if someone needs this
37-
asyncio.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
3837
# Condition functions are exported in __init__
3938
asyncio.Condition.acquire
4039
asyncio.Condition.locked
4140
asyncio.Condition.release
42-
asyncio.base_events.BaseEventLoop.subprocess_exec # BaseEventLoop adds several parameters and stubtest fails on the difference if we add them
4341
# Condition functions are exported in __init__
4442
asyncio.locks.Condition.acquire
4543
asyncio.locks.Condition.locked

0 commit comments

Comments
 (0)