a
    é´«j  ã                   @  sV  d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	m
Z
mZmZmZmZmZmZ ddlZddlmZ ddlmZmZmZmZmZmZmZmZmZmZm Z m!Z! er¸ddl"m#Z# d	d
dd	dœdd„Z$ddœdd„Z%ddœdd„Z&ddœdd„Z'ddœdd„Z(ddœdd„Z)ddœdd„Z*ddœdd„Z+ddœd d!„Z,d"dœd#d$„Z-g d%¢Z.dS )&zn
compat
======

Cross-compatible functions for different versions of Python.

Other items:
* platform checker
é    )ÚannotationsN)ÚTYPE_CHECKING)ÚIS64ÚISMUSLÚPY310ÚPY311ÚPY312ÚPY314ÚPYPYÚWARNING_CHECK_DISABLED)Úis_numpy_dev)ÚHAS_PYARROWÚpa_version_under10p1Úpa_version_under11p0Úpa_version_under13p0Úpa_version_under14p0Úpa_version_under14p1Úpa_version_under16p0Úpa_version_under17p0Úpa_version_under18p0Úpa_version_under19p0Úpa_version_under20p0Úpa_version_under21p0)ÚFr   ÚstrÚtype)ÚfÚnameÚclsÚreturnc                 C  s$   || _ |j › d|› �| _|j| _| S )z<
    Bind the name/qualname attributes of the function.
    Ú.)Ú__name__Ú__qualname__Ú
__module__)r   r   r   © r$   úU/var/www/html/laksyashrimp/venv/lib/python3.9/site-packages/pandas/compat/__init__.pyÚset_function_name0   s    r&   Úbool)r   c                   C  s
   t jdkS )z•
    Checking if the running platform is little endian.

    Returns
    -------
    bool
        True if the running platform is little endian.
    Úlittle)ÚsysÚ	byteorderr$   r$   r$   r%   Úis_platform_little_endian:   s    	r+   c                   C  s
   t jdv S )z‰
    Checking if the running platform is windows.

    Returns
    -------
    bool
        True if the running platform is windows.
    )Úwin32Úcygwin©r)   Úplatformr$   r$   r$   r%   Úis_platform_windowsF   s    	r0   c                   C  s
   t jdkS )z…
    Checking if the running platform is linux.

    Returns
    -------
    bool
        True if the running platform is linux.
    Úlinuxr.   r$   r$   r$   r%   Úis_platform_linuxR   s    	r2   c                   C  s
   t jdkS )z�
    Checking if the running platform is mac.

    Returns
    -------
    bool
        True if the running platform is mac.
    Údarwinr.   r$   r$   r$   r%   Úis_platform_mac^   s    	r4   c                   C  s   t  ¡ dv pt  ¡  d¡S )zž
    Checking if the running platform use ARM architecture.

    Returns
    -------
    bool
        True if the running platform uses ARM architecture.
    )Úarm64Úaarch64Zarmv)r/   ÚmachineÚ
startswithr$   r$   r$   r%   Úis_platform_armj   s    	ÿr9   c                   C  s   t  ¡ dv S )z 
    Checking if the running platform use Power architecture.

    Returns
    -------
    bool
        True if the running platform uses ARM architecture.
    )Úppc64Úppc64le)r/   r7   r$   r$   r$   r%   Úis_platform_powerx   s    	r<   c                   C  s   t j dd¡dkS )zà
    Checking if running in a continuous integration environment by checking
    the PANDAS_CI environment variable.

    Returns
    -------
    bool
        True if the running in a continuous integration environment.
    Z	PANDAS_CIÚ0Ú1)ÚosÚenvironÚgetr$   r$   r$   r%   Úis_ci_environment„   s    
rB   z(type[pandas.compat.compressors.LZMAFile]c                   C  s   t jjjstdƒ‚t jjjS )a
  
    Importing the `LZMAFile` class from the `lzma` module.

    Returns
    -------
    class
        The `LZMAFile` class from the `lzma` module.

    Raises
    ------
    RuntimeError
        If the `lzma` module was not imported correctly, or didn't exist.
    zslzma module not available. A Python re-install with the proper dependencies, might be required to solve this issue.)ÚpandasÚcompatÚcompressorsZhas_lzmaÚRuntimeErrorÚLZMAFiler$   r$   r$   r%   Úget_lzma_file‘   s
    
ÿrH   z'type[pandas.compat.compressors.BZ2File]c                   C  s   t jjjstdƒ‚t jjjS )a  
    Importing the `BZ2File` class from the `bz2` module.

    Returns
    -------
    class
        The `BZ2File` class from the `bz2` module.

    Raises
    ------
    RuntimeError
        If the `bz2` module was not imported correctly, or didn't exist.
    zrbz2 module not available. A Python re-install with the proper dependencies, might be required to solve this issue.)rC   rD   rE   Zhas_bz2rF   ÚBZ2Filer$   r$   r$   r%   Úget_bz2_file¨   s
    
ÿrJ   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r	   r
   r   )/Ú__doc__Ú
__future__r   r?   r/   r)   Útypingr   Zpandas.compat._constantsr   r   r   r   r   r	   r
   r   Zpandas.compat.compressorsrC   Zpandas.compat.numpyr   Zpandas.compat.pyarrowr   r   r   r   r   r   r   r   r   r   r   r   Zpandas._typingr   r&   r+   r0   r2   r4   r9   r<   rB   rH   rJ   Ú__all__r$   r$   r$   r%   Ú<module>   s,   	(
8
