
    Mh                        S SK r S SKrS SKrS SKrS SKrS SKJrJrJrJ	r	  S SK
Js  Jr  S SKJs  Jr  S SKJr  \R(                  S 5       r\R(                  S 5       r\R(                  S 5       r\R(                  S 5       r\R(                  S 5       r\R(                  S	 5       r\R(                  S
 5       r\R(                  S 5       r\R(                  S 5       r\R(                  S 5       r\R(                  S 5       r\R(                  S 5       r \R(                  S 5       r!SSSSSSSSSS\RD                  " S\RF                  " S5      S9\RD                  " S\RF                  " S5      S9/r$\R(                  " \$SS S 9S! 5       r%\R(                  " \$S 9S" 5       r&\R(                  " S#\RD                  " S$\RF                  " S$5      S9/S 9S% 5       r'g)&    N)is_ci_environmentis_platform_armis_platform_macis_platform_windowsread_csvc                  t    [         R                  R                  5        V Vs0 s H  u  pX_M	     snn $ s  snn f N)icomextension_to_compressionitems)keyvalues     J/var/www/html/env/lib/python3.13/site-packages/pandas/tests/io/conftest.pycompression_to_extensionr      s/    )-)F)F)L)L)NO)N:3EJ)NOOOs   4c                     U " SSSS5      $ )zPath to the tips datasetiodatacsvtips.csv datapaths    r   	tips_filer      s     D&%44    c                     U " SSSS5      $ )zPath to a JSONL datasetr   parserr   items.jsonlr   r   s    r   
jsonl_filer      s     D(FM::r   c                 (    [        U " SSSS5      SS9$ )z#DataFrame with the salaries datasetr   r   r   zsalaries.csv	)sepr   r   s    r   salaries_tabler#   %   s     HT8V^D$OOr   c                     U " SSSS5      $ )Nr   r   featherzfeather-0_3_1.featherr   r   s    r   feather_filer&   +   s    D&)-DEEr   c                     U " SSSS5      $ )Nr   r   xml	books.xmlr   r   s    r   xml_filer*   0   s    D&%55r   c              #     #    [         R                  " S5        [         R                  " S5        UR                  SS5        UR                  SS5        [        5       (       aI  [	        5       (       d  [        5       (       d  [        5       (       a  [         R                  " S5        gSv   g[         R                  " S	5      n[         R                  " S
5        [         R                  " S5        U S:X  a  SOU R                  S5      n SU  3nSU S3n[        R                  " [        R                  " SU 35      [        R                  [        R                  S9 nSnUS:  aH   UR                  U5      nUR                  (       a  O$ US-  n["        R$                  " S5        US:  a  MH  Uv   UR'                  5         SSS5        g! [          a     NLf = f! , (       d  f       g= f7f)z
Fixture for mocking S3 interaction.

Sets up moto server in separate process locally
Return url for motoserver/moto CI service
s3fsboto3AWS_ACCESS_KEY_ID
foobar_keyAWS_SECRET_ACCESS_KEYfoobar_secretzOS3 tests do not have a corresponding service in Windows, macOS or ARM platformszhttp://localhost:5000requestsmotoflaskmaster5gw555zhttp://127.0.0.1:/zmoto_server s3 -p )stdoutstderr   r   g?N)pytestimportorskipsetenvr   r   r   r   skiplstrip
subprocessPopenshlexsplitDEVNULLgetok	Exceptiontimesleep	terminate)	worker_idmonkeypatchr2   endpoint_portendpoint_uriproctimeoutrs           r   s3_baserT   5   s     
  *L9.@ 1 15H5J5J KK2 *)&&z2F#G$
 %0Ci6F6Ft6L	i[)*=/; KK,]O<=%%%%
 GA+ \2Att  3

3 A+ NN%
 
 ! 
 
sH   EG)	G$"G#G+G?	G)
GGGG
G&"G)c                     SSU 00$ )Nclient_kwargsendpoint_urlr   )rT   s    r   s3sorX   t   s    ng677r   c                 .    SS K nUR                  SU S9nU$ )Nr   s3)rW   )r-   resource)rT   r-   rZ   s      r   s3_resourcer\   y   s    	7	3BIr   c              #      #    U R                  S[        R                  " 5        35      nUR                  5         Uv   UR                  R                  5         UR                  5         g 7f)Nzpandas-test-Bucketuuiduuid4createobjectsdeleter\   buckets     r   s3_public_bucketrg      sI     ,tzz|n =>F
MMO
L
NN
MMOs   A'A)c                     SU4SU4SUS-   4SUS-   4SU4SU4S	U4/nU H)  u  pg[        US
5       nU R                  XhS9  SSS5        M+     U $ ! , (       d  f       M>  = fz[
The following datasets
are loaded.

- tips.csv
- tips.csv.gz
- tips.csv.bz2
- items.jsonl
z
tips#1.csvr   ztips.csv.gz.gzztips.csv.bz2.bz2r   zsimple_dataset.featherr)   rb)KeyBodyNopen
put_object)	rg   r   r   r&   r*   test_s3_filess3_key	file_namefs	            r   s3_public_bucket_with_datarv      s     
y!	Y		E)*	V+,	
#	!<0	hM +)T"a''F'; #" +  #"   A
A	c              #      #    U R                  S[        R                  " 5        35      nUR                  SS9  Uv   UR                  R                  5         UR                  5         g 7f)Nzcant_get_it-private)ACLr^   re   s     r   s3_private_bucketr{      sN     ,tzz|n =>F
MMiM 
L
NN
MMOs   A&A(c                     SU4SU4SUS-   4SUS-   4SU4SU4S	U4/nU H)  u  pg[        US
5       nU R                  XhS9  SSS5        M+     U $ ! , (       d  f       M>  = fri   ro   )	r{   r   r   r&   r*   rr   rs   rt   ru   s	            r   s3_private_bucket_with_datar}      s     
y!	Y		E)*	V+,	
#	!<0	hM +)T"a((V(< #" +  #"rw   )z.no_compressN) N)rj   gzip)z.GZr   )rk   bz2)z.BZ2r   )z.zipzip)z.ZIPr   )z.xzxz)z.XZr   )z.zstzstd	zstandard)marks)z.ZSTr      )paramsc                     U R                   $ r
   paramrequests    r   compression_formatr      s    ==r   c                      U R                   S   $ )Nr   r   r   s    r   compression_extr      s    ==r   pythonpyarrowc                     U R                   $ )zR
Parametrized fixture for pd.options.mode.string_storage.

* 'python'
* 'pyarrow'
r   r   s    r   string_storager      s     ==r   )(rD   rB   rJ   r`   r=   pandas.compatr   r   r   r   pandas.util._test_decoratorsutil_test_decoratorstdpandas.io.commonr   commonr   pandas.io.parsersr   fixturer   r   r   r#   r&   r*   rT   rX   r\   rg   rv   r{   r}   r   
skip_if_no_compression_formats_paramsr   r   r   r   r   r   <module>r      sE         * )   & P P 5 5
 ; ;
 P P
 F F 6 6 ; ;| 8 8      6    8 
LL!{)CD
LL!{)CD   21267 8 23 4 YbmmI&>?r   