-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtype-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
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesstdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error