python / cpython

The Python programming language
https://www.python.org
Other
63.65k stars 30.49k forks source link

[3.12] GH-126766: `url2pathname()`: handle 'localhost' authority (GH-127129) #127131

Closed miss-islington closed 3 days ago

miss-islington commented 3 days ago

Discard any 'localhost' authority from the beginning of a file: URI. As a result, file URIs like //localhost/etc/hosts are correctly decoded as /etc/hosts. (cherry picked from commit ebf564a1d3e2e81b9846535114e481d6096443d2)

Co-authored-by: Barney Gale barney.gale@gmail.com