[issue41753] subprocess.run on windows does not convert path to string

2020-09-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Also, 3.7 only get security patches. -- nosy: +terry.reedy ___ Python tracker ___ ___

[issue41753] subprocess.run on windows does not convert path to string

2020-09-11 Thread Terry J. Reedy
Change by Terry J. Reedy : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Can't pass Path like objects to subprocess api's on Windows. ___ Python tracker

[issue41753] subprocess.run on windows does not convert path to string

2020-09-09 Thread Eryk Sun
Eryk Sun added the comment: 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 and 3.7. --- [1]

[issue41753] subprocess.run on windows does not convert path to string

2020-09-09 Thread Kaushik G
Kaushik G added the comment: Thank you for your response. There are two concerns I have here. 1. Python's promise of being straightforward. In MOST cases pathlib.Path objects do the right thing, casting to a string such that pathlib.Path is a drop in replacement. This exception is

[issue41753] subprocess.run on windows does not convert path to string

2020-09-09 Thread Eric V. Smith
Eric V. Smith added the comment: Among others, see: issue 41649 issue 31961 In general, I think the consensus is that the caller should convert each argument to a string. It's not subprocess's job to convert each parameter to a string. -- nosy: +eric.smith

[issue41753] subprocess.run on windows does not convert path to string

2020-09-09 Thread Kaushik G
New submission from Kaushik G : a call of the form `subprocess.run([x, y, z])` where one of the elements is a `pathlib.Pat`h fails on windows because the path is not converted to a string as it should. This works fine (as expected) on macOS and Linux. A typical error message is: `TypeError: