bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)

Drop isinstance checks from create_subprocess_exec function and let
subprocess module do them.

https://bugs.python.org/issue35246


https://bugs.python.org/issue35246
This commit is contained in:
依云 2019-05-29 14:50:59 +08:00 committed by Miss Islington (bot)
parent e1f95e77e0
commit 744c08a9c7
3 changed files with 12 additions and 5 deletions

View file

@ -1605,11 +1605,6 @@ class BaseEventLoop(events.AbstractEventLoop):
raise ValueError("errors must be None")
popen_args = (program,) + args
for arg in popen_args:
if not isinstance(arg, (str, bytes)):
raise TypeError(
f"program arguments must be a bytes or text string, "
f"not {type(arg).__name__}")
protocol = protocol_factory()
debug_log = None
if self._debug: