def redact_auth_from_url(url):
    # type: (str) -> str
    """Replace the password in a given url with ****."""
    return _transform_url(url, _redact_netloc)[0]
Replace the password in a given url with ****.
product/gradle-plugin/src/main/python/pip/_internal/utils/misc.py