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
On Windows, urllib.request.pathname2url() raises OSError when given a path with a colon in any position other than the second character. This excludes paths with NTFS alternate data streams, which are valid in other path-processing functions (e.g. in os.path and pathlib):
)
Adjust `pathname2url()` to encode embedded colon characters in Windows
paths, rather than bailing out with an `OSError`.
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Bug report
Bug description:
On Windows,
urllib.request.pathname2url()
raisesOSError
when given a path with a colon in any position other than the second character. This excludes paths with NTFS alternate data streams, which are valid in other path-processing functions (e.g. inos.path
andpathlib
):CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
pathname2url()
: handle NTFS alternate data streams #126760The text was updated successfully, but these errors were encountered: