Author levineds
Recipients levineds, paul.moore, steve.dower, tim.golden, zach.ware
Date 2021-03-23.22:56:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616540209.08.0.34606490658.issue43607@roundup.psfhosted.org>
In-reply-to
Content
Windows file paths are limited to 256 characters, and one of Windows's prescribed methods to address this is to prepend "\\?\" before a Windows absolute path (see: https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation)

urllib.request.pathname2url raises an error on such paths as this function calls nturl2path.py's pathname2url function which explicitly checks that the number of characters before the ":" in a Windows path is precisely one, which is, of course, not the case if you are using an extended-length path (e.g. "\\?\C:\Python39").

As a result, urllib cannot handle pathname2url conversion for some valid Windows paths.
History
Date User Action Args
2021-03-23 22:56:49levinedssetrecipients: + levineds, paul.moore, tim.golden, zach.ware, steve.dower
2021-03-23 22:56:49levinedssetmessageid: <1616540209.08.0.34606490658.issue43607@roundup.psfhosted.org>
2021-03-23 22:56:49levinedslinkissue43607 messages
2021-03-23 22:56:49levinedscreate