When I pass pathlib.Path to asyncio.create_subprocess_exec I get: TypeError: program arguments must be a bytes or text string, not PosixPath It's not so good when subprocess accepts this kind of arguments without issues. So can you add support for this?
All we need is `program = os.fspath(program)` in base_events.py subprocess_exec() method. Is anybody volunteered to make a patch (with test and docs update, sure)?
> 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 (, ) 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.