Current File : //proc/self/root/usr/lib/python3/dist-packages/urllib3/__pycache__/connectionpool.cpython-312.pyc
�

�g�����ddlmZddlZddlZddlZddlZddlZddlZddlZddl	m
Zddlm
Z
ddlmZddlmZddlmZdd	lmZmZmZmZmZmZmZmZdd
lmZddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ddl,m-Z-dd
l.m/Z/ddl0m1Z1ddl2m3Z3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;m<Z<ddl=m>Z>m?Z?ddl=m@ZAddl=mBZBddlCmDZDej�rddlFZFddlGmHZHddlmIZImJZJej�eL�ZMej�e<eOe;dfZPej�d�ZRGd�d�ZSej�ej�hZVGd�deSe�ZWGd�deW�ZXd&d �ZYej�d'd!��Z@ej�d(d"��Z@d)d#�Z@	d*					d+d$�Z[d,d%�Z\y)-�)�annotationsN��timeout)�
TracebackType�)�
_TYPE_BODY)�HTTPHeaderDict)�RequestMethods)�BaseSSLError�BrokenPipeError�DummyConnection�HTTPConnection�
HTTPException�HTTPSConnection�ProxyConfig�_wrap_proxy_error)�port_by_scheme)
�ClosedPoolError�EmptyPoolError�
FullPoolError�HostChangedError�InsecureRequestWarning�LocationValueError�
MaxRetryError�NewConnectionError�
ProtocolError�
ProxyError�ReadTimeoutError�SSLError�TimeoutError)�BaseHTTPResponse)�is_connection_dropped)�connection_requires_http_tunnel)�_TYPE_BODY_POSITION�set_file_position)�Retry)�CertificateError)�_DEFAULT_TIMEOUT�
_TYPE_DEFAULT�Timeout)�Url�_encode_target)�_normalize_host)�	parse_url)�to_str)�Literal)�BaseHTTPConnection�BaseHTTPSConnection�_SelfTc�r�eZdZUdZdZded<ejZd
dd�Z	dd�Z
d
d�Z								dd�Zdd	�Z
y)�ConnectionPoola;
    Base class for all connection pools, such as
    :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`.

    .. note::
       ConnectionPool.urlopen() does not normalize or percent-encode target URIs
       which is useful if your target server doesn't support percent-encoded
       target URIs.
    N�
str | None�schemec��|std��t||j��|_||_t||j��j
�|_y)NzNo host specified.�r7)rr-r7�host�port�normalize_host�lower�_tunnel_host)�selfr:r;s   �8/usr/lib/python3/dist-packages/urllib3/connectionpool.py�__init__zConnectionPool.__init__SsH���$�%9�:�:�#�D����=��	���	�+�4����D�J�J�L���c�f�t|�j�d|j�d|j�d�S)Nz(host=z, port=�))�type�__name__r:r;�r?s r@�__str__zConnectionPool.__str__`s.���t�*�%�%�&�f�T�Y�Y�M�����
�Q�O�OrBc��|S�N�rGs r@�	__enter__zConnectionPool.__enter__cs���rBc�$�|j�y)NF)�close)r?�exc_type�exc_val�exc_tbs    r@�__exit__zConnectionPool.__exit__fs��	
�
�
��rBc��y�zD
        Close all pooled connections and disable the pool.
        NrKrGs r@rNzConnectionPool.closep��rBrJ)r:�strr;�
int | None�return�None)rXrV)r?r3rXr3)rOztype[BaseException] | NonerPzBaseException | NonerQzTracebackType | NonerXzLiteral[False]�rXrY)rF�
__module__�__qualname__�__doc__r7�__annotations__�queue�	LifoQueue�QueueClsrArHrLrRrNrKrBr@r5r5Es]����F�J�����H�M�P���,��&��%�	�

��rBr5c�r�eZdZUdZdZeZded<dedddddddf																						dd�Z	dd	�Z
ddd
�Zdd�Zdd�Z
dd
�Zdd�Z								dd�Zdddedddddf																										dd�Zdd�Zdd�Zdddddeddddddf																															d d�Zy)!�HTTPConnectionPoola
    Thread-safe connection pool for one host.

    :param host:
        Host used for this HTTP Connection (e.g. "localhost"), passed into
        :class:`http.client.HTTPConnection`.

    :param port:
        Port used for this HTTP Connection (None is equivalent to 80), passed
        into :class:`http.client.HTTPConnection`.

    :param timeout:
        Socket timeout in seconds for each individual connection. This can
        be a float or integer, which sets the timeout for the HTTP request,
        or an instance of :class:`urllib3.util.Timeout` which gives you more
        fine-grained control over request timeouts. After the constructor has
        been parsed, this is always a `urllib3.util.Timeout` object.

    :param maxsize:
        Number of connections to save that can be reused. More than 1 is useful
        in multithreaded situations. If ``block`` is set to False, more
        connections will be created but they will not be saved once they've
        been used.

    :param block:
        If set to True, no more than ``maxsize`` connections will be used at
        a time. When no free connections are available, the call will block
        until a connection has been released. This is a useful side effect for
        particular multithreaded situations where one does not want to use more
        than maxsize connections per host to prevent flooding.

    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.

    :param retries:
        Retry configuration to use by default with requests in this pool.

    :param _proxy:
        Parsed proxy URL, should not be used directly, instead, see
        :class:`urllib3.ProxyManager`

    :param _proxy_headers:
        A dictionary with proxy headers, should not be used directly,
        instead, see :class:`urllib3.ProxyManager`

    :param \**conn_kw:
        Additional parameters are used to create fresh :class:`urllib3.connection.HTTPConnection`,
        :class:`urllib3.connection.HTTPSConnection` instances.
    �httpz4type[BaseHTTPConnection] | type[BaseHTTPSConnection]�
ConnectionClsNrFc���tj|||�tj||�t|t�st	j
|�}|�tj}||_||_	|j|�|_||_||_
|	xsi|_|
|_t!|�D]}|jj#d��d|_d|_||_|jrN|j(j+dg�|j|j(d<|j|j(d<|j}
t-j.|t0|
�y)Nr�socket_options�proxy�proxy_config)r5rAr
�
isinstancer*�
from_floatr&�DEFAULTr�retriesra�pool�blockrh�
proxy_headersri�range�put�num_connections�num_requests�conn_kw�
setdefault�weakref�finalize�_close_pool_connections)r?r:r;r�maxsizero�headersrm�_proxy�_proxy_headers�
_proxy_configru�_rns              r@rAzHTTPConnectionPool.__init__�s1��	����d�D�1�����g�.��'�7�+��(�(��1�G��?��m�m�G�������8<�
�
�g�8N��	���
���
�+�1�r���)����w��	 �A��I�I�M�M�$��	 � !����������:�:�
�L�L�#�#�$4�b�9�$(�J�J�D�L�L��!�+/�+<�+<�D�L�L��(��y�y��	����6��=rBc�4�|xjdz
c_tjd|j|j|jxsd�|j
d|j|j|jjd�|j��}|S)z9
        Return a fresh :class:`HTTPConnection`.
        rz(Starting new HTTP connection (%d): %s:%s�80)r:r;rrK)	rs�log�debugr:r;rer�connect_timeoutru�r?�conns  r@�	_new_connzHTTPConnectionPool._new_conn�s���	
����!���	�	�6�� � ��I�I��I�I���		
�"�t�!�!�
��������L�L�0�0�
��l�l�	
���rBc��d}|j�t|d��	|jj|j|��}|r;t|�r0tjd|j�|j�|xs|j�S#t$rt|d�d�t
j$r|jr
t|d�d�Y��wxYw)a�
        Get a connection. Will return a pooled connection if one is available.

        If no connections are available and :prop:`.block` is ``False``, then a
        fresh connection is returned.

        :param timeout:
            Seconds to wait before giving up and raising
            :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
            :prop:`.block` is ``True``.
        NzPool is closed.)rorzHPool is empty and a new connection can't be opened due to blocking mode.z Resetting dropped connection: %s)rnr�getro�AttributeErrorr_�Emptyrr"r�r�r:rNr�)r?rr�s   r@�	_get_connzHTTPConnectionPool._get_conns������9�9��!�$�(9�:�:�	��9�9�=�=�t�z�z�7�=�C�D��)�$�/��I�I�8�$�)�)�D��J�J�L��'�t�~�~�'�'��!�	E�!�$�(9�:��D��{�{�	��z�z�$��^����
�
	�s�'B�AC�Cc��|j�	|jj|d��y|r|j�yy#t$rY�tj$rg|r|j�|jr
t|d�d�tjd|j|jj��Y��wxYw)a�
        Put a connection back into the pool.

        :param conn:
            Connection object for the current host and port as returned by
            :meth:`._new_conn` or :meth:`._get_conn`.

        If the pool is already full, the connection is closed and discarded
        because we exceeded maxsize. If connections are discarded frequently,
        then maxsize should be increased.

        If the pool is closed, then the connection will be closed and discarded.
        NF�roz>Pool reached maximum size and no more connections are allowed.zLConnection pool is full, discarding connection: %s. Connection pool size: %s)rnrrr�r_�FullrNrorr��warningr:�qsizer�s  r@�	_put_connzHTTPConnectionPool._put_conn*s����9�9� �
��	�	�
�
�d�%�
�0��.��J�J�L���-"�
���:�:�
���J�J�L��:�:�'��X�� � �
���b��I�I��I�I�O�O�%��
�s�A�	C�A6C�Cc��y)�U
        Called right before a request is made, after the socket is created.
        NrKr�s  r@�_validate_connz!HTTPConnectionPool._validate_connUrUrBc��yrJrKr�s  r@�_prepare_proxyz!HTTPConnectionPool._prepare_proxyZs��rBc��|tur|jj�St|t�r|j�St	j
|�S)z:Helper that always returns a :class:`urllib3.util.Timeout`)r(r�clonerjr*rk)r?rs  r@�_get_timeoutzHTTPConnectionPool._get_timeout^sG���&�&��<�<�%�%�'�'��g�w�'��=�=�?�"��%�%�g�.�.rBc��t|t�rt||d|�d��|�t|d�r%|jt
vrt||d|�d��|�yy)zAIs the error actually a timeout? Will raise a ReadTimeout or pass�Read timed out. (read timeout=rD�errnoN)rj�
SocketTimeoutr�hasattrr��_blocking_errnos)r?�err�url�
timeout_values    r@�_raise_timeoutz!HTTPConnectionPool._raise_timeoutjsq���c�=�)�"��c�;�M�?�!�L���
�
�3�� �S�Y�Y�2B�%B�"��c�;�M�?�!�L���
�&C� rBTc
��|xjdz
c_|j|�}
|
j�tj|
j
�|_		|j|�		|j+||||||
||��|
j2}|j4s|dk(rt7||d|�d���||_	|j9�}||_|	|_||_t@jCd|j(|jD|jF|||jH|jJ|jL�	|S#ttf$r$}|j|||j���d}~wwxYw#ttttttf$r�}|}t!|ttf�rt|�}t!|ttttf�r:|r8|j"r,|j$s t'||j"j(�}|�d}~wwxYw#t,$rY���t$r)}|j.t.j0k7r�Yd}~���d}~wwxYw#ttf$r}|j|||���d}~wwxYw)	a8

        Perform a request on a given urllib connection object taken from our
        pool.

        :param conn:
            a connection from one of our connection pools

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param url:
            The URL to perform the request on.

        :param body:
            Data to send in the request body, either :class:`str`, :class:`bytes`,
            an iterable of :class:`str`/:class:`bytes`, or a file-like object.

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.

            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.

            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.

        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.

        :param response_conn:
            Set this to ``None`` if you will handle releasing the connection or
            set the connection to have the response release it.

        :param preload_content:
          If True, the response's body will be preloaded during construction.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param enforce_content_length:
            Enforce content length checking. Body returned by server must match
            value of Content-Length header, if present. Otherwise, raise error.
        r�r�r�r�N)�bodyr{�chunked�preload_content�decode_content�enforce_content_lengthrr�rDz%s://%s:%s "%s %s %s" %s %s)'rtr��
start_connectr*�resolve_default_timeoutr�rr�r�rr��OSErrorrr r'rrjrh�has_connected_to_proxyrr7�requestrr��
EPROTOTYPE�read_timeout�	is_closedr�getresponserm�_connection�_poolr�r�r:r;�
_http_vsn_str�status�length_remaining)r?r��methodr�r�r{rmrr��
response_connr�r�r��timeout_obj�e�new_er��responses                  r@�
_make_requestz HTTPConnectionPool._make_request}sp��\	
���Q����'�'��0���!�!�#��6�6�{�7R�7R�S���	�
��#�#�D�)�8	��L�L������ /�-�'=�
�	
�0#�/�/���~�~��q� �&��#�!?��~�Q�O���(�D�L�	��'�'�)�H�#���,�������	�	�)��K�K��I�I��I�I�������O�O��%�%�	
����w"�<�0�
��#�#��s�$�,�,�#�O���
��
������

�	� !�E��!�l�,<�=�>� �������!3�\�8�L���D�J�J�t�/J�/J�)�%����1B�1B�C���K��#	��H�	���	��w�w�%�*�*�*��+��		��2�g�&�	����A�3�l��K���	�sg�D?�0H�?I�?E2�E-�-E2�2E5�5#H�A?H�H�	I�+I�3I�I�J�.J�Jc�\�|j�y|jdc}|_t|�yrT)rnry)r?�old_pools  r@rNzHTTPConnectionPool.close2s-���9�9���"�i�i����$�)�	 ��)rBc�V�|jd�ryt|�^}}}}}|xsd}|�
t||��}|jr|st	j
|�}n&|js|t	j
|�k(rd}|||f|j|j|jfk(S)zj
        Check if the given ``url`` is a member of the same host as this
        connection pool.
        �/TrdNr9)�
startswithr.r-r;rr�r7r:)r?r�r7rr:r;s      r@�is_same_hostzHTTPConnectionPool.is_same_host>s���
�>�>�#���%.�c�N�!���4����!�6����"�4��7�D��9�9�T�!�%�%�f�-�D����t�~�'9�'9�&�'A�A��D���d�#����T�Y�Y��	�	�'J�J�JrBc��
�t|�}|j}|�|j}t|t�s"t	j
|||j��}|
�|
}
|r|j|�s
t|||��|jd�rtt|��}nt|j�}d}|
}t|j|j|�}|s+|j!�}|j#|j$�d}d}t'||�}	|j)|�}|j+|	��}|j,|_|j� |r|j0r	|j3|�|
s|nd}|j<|||f|||||||
|d�|��}d}|s|r|j[�d}d}|r|j]|�	|s9t^jad|||�|jb|||||||f||	|
|||
|d
�|��S|xrje�}|r�jfdk(rd}d}ti|�jk�}	|jS||||��}|jq�|js|�t^jud||�|jb||||f|||||	|
|||
|d�
|��Stwjjyd��}|j{||jf|�rn	|jS||||��}|jq�|jY|�t^jud|�|jb||||f|||||	|
|||
|d�
|��S|S#t4t6t8f$r8}|j;||jj|j.���d}~wwxYw#t>$rd}d}�t@tBt6tDt4tFtHtJf$r�}d}|}t|t4tHf�rtG|�}t|t6tLt@tFtBf�r;|r9|jr-|jNs!tQ||jj�}n"t|t6tBf�rtEd	|�}|jS||||tUjV�d
��}|jY�|}Yd}~��<d}~wwxYw#|s|r|j[�d}d}|r|j]|�wwxYw#tl$r"|jnr|jq��|cYSwxYw#tl$r"|j|r|jq��|cYSwxYw)ay
        Get a connection from the pool and perform an HTTP request. This is the
        lowest level call for making a request, so you'll need to specify all
        the raw details.

        .. note::

           More commonly, it's appropriate to use a convenience method
           such as :meth:`request`.

        .. note::

           `release_conn` will only behave as expected if
           `preload_content=False` because we want to make
           `preload_content=False` the default behaviour someday soon without
           breaking backwards compatibility.

        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)

        :param url:
            The URL to perform the request on.

        :param body:
            Data to send in the request body, either :class:`str`, :class:`bytes`,
            an iterable of :class:`str`/:class:`bytes`, or a file-like object.

        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.

        :param retries:
            Configure the number of retries to allow before raising a
            :class:`~urllib3.exceptions.MaxRetryError` exception.

            Pass ``None`` to retry until you receive a response. Pass a
            :class:`~urllib3.util.retry.Retry` object for fine-grained control
            over different types of retries.
            Pass an integer number to retry connection errors that many times,
            but no other types of errors. Pass zero to never retry.

            If ``False``, then retries are disabled and any exception is raised
            immediately. Also, instead of raising a MaxRetryError on redirects,
            the redirect response will be returned.

        :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

        :param redirect:
            If True, automatically handle redirects (status codes 301, 302,
            303, 307, 308). Each redirect counts as a retry. Disabling retries
            will disable redirect, too.

        :param assert_same_host:
            If ``True``, will make sure that the host of the pool requests is
            consistent else will raise HostChangedError. When ``False``, you can
            use the pool on an HTTP proxy and request foreign hosts.

        :param timeout:
            If specified, overrides the default timeout for this one
            request. It may be a float (in seconds) or an instance of
            :class:`urllib3.util.Timeout`.

        :param pool_timeout:
            If set and the pool is set to block=True, then this method will
            block for ``pool_timeout`` seconds and raise EmptyPoolError if no
            connection is available within the time period.

        :param bool preload_content:
            If True, the response's body will be preloaded into memory.

        :param bool decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param release_conn:
            If False, then the urlopen call will not release the connection
            back into the pool once a response is received (but will release if
            you read the entire contents of the response such as when
            `preload_content=True`). This is useful if you're not preloading
            the response's content immediately. You will need to call
            ``r.release_conn()`` on the response ``r`` to return the connection
            back into the pool. If None, it takes the value of ``preload_content``
            which defaults to ``True``.

        :param bool chunked:
            If True, urllib3 will send the body using chunked transfer
            encoding. Otherwise, urllib3 will send the body using the standard
            content-length form. Defaults to False.

        :param int body_pos:
            Position to seek to in file-like body in the event of a retry or
            redirect. Typically this won't need to be set because urllib3 will
            auto-populate the value when needed.
        N)�redirect�defaultr�Frr�)rr�r{r�rmr�r�r�TzConnection aborted.�)�errorr��_stacktracez1Retrying (%r) after connection broken by '%r': %s)r�pool_timeout�release_connr��body_posr�r�i/�GET)r�r�zRedirecting %s -> %s)
rmr��assert_same_hostrr�r�r�r�r�r�zRetry-Afterz	Retry: %s)?r.r7r{rjr&�from_intrmr�rr�r/r,r�r#rhri�copy�updaterpr%r�r�r�rr�r�rr�r�r�r�rr rrrr'rrr�r�	increment�sys�exc_info�sleeprNr�r�r��urlopen�get_redirect_locationr�r	�_prepare_for_method_changer�raise_on_redirect�
drain_conn�sleep_for_retryr��boolr��is_retry�raise_on_status)r?r�r�r�r{rmr�r�rr�r�r�r�r�r��response_kw�
parsed_url�destination_schemer��release_this_conn�http_tunnel_requiredr��
clean_exitr�r�r�r�r��redirect_location�has_retry_afters                              r@r�zHTTPConnectionPool.urlopenTs���b�s�^�
�'�.�.���?��l�l�G��'�5�)��n�n�W�x����V�G���*�L��D�$5�$5�c�$:�"�4��g�6�6��>�>�#�����,�-�C�����(�C���)��>��J�J��)�)�+=� 
��$��l�l�n�G��N�N�4�-�-�.����
�%�T�8�4��e	%��+�+�G�4�K��>�>�,�>�7�D�&�6�6�D�L��z�z�%�*>�4�>�>���'�'��-�)5�D�$�M�*�t�)�)����
�$�����+� /�-�
��
�H� �J�^�
��J�J�L��D�$(�!� ����t�$���K�K�C�W�c�SV�
� �4�<�<������� �� �)�)��!� /�-����
�&%�I��)G�)G�)I������#�%�����(��1�L�L�N��
 �!�+�+�F�C�(�RV�+�W��
���!��#�#�H�-��I�I�,�c�3D�E��4�<�<��!���	�
 �!�!1��)�)��!� /�-����
�&�x�/�/�3�3�M�B�C�����F�H�O�O�_�E�
 �!�+�+�F�C�(�RV�+�W��
���!��M�M�(�#��I�I�k�3�'��4�<�<�����	�
 �!�!1��)�)��!� /�-����
�$���u%�g�}�=���'�'��4�:�:�>�>����(����	��>�	��J� %���
��������	
�$	��J� �E��!�l�,<�=�>� �������&� ��!��	��D�J�J�t�/J�/J�)�%����1B�1B�C���E�G�]�#;�<�%�&;�U�C���'�'���5��#�,�,�.�QR�BS�(��G�
�M�M�O��C��I$	��N�
��J�J�L��D�$(�!� ����t�$�	!��R!�
 ��,�,��'�'�)����	
 ��@!�
 ��*�*��'�'�)����	
 �st�AN8�)M)�:&N8�
T�:U�)N5�=3N0�0N5�5N8�8:S!�2C$S�S$�S!�!S$�$.T�(U�?U�(U.�-U.)r:rVr;rWr�_TYPE_TIMEOUT | Nonerz�intror�r{�typing.Mapping[str, str] | Nonerm�Retry | bool | int | Noner|�
Url | Noner}r�r~zProxyConfig | Noneru�
typing.Any)rXr1rJ)rzfloat | NonerXr1)r��BaseHTTPConnection | NonerXrY�r�r1rXrY)r�
_TYPE_TIMEOUTrXr*)r�z&BaseSSLError | OSError | SocketTimeoutr�rVr�r�rXrY)r�r1r�rVr�rVr��_TYPE_BODY | Noner{r�rmzRetry | Nonerr�r�r�r�r�r�r�r�r�r�r�rXr!rZ)r�rVrXr�) r�rVr�rVr�r�r{r�rmr�r�r�r�r�rr�r�rWr�zbool | Noner�r�r�z_TYPE_BODY_POSITION | Noner�r�r�r�r�r�rXr!)rFr[r\r]r7rrer^r(rAr�r�r�r�r�r�r�r�rNr�r�rKrBr@rcrczs���1�f�F�	��<�� �(8���37�-1�!�:>�,0�;>��;>��;>�&�	;>�
�;>��
;>�1�;>�+�;>��;>�8�;>�*�;>��;>�z�($(�L)�V�

�
/��
3����,�	�

��0#'�37� $�!1��37� $�#�'+�s� �s��s��	s�
 �s�1�
s��s��s��s�1�s��s��s�!%�s�
�s�j
*�K�4#'�37�-1��!%�!1�#'�$(��/3� $�#�p��p��p� �	p�
1�p�+�
p��p��p��p�!�p�"�p��p�-�p��p��p� "�!p�"
�#prBrcc����eZdZUdZdZeZded<dedddddddddddddddddf																																											d�fd�
Z	d
d	�Z
dd
�Zd�fd�Z�xZ
S)�HTTPSConnectionPoola
    Same as :class:`.HTTPConnectionPool`, but HTTPS.

    :class:`.HTTPSConnection` uses one of ``assert_fingerprint``,
    ``assert_hostname`` and ``host`` in this order to verify connections.
    If ``assert_hostname`` is False, no verification is done.

    The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs``,
    ``ca_cert_dir``, ``ssl_version``, ``key_password`` are only used if :mod:`ssl`
    is available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade
    the connection socket into an SSL socket.
    �httpsztype[BaseHTTPSConnection]reNrFc����t�|�|||||||||	f	i|��|
|_||_||_|
|_||_||_||_||_	||_
||_||_yrJ)
�superrA�key_file�	cert_file�	cert_reqs�key_password�ca_certs�ca_cert_dir�ssl_version�ssl_minimum_version�ssl_maximum_version�assert_hostname�assert_fingerprint)r?r:r;rrzror{rmr|r}r�r�r�r�r�r�rrrrr�ru�	__class__s                      �r@rAzHTTPSConnectionPool.__init__�s����0	������������	
��	
�!��
�"���"���(��� ��
�&���&���#6�� �#6�� �.���"4��rBc���|jr|jjdk(rd}nd}|j||j|j|j
��|j
�y)z5Establishes a tunnel connection through HTTP CONNECT.r�rd)r7r:r;r{N)rhr7�
set_tunnelr>r;rp�connect)r?r��
tunnel_schemes   r@r�z"HTTPSConnectionPool._prepare_proxy	s\���:�:�$�*�*�+�+�w�6�#�M�"�M���� ��"�"�����&�&�		�	
�	
���rBc��|xjdz
c_tjd|j|j|jxsd�|j
r|j
turtd��|j}|j}|j�B|jj�,|jj}|jj}|j
d|||jj|j|j|j|j|j|j |j"|j$|j&|j(|j*d�|j,��S)zL
        Return a fresh :class:`urllib3.connection.HTTPConnection`.
        rz)Starting new HTTPS connection (%d): %s:%s�443zCCan't connect to HTTPS URL because the SSL module is not available.)r:r;rr�r�r�r�r�r�rrr�rrrK)rsr�r�r:r;rer
�ImportErrorrhrr�r�r�r�r�r�r�rrr�rrru)r?�actual_host�actual_ports   r@r�zHTTPSConnectionPool._new_connsC��	
����!���	�	�7�� � ��I�I��I�I���		
��!�!�T�%7�%7�?�%J��U��
� �9�9���i�i���:�:�!�d�j�j�o�o�&A��*�*�/�/�K��*�*�/�/�K�!�t�!�!�
����L�L�0�0��n�n��]�]��*�*��n�n��]�]��(�(� �0�0�#�6�6��(�(� $� 8� 8� $� 8� 8�
��l�l�
�	
rBc����t�|�|�|jr|j�|js)tjd|j�d�t�yy)r�z0Unverified HTTPS request is being made to host 'z�'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warningsN)	r�r�r�r�is_verified�warnings�warnr:r)r?r�rs  �r@r�z"HTTPSConnectionPool._validate_connAsY���	���t�$��>�>��L�L�N�����M�M�F�t�y�y�k�R$�$�
'�
� rB),r:rVr;rWrr�rzr�ror�r{r�rmr�r|r�r}r�r�r6r�r6r��int | str | Noner�r6r�r6r�rr�ssl.TLSVersion | Nonerrrzstr | Literal[False] | Nonerr6r�r6rur�rXrY)r�rrXrY)rXr2r�)rFr[r\r]r7rrer^r(rAr�r�r��
__classcell__)rs@r@r�r��sJ�����F�/>�M�,�>�
 �(8���37�-1�!�:>�#� $�&*�#'�#�(,�59�59�7;�)-�"&�+/5��/5��/5�&�	/5�
�/5��
/5�1�/5�+�/5��/5�8�/5��/5��/5�$�/5�!�/5��/5� &�!/5�"3�#/5�$3�%/5�&5�'/5�('�)/5�* �+/5�,�-/5�.
�//5�b
�'
�R�rBr�c��t|�^}}}}}|xsd}|xstj|d�}|dk(rt|fd|i|��St	|fd|i|��S)a�
    Given a url, return an :class:`.ConnectionPool` instance of its host.

    This is a shortcut for not having to parse out the scheme, host, and port
    of the url before creating an :class:`.ConnectionPool` instance.

    :param url:
        Absolute URL string that must include the scheme. Port is optional.

    :param \**kw:
        Passes additional parameters to the constructor of the appropriate
        :class:`.ConnectionPool`. Useful for specifying things like
        timeout, maxsize, headers, etc.

    Example::

        >>> conn = connection_from_url('http://google.com/')
        >>> r = conn.request('GET', '/')
    rd�Pr�r;)r.rr�r�rc)r��kwr7rr:r;s      r@�connection_from_urlrWsk��(!*�#���F�A�t�T�A�
�
�v�F��1�>�%�%�f�b�1�D�
���"�4�9�d�9�b�9�9�!�$�8�T�8�R�8�8rBc��yrJrK�r:r7s  r@r-r-t���rBc��yrJrKrs  r@r-r-yrrBc�p�t||�}|r'|jd�r|jd�r|dd}|S)z?
    Normalize hosts for comparisons and use with sockets.
    �[�]r���)r<r��endswithrs  r@r-r-~s;��
�$��'�D������$����s�);��A�b�z���KrBc�p�t|j|j|j|��jS)zZReturns the URL from a given connection pool. This is mainly used for testing and logging.)r7r:r;�path)r+r7r:r;r�)rnr#s  r@�_url_from_poolr$�s'���d�k�k��	�	��	�	��M�Q�Q�QrBc��		|jd��}|r|j��%#tj$rYywxYw)z2Drains a queue of connections and closes each one.Fr�N)r�rNr_r�)rnr�s  r@ryry�sC��
���8�8�%�8�(�D���
�
�����;�;�
��
�s�&(�>�>)r�rVrr�rXrc)r:rYr7r6rXrY)r:rVr7r6rXrV)r:r6r7r6rXr6rJ)rnz(HTTPConnectionPool | HTTPSConnectionPoolr#r6rXrV)rnzqueue.LifoQueue[typing.Any]rXrY)]�
__future__rr��loggingr_r��typingrrw�socketrr��typesr�_base_connectionr�_collectionsr	�_request_methodsr
�
connectionrrr
rrrrrr�
exceptionsrrrrrrrrrrrrr r�r!�util.connectionr"�
util.proxyr#�util.requestr$r%�
util.retryr&�util.ssl_match_hostnamer'�util.timeoutr(r)r*�util.urlr+r,r-r<r.�	util.utilr/�
TYPE_CHECKING�ssl�typing_extensionsr0r1r2�	getLoggerrFr��Union�floatr��TypeVarr3r5�EAGAIN�EWOULDBLOCKr�rcr�r�overloadr$ryrKrBr@�<module>rBso��"����
�
���+��(�(�,�	�	�	�9�����'�2�7�@��5�B�B�)�7���	����)�I��g����!�����W�e�]�D�@�A�
�	�����	!��.�.�d�L�L�%�"3�"3�4��J
���J
�ZM�,�M�`9�:�������������&HL�R�
2�R�:D�R��R�
rB
¿Qué es la limpieza dental de perros? - Clínica veterinaria


Es la eliminación del sarro y la placa adherida a la superficie de los dientes mediante un equipo de ultrasonidos que garantiza la integridad de las piezas dentales a la vez que elimina en profundidad cualquier resto de suciedad.

A continuación se procede al pulido de los dientes mediante una fresa especial que elimina la placa bacteriana y devuelve a los dientes el aspecto sano que deben tener.

Una vez terminado todo el proceso, se mantiene al perro en observación hasta que se despierta de la anestesia, bajo la atenta supervisión de un veterinario.

¿Cada cuánto tiempo tengo que hacerle una limpieza dental a mi perro?

A partir de cierta edad, los perros pueden necesitar una limpieza dental anual o bianual. Depende de cada caso. En líneas generales, puede decirse que los perros de razas pequeñas suelen acumular más sarro y suelen necesitar una atención mayor en cuanto a higiene dental.


Riesgos de una mala higiene


Los riesgos más evidentes de una mala higiene dental en los perros son los siguientes:

  • Cuando la acumulación de sarro no se trata, se puede producir una inflamación y retracción de las encías que puede descalzar el diente y provocar caídas.
  • Mal aliento (halitosis).
  • Sarro perros
  • Puede ir a más
  • Las bacterias de la placa pueden trasladarse a través del torrente circulatorio a órganos vitales como el corazón ocasionando problemas de endocarditis en las válvulas. Las bacterias pueden incluso acantonarse en huesos (La osteomielitis es la infección ósea, tanto cortical como medular) provocando mucho dolor y una artritis séptica).

¿Cómo se forma el sarro?

El sarro es la calcificación de la placa dental. Los restos de alimentos, junto con las bacterias presentes en la boca, van a formar la placa bacteriana o placa dental. Si la placa no se retira, al mezclarse con la saliva y los minerales presentes en ella, reaccionará formando una costra. La placa se calcifica y se forma el sarro.

El sarro, cuando se forma, es de color blanquecino pero a medida que pasa el tiempo se va poniendo amarillo y luego marrón.

Síntomas de una pobre higiene dental
La señal más obvia de una mala salud dental canina es el mal aliento.

Sin embargo, a veces no es tan fácil de detectar
Y hay perros que no se dejan abrir la boca por su dueño. Por ejemplo…

Recientemente nos trajeron a la clínica a un perro que parpadeaba de un ojo y decía su dueño que le picaba un lado de la cara. Tenía molestias y dificultad para comer, lo que había llevado a sus dueños a comprarle comida blanda (que suele ser un poco más cara y llevar más contenido en grasa) durante medio año. Después de una exploración oftalmológica, nos dimos cuenta de que el ojo tenía una úlcera en la córnea probablemente de rascarse . Además, el canto lateral del ojo estaba inflamado. Tenía lo que en humanos llamamos flemón pero como era un perro de pelo largo, no se le notaba a simple vista. Al abrirle la boca nos llamó la atención el ver una muela llena de sarro. Le realizamos una radiografía y encontramos una fístula que llegaba hasta la parte inferior del ojo.

Le tuvimos que extraer la muela. Tras esto, el ojo se curó completamente con unos colirios y una lentilla protectora de úlcera. Afortunadamente, la úlcera no profundizó y no perforó el ojo. Ahora el perro come perfectamente a pesar de haber perdido una muela.

¿Cómo mantener la higiene dental de tu perro?
Hay varias maneras de prevenir problemas derivados de la salud dental de tu perro.

Limpiezas de dientes en casa
Es recomendable limpiar los dientes de tu perro semanal o diariamente si se puede. Existe una gran variedad de productos que se pueden utilizar:

Pastas de dientes.
Cepillos de dientes o dedales para el dedo índice, que hacen más fácil la limpieza.
Colutorios para echar en agua de bebida o directamente sobre el diente en líquido o en spray.

En la Clínica Tus Veterinarios enseñamos a nuestros clientes a tomar el hábito de limpiar los dientes de sus perros desde que son cachorros. Esto responde a nuestro compromiso con la prevención de enfermedades caninas.

Hoy en día tenemos muchos clientes que limpian los dientes todos los días a su mascota, y como resultado, se ahorran el dinero de hacer limpiezas dentales profesionales y consiguen una mejor salud de su perro.


Limpiezas dentales profesionales de perros y gatos

Recomendamos hacer una limpieza dental especializada anualmente. La realizamos con un aparato de ultrasonidos que utiliza agua para quitar el sarro. Después, procedemos a pulir los dientes con un cepillo de alta velocidad y una pasta especial. Hacemos esto para proteger el esmalte.

La frecuencia de limpiezas dentales necesaria varía mucho entre razas. En general, las razas grandes tienen buena calidad de esmalte, por lo que no necesitan hacerlo tan a menudo e incluso pueden pasarse la vida sin requerir una limpieza. Sin embargo, razas pequeñas como el Yorkshire o el Maltés, deben hacérselas todos los años desde cachorros si se quiere conservar sus piezas dentales.

Otro factor fundamental es la calidad del pienso. Algunas marcas han diseñado croquetas que limpian la superficie del diente y de la muela al masticarse.

Ultrasonido para perros

¿Se necesita anestesia para las limpiezas dentales de perros y gatos?

La limpieza dental en perros no es una técnica que pueda practicarse sin anestesia general , aunque hay veces que los propietarios no quieren anestesiar y si tiene poco sarro y el perro es muy bueno se puede intentar…… , pero no se va a poder pulir ni acceder a todas la zona de la boca …. Además los limpiadores dentales van a irrigar agua y hay riesgo de aspiración a vías respiratorias si no se realiza una anestesia correcta con intubación traqueal . En resumen , sin anestesia no se va hacer una correcta limpieza dental.

Tampoco sirve la sedación ya que necesitamos que el animal esté totalmente quieto, y el veterinario tenga un acceso completo a todas sus piezas dentales y encías.

Alimentos para la limpieza dental

Hay que tener cierto cuidado a la hora de comprar determinados alimentos porque no todos son saludables. Algunos tienen demasiado contenido graso, que en exceso puede causar problemas cardiovasculares y obesidad.

Los mejores alimentos para los dientes son aquellos que están elaborados por empresas farmacéuticas y llevan componentes químicos con tratamientos específicos para el diente del perro. Esto implica no solo limpieza a través de la acción mecánica de morder sino también un tratamiento antibacteriano para prevenir el sarro.

Conclusión

Si eres como la mayoría de dueños, por falta de tiempo , es probable que no estés prestando la suficiente atención a la limpieza dental de tu perro. Por eso te animamos a que comiences a limpiar los dientes de tu perro y consideres atender a su higiene bucal con frecuencia.

Estas simples medidas pueden conllevar a que tu perro tenga una vida más larga y mucho más saludable.

Si te resulta imposible introducir un cepillo de dientes a tu perro en la boca, pásate con él por clínica Tus Veterinarios y te explicamos cómo hacerlo.

Necesitas hacer una limpieza dental profesional a tu mascota?
Llámanos al 622575274 o contacta con nosotros

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *

¡Hola!