Skip to content

Url starting with file:\\ no longer works in urllib since 3.14 #156325

Description

@sys2065

Bug report

Bug description:

from urllib.request import urlopen
with urlopen("file:\\C:/temp/test.txt") as response:
    print(response.read())

That works in python 313 but fails in 314

Just checking if it's intended change? This resulted failure when upgrading 313->314

Same url works in webbrowser, Firefox, Edge, in Windows 11

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions