GH-123599: `url2pathname()`: handle authority section in file URL (#126844)
In `urllib.request.url2pathname()`, if the authority resolves to the current host, discard it. If an authority is present but resolves somewhere else, then on Windows we return a UNC path (as before), and on other platforms we raise `URLError`. Affects `pathlib.Path.from_uri()` in the same way. Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
B
Barney Gale committed
66cdb2bd8ab93a4691bead7f5d1e54e5ca6895b4
Parent: a214db0
Committed by GitHub <noreply@github.com>
on 4/10/2025, 7:58:04 PM