[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/744c08a9c75a1a53b7a6521fcee3e7c513919ff9


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 work in the POSIX part but there is an issue 
(issue33617, issue31961) in Windows part: subprocess.list2cmdline doesn't 
accept pathlib.Path.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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?

--
components: asyncio
messages: 329907
nosy: asvetlov, lilydjwg, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.create_subprocess_exec doesn't accept pathlib.Path like 
subprocess does
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com