ó
    Ñ]j   ã                  óà   • S SK Jr  S SKJr  S SKrS SKrS SKJrJr  S SK	J
r
  S SKJr  S SKJr  \(       a  S SKJr  S S	KJrJrJr  \      SS
 j5       r\SS j5       r\SS j5       rSS jrg)é    )Úannotations)ÚcontextmanagerN)ÚIOÚTYPE_CHECKING)ÚCHAINED_WARNING_DISABLED)ÚChainedAssignmentError)Ú
get_handle)Ú	Generator)Ú
BaseBufferÚCompressionOptionsÚFilePathc              #  ót   #   • [        U SUSS9 nUR                  v •  SSS5        g! , (       d  f       g= f7f)zú
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)ÚcompressionÚis_textN)r	   Úhandle)Úpathr   r   s      ÚU/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pandas/_testing/contexts.pyÚdecompress_filer      s-   é € ô& 
�D˜$¨KÀÒ	GÈ6Ø�m‰mÒ÷ 
H×	GÖ	Güs   ‚8�'ž	8§
5±8c              #  ó¨   ^#   • SSK mSU4S jjn[        R                  R                  S5      nU" U 5         Sv •  U" U5        g! U" U5        f = f7f)ax  
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   Nc                óæ   >• [        TS5      (       aO  U c   [        R                  S	 g U [        R                  S'   [        R
                  S:w  a  TR                  5         g g g ! [         a     g f = f)NÚtzsetÚTZÚwin32)ÚhasattrÚosÚenvironÚKeyErrorÚsysÚplatformr   )ÚtzÚtimes    €r   ÚsetTZÚset_timezone.<locals>.setTZH   si   ø€ Ü�4˜×!Ñ!Ø‰zðÜŸ
™
 4Ñ(ð $&”—
‘
˜4Ñ ä—<‘< 7Ó*Ø—J‘J•Lð +ð "øô  ó Ùðús   —A# Á#
A0Á/A0r   )ÚreturnÚNone)r"   r   r   Úget)r!   r#   Úorig_tzr"   s      @r   Úset_timezoner)   1   sA   øé € ó* ÷!ô �j‰j�n‰n˜TÓ"€GÙ	ˆ"„IðÛáˆg�ø‰ˆg�üs   ƒ4A¸A ¼	AÁ
AÁAc              +  óº   #   • SSK n1 SknX;   a  [        S5      eUR                  " U 40 UD6   Sv •  UR                  U 5        g! UR                  U 5        f = f7f)a=  
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>   ÚunixÚexcelú	excel-tabz Cannot override builtin dialect.)ÚcsvÚ
ValueErrorÚregister_dialectÚunregister_dialect)ÚnameÚkwargsr.   Ú_BUILTIN_DIALECTSs       r   Úwith_csv_dialectr5   ]   sY   é € ó( â6ÐàÓ ÜÐ;Ó<Ð<à×Ò˜Ñ( Ò(ð%Ûà×Ñ˜tÕ$øˆ×Ñ˜tÕ$üs   ‚,A¯A ³AÁAÁAc                óš   • SSK Jn  [        (       a  U (       d  SSKJn  U" 5       $ U" U US9$ [
        nSnU (       a  U/U Q7nU" UU/UQ7S9$ )Nr   )Úassert_produces_warning)Únullcontext)ÚmatchzRA value is being set on a copy of a DataFrame or Series through chained assignment)Úpandas._testingr7   r   Ú
contextlibr8   r   )Úextra_warningsÚextra_matchr7   r8   Úwarningr9   s         r   Úraises_chained_assignment_errorr?      sj   € Ý7çÒÞÝ.á“=Ð á*ØØ!ñð ô
 )ˆð)ð 	ö ØÐ0 Ñ0ˆGÙ&ØØÐ'˜;Ñ'ñ
ð 	
ó    )r   zFilePath | BaseBufferr   r   r%   zGenerator[IO[bytes]])r!   Ústrr%   úGenerator[None])r2   rA   r%   rB   )© rC   )Ú
__future__r   r;   r   r   r   Útypingr   r   Úpandas.compatr   Úpandas.errorsr   Úpandas.io.commonr	   Úcollections.abcr
   Úpandas._typingr   r   r   r   r)   r5   r?   rC   r@   r   Ú<module>rK      sŒ   ðÝ "å %Û 	Û 
÷õ
 3Ý 0å 'æÝ)÷ñ ð ðØ
ðØ.@ðàóó ðð, ó(ó ð(ðV ó%ó ð%õB
r@   