HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/certbot/current/lib/python3.12/site-packages/urllib3/__pycache__/exceptions.cpython-312.pyc
�

�F�h�&���ddlmZddlZddlZddlZddlmZddlmZ	ejrddlmZddl
mZddlmZdd	lmZGd
�de�ZGd�d
e�Zeej0defeedffZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Z e Z!Gd�de�Z"Gd�de�Z#Gd�d e�Z$Gd!�d"e�Z%Gd#�d$e%e�Z&Gd%�d&e%�Z'Gd'�d(e'e�Z(Gd)�d*e(�Z)Gd+�d,e�Z*Gd-�d.e�Z+Gd/�d0e�Z,Gd1�d2e-e�Z.Gd3�d4e.�Z/Gd5�d6e.�Z0Gd7�d8e�Z1Gd9�d:e�Z2Gd;�d<e2�Z3Gd=�d>e2�Z4Gd?�d@e2�Z5GdA�dBe2�Z6GdC�dDe�Z7GdE�dFe e-�Z8GdG�dHe�Z9GdI�dJee	�ZGdK�dLee	�Z:GdM�dNe�Z;GdO�dPe<e0�Z=GdQ�dRe-�Z>GdS�dTe�Z?GdU�dVe�Z@y)W�)�annotationsN)�
MessageDefect)�IncompleteRead�)�HTTPConnection)�ConnectionPool)�HTTPResponse)�Retryc��eZdZdZy)�	HTTPErrorz#Base exception used by this module.N��__name__�
__module__�__qualname__�__doc__����/build/snapcraft-certbot-c9aaebe726f8beb59a0eb2d8e1671bc4/parts/certbot/install/lib/python3.12/site-packages/urllib3/exceptions.pyrrs��-rrc��eZdZdZy)�HTTPWarningz!Base warning used by this module.Nr
rrrrrs��+rr.c�,��eZdZdZd�fd�Zdd�Z�xZS)�	PoolErrorz/Base exception for errors caused within a pool.c�J��||_||_t�|�
|�d|���y�Nz: )�pool�_message�super�__init__)�selfr�message�	__class__s   �rrzPoolError.__init__ �)�����	���
�
���D�6��G�9�-�.rc�6�|jd|jffS�N�r!r�rs r�
__reduce__zPoolError.__reduce__%����~�~��d�m�m�4�4�4r)rrr �str�return�None�r*�_TYPE_REDUCE_RESULT�rrrrrr'�
__classcell__�r!s@rrrs���9�/�
5rrc�,��eZdZdZd�fd�Zdd�Z�xZS)�RequestErrorz8Base exception for PoolErrors that have associated URLs.c�4��||_t�|�	||�yr$)�urlrr)rrr4r r!s    �rrzRequestError.__init__-s������
����w�'rc�L�|jd|j|jffSr$)r!r4rr&s rr'zRequestError.__reduce__1s ���~�~��d�h�h��
�
�>�>�>r)rrr4r)r r)r*r+r,r.r0s@rr2r2*s���B�(�?rr2c��eZdZdZy)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nr
rrrr7r76���Crr7c�0��eZdZUdZded<d�fd�Z�xZS)�
ProxyErrorz,Raised when the connection to a proxy fails.�	Exception�original_errorc�4��t�|�||�||_yr$)rrr<)rr �errorr!s   �rrzProxyError.__init__@s���
����%�(�#��r)r r)r>r;r*r+)rrrr�__annotations__rr/r0s@rr:r::s���6���$�$rr:c��eZdZdZy)�DecodeErrorz;Raised when automatic decoding based on Content-Type fails.Nr
rrrrArAE���ErrAc��eZdZdZy)�
ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nr
rrrrDrDIs��HrrDc�>��eZdZdZ	d							d�fd�
Zdd�Z�xZS)�
MaxRetryErroraRaised 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`

    c�H��||_d|�d|�d�}t�|�	|||�y)NzMax retries exceeded with url: z (Caused by �))�reasonrr)rrr4rIr r!s     �rrzMaxRetryError.__init___s1������3�C�5��V�J�a�P��
����s�G�,rc�L�|jd|j|jffSr$)r!r4rIr&s rr'zMaxRetryError.__reduce__hs ���~�~��d�h�h����<�<�<rr$)rrr4r)rIzException | Noner*r+r,r.r0s@rrFrFTs9����JN�-�"�-�),�-�6F�-�	
�-�=rrFc�6��eZdZdZ	d							d�fd�
Z�xZS)�HostChangedErrorz?Raised when an existing pool gets a request for a foreign host.c�@��d|��}t�|�|||�||_y)Nz'Tried to open a foreign host with url: )rr�retries)rrr4rNr r!s     �rrzHostChangedError.__init__ps)���<�C�5�A��
����s�G�,���r)�)rrr4r)rNzRetry | intr*r+�rrrrrr/r0s@rrLrLms7���I�FG��"��),��7B��	
��rrLc��eZdZdZy)�TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNr
rrrrRrRxs��;rrRc��eZdZdZy)�TimeoutErrorz�Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    Nr
rrrrTrT|s��rrTc��eZdZdZy)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNr
rrrrVrV�s��PrrVc��eZdZdZy)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNr
rrrrXrX�s��JrrXc�>��eZdZdZd�fd�Zdd�Zedd��Z�xZS)�NewConnectionErrorzHRaised when we fail to establish a new connection. Usually ECONNREFUSED.c�J��||_||_t�|�
|�d|���yr)�connrrr)rr\r r!s   �rrzNewConnectionError.__init__�r"rc�6�|jd|jffSr$r%r&s rr'zNewConnectionError.__reduce__�r(rc�R�tjdtd��|jS)Nz\The 'pool' property is deprecated and will be removed in urllib3 v2.1.0. Use 'conn' instead.�)�
stacklevel)�warnings�warn�DeprecationWarningr\r&s rrzNewConnectionError.pool�s%���
�
�
5���		
��y�y�r)r\rr r)r*r+r,)r*r)	rrrrrr'�propertyrr/r0s@rrZrZ�s$���R�/�
5����rrZc�,��eZdZdZd�fd�Zdd�Z�xZS)�NameResolutionErrorz'Raised when host name resolution fails.c�T��d|�d|�d�}||_||_t�|�
||�y)NzFailed to resolve 'z' (rH)�_host�_reasonrr)r�hostr\rIr r!s     �rrzNameResolutionError.__init__�s4���'��v�S����:����
����
����w�'rc�L�|j|jd|jffSr$)r!rhrir&s rr'zNameResolutionError.__reduce__�s ���~�~��
�
�D�$�,�,�?�?�?r)rjr)r\rrIzsocket.gaierrorr,r.r0s@rrfrf�s���1�(�@rrfc��eZdZdZy)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nr
rrrrmrm����Mrrmc��eZdZdZy)�
FullPoolErrorzGRaised when we try to add a connection to a full pool in blocking mode.Nr
rrrrprp�s��Qrrpc��eZdZdZy)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nr
rrrrrrr�rnrrrc��eZdZdZy)�LocationValueErrorz<Raised when there is something wrong with a given URL input.Nr
rrrrtrt�s��Frrtc�$��eZdZdZd�fd�Z�xZS)�LocationParseErrorz=Raised when get_host or similar fails to parse the URL input.c�<��d|��}t�|�|�||_y)NzFailed to parse: )rr�location)rrxr r!s   �rrzLocationParseError.__init__�s#���%�h�Z�0��
����!� ��
r)rxr)r*r+rPr0s@rrvrv�s���G�!�!rrvc�$��eZdZdZd�fd�Z�xZS)�URLSchemeUnknownz2Raised when a URL input has an unsupported scheme.c�<��d|��}t�|�|�||_y)NzNot supported URL scheme )rr�scheme�rr|r r!s   �rrzURLSchemeUnknown.__init__�s#���-�f�X�6��
����!���r)r|r)rPr0s@rrzrz�s���<��rrzc��eZdZdZdZdZy)�
ResponseErrorzDUsed as a container for an error reason supplied in a MaxRetryError.ztoo many error responsesz&too many {status_code} error responsesN)rrrr�
GENERIC_ERROR�SPECIFIC_ERRORrrrrr�s��N�.�M�=�Nrrc��eZdZdZy)�SecurityWarningz0Warned when performing security reducing actionsNr
rrrr�r�����:rr�c��eZdZdZy)�InsecureRequestWarningz/Warned when making an unverified HTTPS request.Nr
rrrr�r��s��9rr�c��eZdZdZy)�NotOpenSSLWarningz)Warned when using unsupported SSL libraryNr
rrrr�r��s��3rr�c��eZdZdZy)�SystemTimeWarningz0Warned when system time is suspected to be wrongNr
rrrr�r��r�rr�c��eZdZdZy)�InsecurePlatformWarningzIWarned when certain TLS/SSL configuration is not available on a platform.Nr
rrrr�r��s��Srr�c��eZdZdZy)�DependencyWarningzc
    Warned when an attempt is made to import a module with missing optional
    dependencies.
    Nr
rrrr�r�����rr�c��eZdZdZy)�ResponseNotChunkedz;Response needs to be chunked in order to read it as chunks.Nr
rrrr�r��rBrr�c��eZdZdZy)�BodyNotHttplibCompatiblez�
    Body should be :class:`http.client.HTTPResponse` like
    (have an fp attribute which returns raw chunks) for read_chunked().
    Nr
rrrr�r��r�rr�c�6�eZdZUdZded<ded<dd�Zd	d�Zy)
rz�
    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.
    �int�partial�expectedc� �||_||_yr$�r�r�)rr�r�s   rrzIncompleteRead.__init__s����� ��
rc�8�d|j|jfzS)Nz/IncompleteRead(%i bytes read, %i more expected)r�r&s r�__repr__zIncompleteRead.__repr__s#��@��L�L��M�M�D
�
�	
rN)r�r�r�r�r*r+�r*r))rrrrr?rr�rrrrrs����L��M�!�
rrc� �eZdZdZdd�Zdd�Zy)�InvalidChunkLengthz+Invalid chunk length in a chunked response.c�l�|j�|_|j|_||_||_yr$)�tellr��length_remainingr��response�length)rr�r�s   rrzInvalidChunkLength.__init__s*��$�M�M�O���$,�$=�$=��
� ��
���rc�8�d|j|jfzS)Nz0InvalidChunkLength(got length %r, %i bytes read))r�r�r&s rr�zInvalidChunkLength.__repr__$s#��A��K�K��L�L�E
�
�	
rN)r�r	r��bytesr*r+r�)rrrrrr�rrrr�r�s��5��
rr�c��eZdZdZy)�
InvalidHeaderz(The header provided was somehow invalid.Nr
rrrr�r�+s��2rr�c�$��eZdZdZd�fd�Z�xZS)�ProxySchemeUnknownz1ProxyManager does not support the supplied schemec�H��|dk(rd}|�d}nd|�d�}t�|�|�y)N�	localhostz>Proxy URL had no scheme, should start with http:// or https://z!Proxy URL had unsupported scheme z , should use http:// or https://�rrr}s   �rrzProxySchemeUnknown.__init__4s8����[� ��F��>�V�G�9�&��Aa�b�G�
����!r)r|z
str | Noner*r+rPr0s@rr�r�/s���;�	"�	"rr�c��eZdZdZy)�ProxySchemeUnsupportedz=Fetching HTTPS resources through HTTPS proxies is unsupportedNr
rrrr�r�@s��Grr�c�0��eZdZdZ						d�fd�Z�xZS)�HeaderParsingErrorzNRaised by assert_header_parsing, but we convert it to a log.warning statement.c�:��|xsd�d|��}t�|�|�y)N�Unknownz, unparsed data: r�)r�defects�
unparsed_datar r!s    �rrzHeaderParsingError.__init__Gs*����)�	�*�*;�M�;L�M��
����!r)r�zlist[MessageDefect]r�zbytes | str | Noner*r+rPr0s@rr�r�Ds(���X�"�*�"�;M�"�	
�"�"rr�c��eZdZdZy)�UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNr
rrrr�r�Nr8rr�)A�
__future__r�socket�typingra�email.errorsr�http.clientr�httplib_IncompleteRead�
TYPE_CHECKING�
connectionr�connectionpoolrr�r	�
util.retryr
r;r�Warningr�tuple�Callable�objectr-rr2r7r:rArD�ConnectionErrorrFrLrRrTrVrXrZrfrmrprr�
ValueErrorrtrvrzrr�r�r�r�r�r�r�r�r�r��AssertionErrorr�r�r�r�rrr�<module>r�sT��"�
�
��&�@�	���*�.�&�!�
.�	�.�,�'�,��F�O�O�C��K�8�%����:L�L�M��
5�	�
5�	?�9�	?�D�y�D�$��$�F�)�F�I�I�I�
 ��=�L�=�2�|��<�	�<��9��Q�|�\�Q�K�,�K��,�i��0@�,�@�N�Y�N�R�I�R�N�i�N�G��Y�G�!�+�!��)��>�I�>�;�k�;�:�_�:�4��4�;��;�T�o�T����F��
�F��y��
�Y� 6�
�,

��$:�

� 3�I�3�"��)9�"�"H�Z�H�"��"�D�I�Dr