o
    i                     @  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rDd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Z d&ddZ!d&ddZ"d&ddZ#d&ddZ$d&ddZ%d&dd Z&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        fr   namestrreturnc                 C  s$   || _ |j  d| | _|j| _| S )z<
    Bind the name/qualname attributes of the function.
    .)__name____qualname__
__module__)r   r   cls r   Q/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/pandas/compat/__init__.pyset_function_name,   s   r    boolc                   C  
   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      
	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   r'   r,   c                   C  r"   )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   r'   r.   c                   C  r"   )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   r'   r0   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aarch64armv)r+   machine
startswithr   r   r   r   is_platform_armf   s   	r6   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.
    	PANDAS_CI01)osenvirongetr   r   r   r   is_ci_environmentt   s   
r=   type[lzma.LZMAFile]c                  C  s(   zddl } W | jS  ty   tdw )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   
rC   )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   pandas._typingr   pandas.compat.numpyr   r   pandas.compat.pyarrowr   r   r	   r
   r   r   r   r   r   r?   version_infoPY39PY310PY311python_implementationPYPYmaxsizeIS64r    r&   r,   r.   r0   r6   r=   rC   __all__r   r   r   r   <module>   s2    	,












