o
    õ­d<  ã                   @  s’   d Z ddlmZ ddlZddlmZ ddlmZ zddlZdZ	W n e
y+   dZ	Y nw ddd„ZG dd„ dejƒZe	rGG dd„ dejƒZdS dS )zC
Patched ``BZ2File`` and ``LZMAFile`` to handle pickle protocol 5.
é    )ÚannotationsN)ÚPickleBuffer)ÚPY310TFÚbú-bytes | bytearray | memoryview | PickleBufferÚreturnúbytes | bytearray | memoryviewc                 C  sP   t | ttfƒr	| S t | tƒst| ƒ} z|  ¡ W S  ty'   t| ƒ d¡ Y S w )z²
    Return some 1-D `uint8` typed buffer.

    Coerces anything that does not match that description to one that does
    without copying if possible (otherwise will copy).
    ÚA)Ú
isinstanceÚbytesÚ	bytearrayr   ÚrawÚBufferErrorÚ
memoryviewÚtobytes)r   © r   ú^/var/www/html/visualizacion-main/env/lib/python3.10/site-packages/pandas/compat/compressors.pyÚflatten_buffer   s   


þr   c                      ó*   e Zd Zesd‡ fdd„Z‡  ZS ‡  ZS )ÚBZ2Filer   Úintc                   ó   t ƒ  t|ƒ¡S ©N©ÚsuperÚwriter   ©Úselfr   ©Ú	__class__r   r   r   /   ó   zBZ2File.write©r   r   ©Ú__name__Ú
__module__Ú__qualname__r   r   Ú__classcell__r   r   r   r   r   ,   ó    þr   c                      r   )ÚLZMAFiler   r   c                   r   r   r   r   r   r   r   r   >   r    zLZMAFile.writer!   r"   r   r   r   r   r(   ;   r'   r(   )r   r   r   r   )Ú__doc__Ú
__future__r   Úbz2Úpickler   Úpandas.compat._constantsr   ÚlzmaÚhas_lzmaÚImportErrorr   r   r(   r   r   r   r   Ú<module>   s     ÿ
þ