a
    Sic   ã                   @  s<  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	 ddl
mZmZ ddlmZmZmZmZmZmZmZmZmZ erˆddlZejdkZejd	kZejd
kZe ¡ dkZejdkZ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'g d#¢Z(dS )$zn
compat
======

Cross-compatible functions for different versions of Python.

Other items:
* platform checker
é    )ÚannotationsN)ÚTYPE_CHECKING)ÚF)Úis_numpy_devÚnp_version_under1p21)	Úpa_version_under1p01Úpa_version_under2p0Úpa_version_under3p0Úpa_version_under4p0Úpa_version_under5p0Úpa_version_under6p0Úpa_version_under7p0Úpa_version_under8p0Úpa_version_under9p0)é   é	   )r   é
   )r   é   ÚPyPyl        r   Ústr)ÚfÚnameÚreturnc                 C  s$   || _ |j › d|› | _|j| _| S )z<
    Bind the name/qualname attributes of the function.
    Ú.)Ú__name__Ú__qualname__Ú
__module__)r   r   Úcls© r   úR/var/www/html/django/DPS/env/lib/python3.9/site-packages/pandas/compat/__init__.pyÚset_function_name,   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_endian6   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_windowsB   s    	r*   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_linuxN   s    	r,   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_macZ   s    	r.   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_armf   s    	ÿr3   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_environmentt   s    
r9   ztype[lzma.LZMAFile]c                  C  s.   zddl } W n ty&   tdƒ‚Y n0 | 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.
    r   Nzslzma module not available. A Python re-install with the proper dependencies, might be required to solve this issue.)ÚlzmaÚImportErrorÚRuntimeErrorÚLZMAFile)r:   r   r   r   Úget_lzma_file   s    ÿ
r>   )r   r   r   r   r	   r
   r   r   r   r   r   ))Ú__doc__Ú
__future__r   r6   r)   r#   Útypingr   Zpandas._typingr   Zpandas.compat.numpyr   r   Zpandas.compat.pyarrowr   r   r	   r
   r   r   r   r   r   r:   Úversion_infoÚPY39ÚPY310ÚPY311Úpython_implementationZPYPYÚmaxsizeZIS64r    r%   r*   r,   r.   r3   r9   r>   Ú__all__r   r   r   r   Ú<module>   s0   	,




