You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows #77798
bpo-31961: subprocess._execute_child doesn't accept a single PathLike argument for args
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-08-02.22:39:40.618>created_at=<Date2018-05-23.14:14:04.178>labels= ['3.8', 'type-feature', 'library', 'OS-windows']
title='subprocess.Popen etc do not accept os.PathLike in passed sequence on Windows'updated_at=<Date2019-08-02.22:39:40.618>user='https://github.com/altendky'
PS C:\Users\FSTAB\Desktop\g\20\grid-tied> py -3.6 -c "import os, pathlib, subprocess; subprocess.run([pathlib.Path()])"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Program Files\Python36\lib\subprocess.py", line 403, in runwith Popen(*popenargs, **kwargs) as process:
File "C:\Program Files\Python36\lib\subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\Program Files\Python36\lib\subprocess.py", line 964, in _execute_child
args = list2cmdline(args)
File "C:\Program Files\Python36\lib\subprocess.py", line 461, in list2cmdline
needquote = (""in arg) or ("\t"in arg) ornot arg
TypeError: argument of type 'WindowsPath' is not iterable
I totally failed to fill out the metadata, sorry. I would personally consider this more of a bugfix than a feature enhancement, but I don't know how that's decided exactly. It's also quite small. There are a couple other open issues related to full os.PathLike protocol support.
Activity
altendky commentedon May 23, 2018
PR to follow soon.
vstinner commentedon May 23, 2018
That's a feature request for Python 3.8 ;-)
Cool!
altendky commentedon May 23, 2018
I totally failed to fill out the metadata, sorry. I would personally consider this more of a bugfix than a feature enhancement, but I don't know how that's decided exactly. It's also quite small. There are a couple other open issues related to full os.PathLike protocol support.
serhiy-storchaka commentedon Sep 15, 2018
This looks like a duplicate of bpo-31961.