[issue35246] asyncio.create_subprocess_exec doesn't accept pathlib.Path like subprocess does

lilydjwg report at bugs.python.org
Tue May 28 00:38:16 EDT 2019


lilydjwg <lilydjwg at gmail.com> added the comment:

> 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 (issue33617, issue31961) in Windows part: subprocess.list2cmdline doesn't accept pathlib.Path.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35246>
_______________________________________


More information about the Python-bugs-list mailing list