"""Raised when automatic decoding based on Content-Type fails."""

"""Raised when something unexpected happens mid-request/response."""

#: Renamed to ProtocolError but aliased for backwards compatibility.

"""Raised when the maximum number of retries is exceeded.

    :param pool: The connection pool
    :type pool: :class:`~urllib3.connectionpool.HTTPConnectionPool`
    :param str url: The requested Url
    :param reason: The underlying error
    :type reason: :class:`Exception`

    """

"""Raised when an existing pool gets a request for a foreign host."""

"""Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    """

"""Raised when a socket timeout occurs while receiving data from a server"""

# This timeout error does not have a URL attached and needs to inherit from the
# base HTTPError

"""Raised when a socket timeout occurs while connecting to a server"""

"""Raised when we fail to establish a new connection. Usually ECONNREFUSED."""

"""Raised when a pool runs out of connections and no more are allowed."""

"""Raised when we try to add a connection to a full pool in blocking mode."""

"""Raised when a request enters a pool after the pool has been closed."""

"""Raised when there is something wrong with a given URL input."""

"""Raised when get_host or similar fails to parse the URL input."""

"""Used as a container for an error reason supplied in a MaxRetryError."""

"""Warned when certain TLS/SSL configuration is not available on a platform."""

"""
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    """

"""Response needs to be chunked in order to read it as chunks."""

"""
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    """

"""
    Response length doesn't match expected Content-Length

    Subclass of :class:`http.client.IncompleteRead` to allow int value
    for ``partial`` to avoid creating large objects on streamed reads.
    """

    # TODO(t-8ch): Stop inheriting from AssertionError in v2.0.

        # 'localhost' is here because our URL parser parses
        # localhost:8080 -> scheme=localhost, remove if we fix this.
        
"Proxy URL had no scheme, should start with http:// or https://"

"""Fetching HTTPS resources through HTTPS proxies is unsupported"""

"""Raised by assert_header_parsing, but we convert it to a log.warning statement."""

from http.client import IncompleteRead as httplib_IncompleteRead

    def __init__(self, pool: ConnectionPool, message: str) -> None:

    """Base exception for PoolErrors that have associated URLs."""

    def __init__(self, pool: ConnectionPool, url: str, message: str) -> None:

    """Raised when SSL certificate fails in an HTTPS connection."""

    def __init__(self, message: str, error: Exception) -> None:

    """Raised when automatic decoding based on Content-Type fails."""

    """Raised when something unexpected happens mid-request/response."""

        self, pool: ConnectionPool, url: str, reason: Exception | None = None

        message = f"Max retries exceeded with url: {url} (Caused by {reason!r})"

    """Raised when an existing pool gets a request for a foreign host."""

        self, pool: ConnectionPool, url: str, retries: Retry | int = 3

        message = f"Tried to open a foreign host with url: {url}"

    """Raised when a socket timeout occurs while receiving data from a server"""

    """Raised when a socket timeout occurs while connecting to a server"""

    """Raised when we fail to establish a new connection. Usually ECONNREFUSED."""

    def __init__(self, conn: HTTPConnection, message: str) -> None:

            "The 'pool' property is deprecated and will be removed "

    def __init__(self, host: str, conn: HTTPConnection, reason: socket.gaierror):

    """Raised when a pool runs out of connections and no more are allowed."""

    """Raised when we try to add a connection to a full pool in blocking mode."""

    """Raised when a request enters a pool after the pool has been closed."""

    """Raised when there is something wrong with a given URL input."""

    """Raised when get_host or similar fails to parse the URL input."""

    """Used as a container for an error reason supplied in a MaxRetryError."""

    """Warned when certain TLS/SSL configuration is not available on a platform."""

    """Response needs to be chunked in order to read it as chunks."""

        return "IncompleteRead(%i bytes read, %i more expected)" % (

    def __init__(self, response: HTTPResponse, length: bytes) -> None:

        self.partial: int = response.tell()  # type: ignore[assignment]

        return "InvalidChunkLength(got length %r, %i bytes read)" % (

            message = "Proxy URL had no scheme, should start with http:// or https://"

            message = f"Proxy URL had unsupported scheme {scheme}, should use http:// or https://"

    """Fetching HTTPS resources through HTTPS proxies is unsupported"""

    """Raised by assert_header_parsing, but we convert it to a log.warning statement."""

        self, defects: list[MessageDefect], unparsed_data: bytes | str | None

        message = f"{defects or 'Unknown'}, unparsed data: {unparsed_data!r}"

    """urllib3 encountered an error when trying to rewind a body"""