Skip to content

Commit

Permalink
Update conda_lock/pypi_solver.py
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Mares <[email protected]>
  • Loading branch information
jacksmith15 and maresb authored Jul 17, 2023
1 parent cf5dcb4 commit 5ffc30b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion conda_lock/pypi_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,5 +386,7 @@ def _prepare_repositories_pool(allow_pypi_requests: bool) -> Pool:
def _strip_auth(url: str) -> str:
"""Strip HTTP Basic authentication from a URL."""
parts = urlsplit(url, allow_fragments=True)
netloc = parts.netloc.replace(f"{parts.username}:{parts.password}@", "")
# Remove everything before and including the last '@' character in the part
# between 'scheme://' and the subsequent '/'.
netloc = parts.netloc.split("@")[-1]
return urlunsplit((parts.scheme, netloc, parts.path, parts.query, parts.fragment))

0 comments on commit 5ffc30b

Please sign in to comment.