Skip to content

Commit f51b3ca

Browse files
committed
Always remove authority section when cleaning URL
1 parent 853a593 commit f51b3ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pip/_internal/models/link.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ def _clean_file_url_path(part: str) -> str:
133133
# exist, the colon should be quoted. We rely on urllib.request
134134
# to do the right thing here.
135135
ret = urllib.request.pathname2url(urllib.request.url2pathname(part))
136-
if sys.version_info >= (3, 14):
137-
# https://discuss.python.org/t/pathname2url-changes-in-python-3-14-breaking-pip-tests/97091
136+
if ret.startswith("///"):
137+
# Remove authority section from URL.
138138
ret = ret.removeprefix("//")
139139
return ret
140140

0 commit comments

Comments
 (0)