HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux srvntsweb01 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64
User: admntserv (1000)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: //snap/certbot/5370/lib/python3.12/site-packages/urllib3/__pycache__/exceptions.cpython-312.pyc
�

ʂ�i�&���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-817459ae66b3942307a8b35b87e7f45e/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)rrr4�
str | Noner r)r*r+r,r.r0s@rr2r2*s���B�(�?rr2c��eZdZdZy)�SSLErrorz9Raised when SSL certificate fails in an HTTPS connection.Nr
rrrr8r86���Crr8c�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
rrrrBrBE���ErrBc��eZdZdZy)�
ProtocolErrorz>Raised when something unexpected happens mid-request/response.Nr
rrrrErEIs��HrrEc�>��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)rrr4rJr r!s     �rrzMaxRetryError.__init___s1������3�C�5��V�J�a�P��
����s�G�,rc�L�|jd|j|jffSr$)r!r4rJr&s rr'zMaxRetryError.__reduce__hs ���~�~��d�h�h����<�<�<rr$)rrr4r6rJzException | Noner*r+r,r.r0s@rrGrGTs9����QU�-�"�-�)3�-�=M�-�	
�-�=rrGc�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)rrr4rOr r!s     �rrzHostChangedError.__init__ps)���<�C�5�A��
����s�G�,���r)�)rrr4r)rOzRetry | intr*r+�rrrrrr/r0s@rrMrMms7���I�FG��"��),��7B��	
��rrMc��eZdZdZy)�TimeoutStateErrorz1Raised when passing an invalid state to a timeoutNr
rrrrSrSxs��;rrSc��eZdZdZy)�TimeoutErrorz�Raised when a socket timeout error occurs.

    Catching this error will catch both :exc:`ReadTimeoutErrors
    <ReadTimeoutError>` and :exc:`ConnectTimeoutErrors <ConnectTimeoutError>`.
    Nr
rrrrUrU|s��rrUc��eZdZdZy)�ReadTimeoutErrorzFRaised when a socket timeout occurs while receiving data from a serverNr
rrrrWrW�s��PrrWc��eZdZdZy)�ConnectTimeoutErrorz@Raised when a socket timeout occurs while connecting to a serverNr
rrrrYrY�s��JrrYc�>��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@rr[r[�s$���R�/�
5����rr[c�,��eZdZdZd�fd�Zdd�Z�xZS)�NameResolutionErrorz'Raised when host name resolution fails.c�T��d|�d|�d�}||_||_t�|�
||�y)NzFailed to resolve 'z' (rI)�_host�_reasonrr)r�hostr]rJr r!s     �rrzNameResolutionError.__init__�s4���'��v�S����:����
����
����w�'rc�L�|j|jd|jffSr$)r!rirjr&s rr'zNameResolutionError.__reduce__�s ���~�~��
�
�D�$�,�,�?�?�?r)rkr)r]rrJzsocket.gaierrorr,r.r0s@rrgrg�s���1�(�@rrgc��eZdZdZy)�EmptyPoolErrorzCRaised when a pool runs out of connections and no more are allowed.Nr
rrrrnrn����Mrrnc��eZdZdZy)�
FullPoolErrorzGRaised when we try to add a connection to a full pool in blocking mode.Nr
rrrrqrq�s��Qrrqc��eZdZdZy)�ClosedPoolErrorzCRaised when a request enters a pool after the pool has been closed.Nr
rrrrsrs�rorrsc��eZdZdZy)�LocationValueErrorz<Raised when there is something wrong with a given URL input.Nr
rrrruru�s��Frruc�$��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)rryr r!s   �rrzLocationParseError.__init__�s#���%�h�Z�0��
����!� ��
r)ryr)r*r+rQr0s@rrwrw�s���G�!�!rrwc�$��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)rQr0s@rr{r{�s���<��rr{c��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_ERRORrrrr�r��s��N�.�M�=�Nrr�c��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��rCrr�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}r6r*r+rQr0s@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+rQr0s@rr�r�Ds(���X�"�*�"�;M�"�	
�"�"rr�c��eZdZdZy)�UnrewindableBodyErrorz9urllib3 encountered an error when trying to rewind a bodyNr
rrrr�r�Nr9rr�)A�
__future__r�socket�typingrb�email.errorsr�http.clientr�httplib_IncompleteRead�
TYPE_CHECKING�
connectionr�connectionpoolrr�r	�
util.retryr
r<r�Warningr�tuple�Callable�objectr-rr2r8r;rBrE�ConnectionErrorrGrMrSrUrWrYr[rgrnrqrs�
ValueErrorrurwr{r�r�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