All we need is program = os.fspath(program) in base_events.py subprocess_exec() method.
I don't think so. The arguments could be pathlib.Path too.
We can update the isinstance(arg, (str, bytes)) check so the args pass on to subprocess.Popen. It will work in the POSIX part but there is an issue (bpo-33617, bpo-31961) in Windows part: subprocess.list2cmdline doesn't accept pathlib.Path.
Aha, I see. You are right.
Let's drop checks for cmd/program/args types but left to subprocess do these checks.
This approach avoiding complex checking/converting logic in asyncio itself and reduces code duplication.
New changeset 744c08a by Miss Islington (bot) (依云) in branch 'master': bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628) 744c08a
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: