class Timeout(Exception): """ A base class for all timeouts. """ class ConnectTimeout(Timeout): """ Timeout while establishing a connection. """ class ReadTimeout(Timeout): """ Timeout while reading response data. """ class WriteTimeout(Timeout): """ Timeout while writing request data. """ class PoolTimeout(Timeout): """ Timeout while waiting to acquire a connection from the pool. """ class RedirectError(Exception): """ Base class for HTTP redirect errors. """ class TooManyRedirects(RedirectError): """ Too many redirects. """ class RedirectLoop(RedirectError): """ Infinite redirect loop. """ class ProtocolError(Exception): """ Malformed HTTP. """ class StreamConsumed(Exception): """ Attempted to read or stream response content, but the content has already been streamed. """ class ResponseClosed(Exception): """ Attempted to read or stream response content, but the request has been closed without loading the body. """ class InvalidURL(Exception): """ """