
    Nkf                        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 ddlZddlmZ ddlmZmZmZmZmZmZ erddlmZ ddZddZddZddZddZ ddZ!ddZ"ddZ#d dZ$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PYPY)is_numpy_dev)pa_version_under10p1pa_version_under11p0pa_version_under13p0pa_version_under14p0pa_version_under14p1pa_version_under16p0)Ffr   namestrclstypereturnc                N    || _         |j          d| | _        |j        | _        | S )z<
    Bind the name/qualname attributes of the function.
    .)__name____qualname__
__module__)r   r   r   s      V/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/pandas/compat/__init__.pyset_function_namer   (   s0     AJ--t--AN>ALH    boolc                 "    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	byteorder r    r   is_platform_little_endianr'   2   s     =H$$r    c                     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   is_platform_windowsr-   >   s     <...r    c                 "    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   is_platform_linuxr0   J   s     <7""r    c                 "    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   is_platform_macr3   V   s     <8##r    c                 x    t          j                    dv p%t          j                                        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   is_platform_armr:   b   s>     !55 9I9K9K9V9V: : r    c                 ,    t          j                    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,   r8   r&   r    r   is_platform_powerr>   p   s     !555r    c                 J    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   is_ci_environmentrF   |   s     :>>+s++s22r    (type[pandas.compat.compressors.LZMAFile]c                 x    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compressorshas_lzmaRuntimeErrorLZMAFiler&   r    r   get_lzma_filerO      s;     =$- 
5
 
 	

 =$--r    'type[pandas.compat.compressors.BZ2File]c                 x    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.)rI   rJ   rK   has_bz2rM   BZ2Filer&   r    r   get_bz2_filerT      s;     =$, 
5
 
 	

 =$,,r    )r   r   r   r   r   r   r   r   r   r   r   r	   r
   )r   r   r   r   r   r   r   r   )r   r!   )r   rG   )r   rP   )'__doc__
__future__r   rC   r,   r$   typingr   pandas.compat._constantsr   r   r   r   r	   r
   pandas.compat.compressorsrI   pandas.compat.numpyr   pandas.compat.pyarrowr   r   r   r   r   r   pandas._typingr   r   r'   r-   r0   r3   r:   r>   rF   rO   rT   __all__r&   r    r   <module>r^      s	    # " " " " " 				  



                            !       , , , , , ,                 !         	% 	% 	% 	%	/ 	/ 	/ 	/	# 	# 	# 	#	$ 	$ 	$ 	$   	6 	6 	6 	6
3 
3 
3 
3. . . ..- - - -.  r    