[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2019-08-02 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2019-05-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9e3c4526394856d6376eed4968d27d53e1d69b7d by Serhiy Storchaka in branch 'master': bpo-31961: Fix support of path-like executables in subprocess. (GH-5914) https://github.com/python/cpython/commit/9e3c4526394856d6376eed4968d27d53e1d69b7d

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2019-05-17 Thread Cheryl Sabella
Cheryl Sabella added the comment: gregory.p.smith, I believe Serhiy was looking for a review on PR5914. Maybe it's not too late for this to get into 3.8? Thanks! -- nosy: +cheryl.sabella ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-11-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Gregory, could you please make a look at PR 5914? Differences from PR 4329: * Any item of args can be an iterable of bytes and path-like objects on Windows (not just a first item as in PR 4329). * Accepts bytes and path-like objects as executable on

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-27 Thread Ned Deily
Ned Deily added the comment: Thanks for everyone's input and thanks for the PRs! Since there are still outstanding review comments, I decided to revert this from both master and 3.7 for 3.7.0b2. I would suggest getting a polished version stabilized in master for 3.8.0. We

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-27 Thread Ned Deily
Ned Deily added the comment: New changeset b7dcae358e9d5a3ac9dafec9f6b64e9a66843ad8 by Ned Deily (Miss Islington (bot)) in branch '3.7': Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (GH-5912) (GH-5931)

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-27 Thread Ned Deily
Ned Deily added the comment: New changeset be50a7b627d0aa37e08fa8e2d5568891f19903ce by Ned Deily (Serhiy Storchaka) in branch 'master': Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (#5912)

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-27 Thread miss-islington
Change by miss-islington : -- pull_requests: +5703 ___ Python tracker ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +5685 ___ Python tracker ___ ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are two alternate PRs. PR 5912 removes this feature. PR 5914 fixes it. -- ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-26 Thread Ned Deily
Ned Deily added the comment: We should either remove the entry in Misc/NEWS/3.7.0b1.rst or, perhaps better, add a line to it noting that it was removed in 3.7.0b2. -- ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: Ned: when removing a feature added in beta1, should we remove the original NEWS entry created for it? Or add a new NEWS entry that states that the previous feature has been reverted? -- ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +5683 stage: needs patch -> patch review ___ Python tracker ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-26 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm fine with undoing this for 3.7 in light of the many things we don't do "right" all over the place with path like objects. subprocess still presents as a mix of high and low level APIs so if we accept a path like object in a subset of

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-25 Thread Ned Deily
Ned Deily added the comment: What's the status of this issue? We need to make a decision soon about what to do for 3.7.0. -- ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a complex issue for doing it right. Related issues -- supporting bytes paths on Windows, supporting path-like executable, deprecating some corner cases. I suggest to revert this change now and try to do it right in 3.8.

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-07 Thread Eryk Sun
Eryk Sun added the comment: If a PathLike args value is supported in Windows, then it must be processed through list2cmdline, in case it needs to be quoted. Also, the preferred usage is to pass args as a list when shell is false. This common case shouldn't be penalized as

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-06 Thread R. David Murray
R. David Murray added the comment: "I thought the case when args is a string and shell=False is deprecated." IMO it ought to be :) See issue 7839 for background. -- nosy: +r.david.murray ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, my mistake. I thought the case when args is a string and shell=False is deprecated. -- ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: Nathaniel's specific description of a problem is wrong. A Path with embedded spaces is treated no different than one without by default. Where things change, and what needs fixing, is when shell=True is passed. In that case a PathLike

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-06 Thread Anders Lorentsen
Anders Lorentsen added the comment: What do you mean "is a bug", and "the PR would encourage this"? Can't it be fixed? Are you saying that just because it is a bug now, we should be discouraged from making it work in the way you'd expect it to work? If `exe` is a path,

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Anders, the problem is that running subprocess.run(executable) instead of subprocess.run([executable]) (where executable is a path to a program) is a bug. For example it doesn't work if the path contains spaces. And PR 4329

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-05 Thread Anders Lorentsen
Anders Lorentsen added the comment: > # runs this weird file > subprocess.run([bin]) > # Currently an error; if this is implemented, would run > # /bin/ls, and pass it the -l argument. Refers to something > # completely different than our .exists() call above. I do not

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-05 Thread Gregory P. Smith
Change by Gregory P. Smith : -- nosy: +ned.deily priority: normal -> release blocker versions: +Python 3.8 ___ Python tracker ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: I agree with both of you at this point. TODO: Revert the PR and backport that to the 3.7 branch (i'll take care of it) -- resolution: fixed -> stage: resolved -> needs patch ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-05 Thread Nathaniel Smith
Nathaniel Smith added the comment: I think I agree with Serhiy here... the whole difference between run([a]) and run(a) is that in the first case 'a' is treated as a path, and in the second it isn't. This distinction long predates pathlib. Say I have an oddly named binary

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't remember all details, here is what I have found. Issue28230 and issue28231 -- the support of path-like object was added only for external names (paths of archives, paths of added files, paths for extraction), but not

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-05 Thread Gregory P. Smith
Gregory P. Smith added the comment: got any pointers to those? I want to familiarize myself with existing arguments for/against such a feature in subprocess to decide. -- ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The bug itself can be easily fixed. But I think this PR shouldn't be merged at first place. Not all functions should accept path-like objects for arbitrary arguments. Only if the argument semantically is a path, a path-like

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-04 Thread Gregory P. Smith
Gregory P. Smith added the comment: Don't revert something just because you found a bug, we can fix it. fwiw, the PR passed appveyor's Windows run: https://ci.appveyor.com/project/python/cpython/build/3.7build11551 So if there's a bug, we're missing some kind of test

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually this feature looks wrong to me. The args argument is either a sequence containing a program name and arguments, or a command line string. In the first case supporting path-like objects makes sense, and this was

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This made tests failing on Windows. See issue32764. -- nosy: +serhiy.storchaka stage: commit review -> needs patch status: closed -> open ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-01-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: Thanks for the PR! I accepted it as this makes sense as a feature. pathlib all the things! I think the code be polished up a bit to not rely on catching TypeError but this gets the feature in before the 3.7 feature freeze (just). If

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-01-29 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith versions: -Python 3.6, Python 3.8 ___ Python tracker ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2018-01-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset dd42cb71f2cb02f3a32f016137b12a146bc0d0e2 by Gregory P. Smith (Anders Lorentsen) in branch 'master': bpo-31961: subprocess now accepts path-like args (GH-4329)

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-07 Thread Anders Lorentsen
Anders Lorentsen added the comment: While researching this, I discovered that on MS Windows >>> subprocess.run([pathlike_object, additional_arguments]) did not run like it did on Posix. My PR includes this problem and it's fix. --

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-07 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +4285 stage: -> patch review ___ Python tracker ___

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Anders Lorentsen
Anders Lorentsen added the comment: I was able to make a test that reproduces your code, and expectedly fails. Also implemented a fix for it. See a temporary diff here: https://pastebin.com/C9JWkg0i However, there is also a specific MS Windows version of _execute_child() (a

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Roy Williams
Roy Williams added the comment: Ignore my comment re: pathlib, it looks like PathLike is defined in `os` and not `pathlib`. -- ___ Python tracker

[issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args

2017-11-06 Thread Roy Williams
New submission from Roy Williams : Repro: ```python from pathlib import Path import subprocess subprocess.run([Path('/bin/ls')]) # Works Fine subprocess.run(Path('/bin/ls')) # Fails ``` The problem seems to originate from here: