This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Geoff.Alexander, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2019-03-06.14:49:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551883785.54.0.540596528419.issue36213@roundup.psfhosted.org>
In-reply-to
Content
subprocess.Popen calls _winapi.CreateProcess. The current_directory is a wchar_t* string (Py_UNICODE*) passed to Windows CreateProcessW() (Unicode flavor of the API).

https://docs.microsoft.com/en-us/windows/desktop/fileio/naming-a-file#maximum-path-length-limitation

"In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters."

I guess that the workaround is to use the "\\?\" prefix for "extended-length path". For example, "\\?\D:\very long path".

=> "The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters."
History
Date User Action Args
2019-03-06 14:49:45vstinnersetrecipients: + vstinner, paul.moore, tim.golden, zach.ware, steve.dower, Geoff.Alexander
2019-03-06 14:49:45vstinnersetmessageid: <1551883785.54.0.540596528419.issue36213@roundup.psfhosted.org>
2019-03-06 14:49:45vstinnerlinkissue36213 messages
2019-03-06 14:49:45vstinnercreate