[issue41649] Can't pass Path like objects to subprocess api's on Windows.

2020-09-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: I closed #41753 as a duplicate of this. On that issue, Eryk Sun said "The underlying subprocess.Popen class was updated in 3.8 to support path-like objects in `args` (with shell=False) and `executable` on Windows [1]. This change was not backported to 3.6

[issue41649] Can't pass Path like objects to subprocess api's on Windows.

2020-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not understand how you get this result. At that line of code arg can only be string, because it is a result of os.fsdecode(). Are you sure that you use Python version which includes issue31961 changes? What exactly Python version do you use?

[issue41649] Can't pass Path like objects to subprocess api's on Windows.

2020-08-28 Thread Jani Mikkonen
Jani Mikkonen added the comment: @xtreak I went thru the comments of the report you linked. It definitely looks like the discussion was related but it didnt really fix the issue here. https://bugs.python.org/issue31961#msg311775 without trying out, that comment actually touches the underly

[issue41649] Can't pass Path like objects to subprocess api's on Windows.

2020-08-27 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue31961 -- nosy: +serhiy.storchaka, xtreak ___ Python tracker ___ _

[issue41649] Can't pass Path like objects to subprocess api's on Windows.

2020-08-27 Thread Jani Mikkonen
New submission from Jani Mikkonen : Following code: ``` from pathlib import Path import os import subprocess dir_name = os.environ.get("WORKSPACE", None) or "." output_directory = Path(dir_name) / "results" res = subprocess.run(["mytest", "--output", output_directory]) ``` Works on macos and