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

2019-05-29 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

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

2019-05-29 Thread miss-islington
miss-islington added the comment: New changeset 744c08a9c75a1a53b7a6521fcee3e7c513919ff9 by Miss Islington (bot) (依云) in branch 'master': bpo-35246: fix support for path-like args in asyncio subprocess (GH-13628)

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

2019-05-28 Thread lilydjwg
Change by lilydjwg : -- keywords: +patch pull_requests: +13527 stage: -> patch review pull_request: https://github.com/python/cpython/pull/13628 ___ Python tracker ___

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

2019-05-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: 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. --

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

2019-05-27 Thread lilydjwg
lilydjwg 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

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

2019-05-27 Thread Andrew Svetlov
Change by Andrew Svetlov : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2019-05-27 Thread Andrew Svetlov
Andrew Svetlov added the comment: 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)? -- ___ Python tracker

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

2018-11-14 Thread lilydjwg
New submission from lilydjwg : 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?