
    ri                         d dl mZ d dlmZ d dlZd dlZd dlmZmZ d dl	m
Z
 d dlmZ d dlmZ erd dlmZ d d	lmZmZmZ edd            Zedd            Zedd            ZddZdS )    )annotations)contextmanagerN)IOTYPE_CHECKING)CHAINED_WARNING_DISABLED)ChainedAssignmentError)
get_handle)	Generator)
BaseBufferCompressionOptionsFilePathpathFilePath | BaseBuffercompressionr   returnGenerator[IO[bytes]]c              #  t   K   t          | d|d          5 }|j        V  ddd           dS # 1 swxY w Y   dS )a&  
    Open a compressed file and return a file object.

    Parameters
    ----------
    path : str
        The path where the file is read from.

    compression : {'gzip', 'bz2', 'zip', 'xz', 'zstd', None}
        Name of the decompression to use

    Returns
    -------
    file object
    rbF)r   is_textN)r	   handle)r   r   r   s      n/var/www/html/pippo.cuttalo.com/services/trading/venv/lib/python3.11/site-packages/pandas/_testing/contexts.pydecompress_filer      s      & 
D$K	G	G	G 6m                 s   
-11tzstrGenerator[None]c              #     K   ddl dfd}t          j                            d          } ||            	 dV   ||           dS #  ||           w xY w)a  
    Context manager for temporarily setting a timezone.

    Parameters
    ----------
    tz : str
        A string representing a valid timezone.

    Examples
    --------
    >>> from datetime import datetime
    >>> from dateutil.tz import tzlocal
    >>> tzlocal().tzname(datetime(2021, 1, 1))  # doctest: +SKIP
    'IST'

    >>> with set_timezone("US/Eastern"):
    ...     tzlocal().tzname(datetime(2021, 1, 1))
    'EST'
    r   Nr   Nonec                    t          d          rX| !	 t          j        d= d S # t          $ r Y d S w xY w| t          j        d<   t          j        dk    r                                 d S d S d S )NtzsetTZwin32)hasattrosenvironKeyErrorsysplatformr   )r   times    r   setTZzset_timezone.<locals>.setTZH   s    4!! 
	!z
4(((   DD $&
4 <7**JJLLLLL
	! 
	! +*s   $ 
22r    )r   r   )r(   r#   r$   get)r   r)   orig_tzr(   s      @r   set_timezoner,   1   s      * KKK! ! ! ! ! ! jnnT""G	E"IIIggs   A
 
Anamec              +     K   ddl }h d}| |v rt          d           |j        | fi | 	 dV  |                    |            dS # |                    |            w xY w)au  
    Context manager to temporarily register a CSV dialect for parsing CSV.

    Parameters
    ----------
    name : str
        The name of the dialect.
    kwargs : mapping
        The parameters for the dialect.

    Raises
    ------
    ValueError : the name of the dialect conflicts with a builtin one.

    See Also
    --------
    csv : Python's CSV library.
    r   N>   	excel-tabunixexcelz Cannot override builtin dialect.)csv
ValueErrorregister_dialectunregister_dialect)r-   kwargsr2   _BUILTIN_DIALECTSs       r   with_csv_dialectr8   ]   s      ( JJJ666   ;<<<C(((((%t$$$$$t$$$$s   A A c                    ddl m} t          r| sddlm}  |            S  || |          S t
          }d}| r|g| R } |||g|R           S )Nr   )assert_produces_warning)nullcontext)matchzRA value is being set on a copy of a DataFrame or Series through chained assignment)pandas._testingr;   r   
contextlibr<   r   )extra_warningsextra_matchr;   r<   warningr=   s         r   raises_chained_assignment_errorrC      s    777777 
 	......;== **!   
 )) 	  	1000G&&';''
 
 
 	
    )r   r   r   r   r   r   )r   r   r   r   )r-   r   r   r   )r9   r9   )
__future__r   r?   r   r#   r&   typingr   r   pandas.compatr   pandas.errorsr   pandas.io.commonr	   collections.abcr
   pandas._typingr   r   r   r   r,   r8   rC   r9   rD   r   <module>rL      sg   " " " " " " % % % % % % 				 



       
 3 2 2 2 2 2 0 0 0 0 0 0 ' ' ' ' ' ' ))))))             , ( ( ( (V % % % %B
 
 
 
 
 
rD   