bpo-46720: Add support for path-like objects to multiprocessing.set_executable for Windows (GH-31279)

This bring the API to be on a par with Unix-like systems.
This commit is contained in:
Géry Ogam 2022-04-23 00:47:09 +02:00 committed by GitHub
parent f912cc0e41
commit 5576ddbbbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 8 deletions

View file

@ -450,7 +450,7 @@ def spawnv_passfds(path, args, passfds):
errpipe_read, errpipe_write = os.pipe()
try:
return _posixsubprocess.fork_exec(
args, [os.fsencode(path)], True, passfds, None, None,
args, [path], True, passfds, None, None,
-1, -1, -1, -1, -1, -1, errpipe_read, errpipe_write,
False, False, None, None, None, -1, None)
finally: