-
-
Notifications
You must be signed in to change notification settings - Fork 34.1k
Closed
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
On Windows, urllib.request.url2pathname() has overly simplistic handling of DOS drives in URLs.
>>> from urllib.request import url2pathname
>>> url2pathname('//host/share/spam.txt:eggs')
'T:\\eggs' # expected: r'\\host\share\spam.txt:eggs'Also:
>>> url2pathname('///c:/spam.txt:eggs')
OSError: Bad URL: ///c|/spam.txt|eggs # expected: r'c:\spam.txt:eggs'CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error