Current File : //proc/self/root/lib/python3/dist-packages/twisted/internet/__pycache__/abstract.cpython-312.pyc
�

Ϫ�fYK���dZddlmZmZmZddlmZmZmZddl	m
Z
ddlmZm
Z
ddlmZmZddlmZd�Zd	�ZGd
�d�Ze
ej,�Gd�d
��Ze
ej0ej2ej4ej6ej8�Gd�dee��Zefdedede fd�Z!dede fd�Z"gd�Z#y)z+
Support for generic select()able objects.
�)�AF_INET�AF_INET6�	inet_pton)�Iterable�List�Optional)�implementer)�
interfaces�main)�failure�reflect)�
lazyByteSlicec�:�t|t�std��y)NzData must be bytes)�
isinstance�bytes�	TypeError)�objs �;/usr/lib/python3/dist-packages/twisted/internet/abstract.py�_dataMustBeBytesrs���c�5�!��,�-�-�"�c�D�djt|�|dg|z�S)Nr)�join�
memoryview)�bObj�offset�bArrays   r�_concatenaters%���8�8�Z��%�f�g�.�/�&�8�9�9rc�.�eZdZdZdZdZdZd�Zd�Zd�Z	y)�_ConsumerMixina�
    L{IConsumer} implementations can mix this in to get C{registerProducer} and
    C{unregisterProducer} methods which take care of keeping track of a
    producer's state.

    Subclasses must provide three attributes which L{_ConsumerMixin} will read
    but not write:

      - connected: A C{bool} which is C{True} as long as the consumer has
        someplace to send bytes (for example, a TCP connection), and then
        C{False} when it no longer does.

      - disconnecting: A C{bool} which is C{False} until something like
        L{ITransport.loseConnection} is called, indicating that the send buffer
        should be flushed and the connection lost afterwards.  Afterwards,
        C{True}.

      - disconnected: A C{bool} which is C{False} until the consumer no longer
        has a place to send bytes, then C{True}.

    Subclasses must also override the C{startWriting} method.

    @ivar producer: L{None} if no producer is registered, otherwise the
        registered producer.

    @ivar producerPaused: A flag indicating whether the producer is currently
        paused.
    @type producerPaused: L{bool}

    @ivar streamingProducer: A flag indicating whether the producer was
        registered as a streaming (ie push) producer or not (ie a pull
        producer).  This will determine whether the consumer may ever need to
        pause and resume it, or if it can merely call C{resumeProducing} on it
        when buffer space is available.
    @ivar streamingProducer: C{bool} or C{int}

    NFc��td��)a
        Override in a subclass to cause the reactor to monitor this selectable
        for write events.  This will be called once in C{unregisterProducer} if
        C{loseConnection} has previously been called, so that the connection can
        actually close.
        z!%r did not implement startWriting��NotImplementedError��selfs r�startWritingz_ConsumerMixin.startWritingLs��"�"E�F�Frc���|j�td|�d|j�d���|jr|j�y||_||_|s|j�yy)a"
        Register to receive data from a producer.

        This sets this selectable to be a consumer for a producer.  When this
        selectable runs out of data on a write() call, it will ask the producer
        to resumeProducing(). When the FileDescriptor's internal data buffer is
        filled, it will ask the producer to pauseProducing(). If the connection
        is lost, FileDescriptor calls producer's stopProducing() method.

        If streaming is true, the producer should provide the IPushProducer
        interface. Otherwise, it is assumed that producer provides the
        IPullProducer interface. In this case, the producer won't be asked to
        pauseProducing(), but it has to be careful to write() data only when its
        resumeProducing() method is called.
        NzCannot register producer z, because producer z was never unregistered.)�producer�RuntimeError�disconnected�
stopProducing�streamingProducer�resumeProducing)r$r'�	streamings   r�registerProducerz_ConsumerMixin.registerProducerUsc�� �=�=�$��#+�T�]�]�<��
�����"�"�$�$�D�M�%.�D�"���(�(�*�rc�f�d|_|jr|jr|j�yyy)zM
        Stop consuming data from a producer, without disconnecting.
        N)r'�	connected�
disconnectingr%r#s r�unregisterProducerz!_ConsumerMixin.unregisterProducerrs-����
��>�>�d�0�0�����1�>r)
�__name__�
__module__�__qualname__�__doc__r'�producerPausedr+r%r.r2�rrrr!s*��$�L�H��N���G�+�: rrc�&�eZdZdZdedefd�Zd�Zy)�	_LogOwnerz�
    Mixin to help implement L{interfaces.ILoggingContext} for transports which
    have a protocol, the log prefix of which should also appear in the
    transport's log prefix.
    �applicationObject�returnc��tjj|�r|j�S|jj
S)z�
        Determine the log prefix to use for messages related to
        C{applicationObject}, which may or may not be an
        L{interfaces.ILoggingContext} provider.

        @return: A C{str} giving the log prefix to use.
        )r
�ILoggingContext�
providedBy�	logPrefix�	__class__r3)r$r;s  r�
_getLogPrefixz_LogOwner._getLogPrefix�s:���%�%�0�0�1B�C�$�.�.�0�0� �*�*�3�3�3rc��y)z�
        Override this method to insert custom logging behavior.  Its
        return value will be inserted in front of every line.  It may
        be called more times than the number of output lines.
        �-r8r#s rr@z_LogOwner.logPrefix�s��rN)r3r4r5r6�object�strrBr@r8rrr:r:{s���
4�v�
4�#�
4�rr:c�8�eZdZdZdZdZdZdZdZdZ	dZ
dZd'dee
jfd�Zd	�Zd
eddfd�Zd
�Zd�Zd�Zd�Zd�Zdej2ddfd�Zd�Zd�Zd�Zd�Zd
eddfd�Zde eddfd�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d �Z'dZ(d!Z)d"�Z*d#�Z+d$�Z,d%�Z-d&�Z.y)(�FileDescriptorz�
    An object which can be operated on by select().

    This is an abstract superclass of all objects which may be notified when
    they are readable or writable; e.g. they have a file-descriptor that is
    valid to be passed to select(2).
    rFriN�reactorc�B�|sddlm}|}||_g|_d|_y)z�
        @param reactor: An L{IReactorFDSet} provider which this descriptor will
            use to get readable and writeable event notifications.  If no value
            is given, the global reactor will be used.
        r)rIN)�twisted.internetrI�_tempDataBuffer�_tempDataLen)r$rI�_reactors   r�__init__zFileDescriptor.__init__�s&���<��G����,.�����rc��d|_d|_|j�!|jj�d|_|j	�|j�y)azThe connection was lost.

        This is called when the connection on a selectable object has been
        lost.  It will be called whether the connection was closed explicitly,
        an exception occurred in an event handler, or the other end of the
        connection closed it first.

        Clean up state here, but make sure to call back up to FileDescriptor.
        �rN)r)r0r'r*�stopReading�stopWriting�r$�reasons  r�connectionLostzFileDescriptor.connectionLost�sL���������=�=�$��M�M�'�'�)� �D�M��������r�datar<c�X�tdtj|j�z��)a�
        Write as much as possible of the given data, immediately.

        This is called to invoke the lower-level writing functionality, such
        as a socket's send() method, or a file's write(); this method
        returns an integer or an exception.  If an integer, it is the number
        of bytes written (possibly zero); if an exception, it indicates the
        connection was lost.
        z#%s does not implement writeSomeData�r"r
�qualrA�r$rWs  r�
writeSomeDatazFileDescriptor.writeSomeData�s&��"�1�G�L�L����4P�P�
�	
rc�X�tdtj|j�z��)z�
        Called when data is available for reading.

        Subclasses must override this method. The result will be interpreted
        in the same way as a result of doWrite().
        z%s does not implement doReadrYr#s r�doReadzFileDescriptor.doRead�s&��"�*�W�\�\�$�.�.�-I�I�
�	
rc��t|j�|jz
|jkrEt	|j|j|j
�|_d|_g|_d|_|jr0|jt|j|j��}n|j|j�}t|t�s|dkr|S|xj|z
c_|jt|j�k(r�|js�d|_d|_|j�|j�:|jr|jr"d|_|jj�y|j r|j#�S|j$rd|_|j)�}|Sy)z�
        Called when data can be written.

        @return: L{None} on success, an exception or a negative integer on
            failure.

        @see: L{twisted.internet.interfaces.IWriteDescriptor.doWrite}.
        rrNFT)�len�
dataBufferr�
SEND_LIMITrrLrMr\rr�	ExceptionrSr'r+r7r,r1�_postLoseConnection�_writeDisconnecting�_writeDisconnected�_closeWriteConnection)r$�l�results   r�doWritezFileDescriptor.doWrite�su���t����$�+�+�-����?�+�������d�.B�.B��D�O��D�K�#%�D� � !�D���;�;��"�"�=����$�+�+�#N�O�A��"�"�4�?�?�3�A��a��#�q�1�u��H����q����;�;�#�d�o�o�.�.�t�7H�7H�!�D�O��D�K������}�}�(��+�+��0C�0C�',��#��
�
�-�-�/���#�#��/�/�1�1��)�)�
+/��'��3�3�5���
�rc�"�tjS)z�Called after a loseConnection(), when all data has been written.

        Whatever this returns is then returned by doWrite.
        )r�CONNECTION_DONEr#s rrdz"FileDescriptor._postLoseConnection's���#�#�#rc��y�Nr8r#s rrgz$FileDescriptor._closeWriteConnection/s��rc�&�|j|�yrn�rVrTs  r�writeConnectionLostz"FileDescriptor.writeConnectionLost3������F�#rrUc�&�|j|�yrnrprTs  r�readConnectionLostz!FileDescriptor.readConnectionLost7rrrc��t��rnr!r#s r�getHostzFileDescriptor.getHost;���!�#�#rc��t��rnr!r#s r�getPeerzFileDescriptor.getPeer?rwrc�`�t|j�|jz|jkDS)ay
        Determine whether the user-space send buffer for this transport is full
        or not.

        When the buffer contains more than C{self.bufferSize} bytes, it is
        considered full.  This might be improved by considering the size of the
        kernel send buffer and how much of it is free.

        @return: C{True} if it is full, C{False} otherwise.
        )r`rarM�
bufferSizer#s r�_isSendBufferFullz FileDescriptor._isSendBufferFullCs'���4�?�?�#�d�&7�&7�7�$�/�/�I�Irc��|j�@|jr3|j�r"d|_|jj	�yyyy)zY
        Possibly pause a producer, if there is one and the send buffer is full.
        NT)r'r+r|r7�pauseProducingr#s r�_maybePauseProducerz"FileDescriptor._maybePauseProducerPsH��
�=�=�$��)?�)?��%�%�'�&*��#��
�
�,�,�.�(�*@�$rc��t|�|jr|jry|rZ|jj	|�|xj
t
|�z
c_|j�|j�yy)a7Reliably write some data.

        The data is buffered until the underlying file descriptor is ready
        for writing. If there is more than C{self.bufferSize} data in the
        buffer and this descriptor has a registered streaming producer, its
        C{pauseProducing()} method will be called.
        N)	rr0rfrL�appendrMr`rr%r[s  r�writezFileDescriptor.write\sg��	����~�~��!8�!8���� � �'�'��-�����T��*���$�$�&�����	r�iovecc��|D]
}t|��|jr|r|jry|jj	|�|D] }|xj
t
|�z
c_�"|j�|j�y)a
        Reliably write a sequence of data.

        Currently, this is a convenience method roughly equivalent to::

            for chunk in iovec:
                fd.write(chunk)

        It may have a more efficient implementation at a later time or in a
        different reactor.

        As with the C{write()} method, if a buffer size limit is reached and a
        streaming producer is registered, it will be paused until the buffered
        data is written to the underlying file descriptor.
        N)	rr0rfrL�extendrMr`rr%)r$r��is   r�
writeSequencezFileDescriptor.writeSequencems�� �	 �A��Q��	 ��~�~�U�d�.E�.E�����#�#�E�*��	(�A�����Q��'��	(�� � �"����rc�D�|jr�|js�|jrS|j�|j	�|jt
jtj��y|j�|j�d|_yyy)a[Close the connection at the next available opportunity.

        Call this to cause this FileDescriptor to lose its connection.  It will
        first write any data that it has buffered.

        If there is data buffered yet to be written, this method will cause the
        transport to lose its connection as soon as it's done flushing its
        write buffer.  If you have a producer registered, the connection won't
        be closed until the producer is finished. Therefore, make sure you
        unregister your producer when it's finished, or the connection will
        never close.
        rQN)r0r1rfrRrSrVr�Failurerrlr%r#s r�loseConnectionzFileDescriptor.loseConnection�sx���>�>�$�"4�"4��&�&�� � �"�� � �"��#�#�G�O�O�D�4H�4H�$I�J�� � �"��!�!�#�%&��"�#5�>rc�2�d|_|j�y)NT)rer%r#s r�loseWriteConnectionz"FileDescriptor.loseWriteConnection�s��#'�� ����rc�:�|jj|�y)z�Stop waiting for read availability.

        Call this to remove this selectable from being notified when it is
        ready for reading.
        N)rI�removeReaderr#s rrRzFileDescriptor.stopReading����	
���!�!�$�'rc�:�|jj|�y)z�Stop waiting for write availability.

        Call this to remove this selectable from being notified when it is ready
        for writing.
        N)rI�removeWriterr#s rrSzFileDescriptor.stopWriting�r�rc�:�|jj|�y)z$Start waiting for read availability.N)rI�	addReaderr#s r�startReadingzFileDescriptor.startReading�s�������t�$rc�:�|jj|�y)z�Start waiting for write availability.

        Call this to have this FileDescriptor be notified whenever it is ready for
        writing.
        N)rI�	addWriterr#s rr%zFileDescriptor.startWriting�s��	
�����t�$ric�D�|j�|j�y)z�Stop consuming data.

        This is called when a producer has lost its connection, to tell the
        consumer to go lose its connection (and break potential circular
        references).
        N)r2r�r#s r�
stopConsumingzFileDescriptor.stopConsuming�s��	
���!����rc�X�|jr|js|j�yyyrn)r0r1r�r#s rr,zFileDescriptor.resumeProducing�s$���>�>�$�"4�"4�����#5�>rc�$�|j�yrn)rRr#s rr~zFileDescriptor.pauseProducing�s�����rc�$�|j�yrn)r�r#s rr*zFileDescriptor.stopProducing�s�����rc��y)z�File Descriptor number for select().

        This method must be overridden or assigned in subclasses to
        indicate a valid file descriptor for the operating system.
        ���r8r#s r�filenozFileDescriptor.fileno�s��rrn)/r3r4r5r6r0r)r1rerfrarrbrr
�
IReactorFDSetrOrVrr\r^rjrdrgrqrr�rtrvryr|rr�rr�r�r�rRrSr�r%r'r{r�r,r~r*r�r8rrrHrH�s����I��L��M������J�
�F��J�
���)A�)A� B�
��$
�%�
�D�
�	
�9�v$�
�$�$����$�T�$�$�$�J�
/� �%� �D� �"�8�E�?��t��4'�2�(�(�%�%��H��J�� ���rrH�addr�familyr<c�@�t|t�r	|jd�}|tk(r|jdd�d}n,|tk(r|jd�dk7rytd|����	t||�y	#t$rYywxYw#ttf$rYywxYw)
a>
    Determine whether the given string represents an IP address of the given
    family; by default, an IPv4 address.

    @param addr: A string which may or may not be the decimal dotted
        representation of an IPv4 address.
    @param family: The address family to test for; one of the C{AF_*} constants
        from the L{socket} module.  (This parameter has only been available
        since Twisted 17.1.0; previously L{isIPAddress} could only test for IPv4
        addresses.)

    @return: C{True} if C{addr} represents an IPv4 address, C{False} otherwise.
    �asciiF�%rQr�.�zunknown address family T)rr�decode�UnicodeDecodeErrorr�splitr�count�
ValueErrorr�OSError)r�r�s  r�isIPAddressr��s����$���	��;�;�w�'�D�����z�z�#�q�!�!�$��	�7�	��:�:�c�?�a����2�6�*�=�>�>��	�&�$����)"�	��	��$
�� ����s#�A<�/B�<	B�B�B�Bc�"�t|t�S)a2
    Determine whether the given string represents an IPv6 address.

    @param addr: A string which may or may not be the hex
        representation of an IPv6 address.
    @type addr: C{str}

    @return: C{True} if C{addr} represents an IPv6 address, C{False}
        otherwise.
    @rtype: C{bool}
    )r�r)r�s r�
isIPv6Addressr�s���t�X�&�&r)rHr�r�N)$r6�socketrrr�typingrrr�zope.interfacer	rKr
r�twisted.pythonrr
�twisted.python.compatrrrrr>r:�
IPushProducer�IReadWriteDescriptor�	IConsumer�
ITransport�IHalfCloseableDescriptorrHrF�int�boolr�r��__all__r8rr�<module>r�s���
�
0�/�+�+�&�-�+�0�.�:�W �W �t
�Z�
'�
'�(���)��8
�����#�#��������'�'��E�^�Y�E��E�P
*1�%�c�%�3�%�T�%�P'��'��'�=�r
¿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!