+
    xȇia                     L   R t ^ RIt^ RIt^ RIHt ^ RIHtHtHt ^ RI	t	^ RI
t
^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ^ RIHt ^ RIHu Ht ^ RIt^ RIHt ^ RI Hu H!t" ]PF                  PI                  R4      t% ! R R	4      t&]
PN                  PQ                  ]
PN                  PS                  ]*4      4      t+ ! R
 R4      t,]PZ                  R 4       t. ! R R4      t/R t0R t1]PF                  Pe                  RRR.4      R 4       t3R t4]PF                  Pe                  R]RR3]RR3.4      R 4       t5]PF                  Pe                  RRR.4      ]PF                  Pe                  RRR.4      R 4       4       t6]PF                  Pe                  R^ R.4      R  4       t7R! t8]PF                  Ps                  ]R"R#7      R$ 4       t:R% t;R& t<]Pz                  ! R'4      ]PF                  Pe                  R(RR).4      R* 4       4       t>]PF                  Pe                  R+]P~                  ]P                  ]P                  ]P                  ]P                  ]P                  ]P                  ]P                  ]P                  .	4      R, 4       tH]Pz                  ! R-4      R. 4       tIR# )/z0
Tests for the pandas.io.common functionalities
N)partial)BytesIOStringIOUnsupportedOperation)Path)WASMis_platform_windows)pa_version_under19p0z=ignore:Passing a BlockManager to DataFrame:DeprecationWarningc                   <   a  ] tR t^'t o RtV 3R lR ltR tRtV tR# )CustomFSPathz%For testing fspath on unknown objectsc                   < V ^8  d   QhRR/# )   returnN )format__classdict__s   "k/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/io/test_common.py__annotate__CustomFSPath.__annotate__*   s           c                    Wn         R # Npath)selfr   s   &&r   __init__CustomFSPath.__init__*   s    	r   c                    V P                   # r   r   r   s   &r   
__fspath__CustomFSPath.__fspath__-   s    yyr   r   N)	__name__
__module____qualname____firstlineno____doc__r   r   __static_attributes____classdictcell__r   s   @r   r   r   '   s     /  r   r   c                     a  ] tR t^5t o RtR tR tR tR tR t	]
P                  P                  R]]].4      R 4       t]
P                  P                  R]]].4      R	 4       tR
 tR tR tR t]
P                  P-                  ]RR7      ]
P                  P                  R]P2                  R]R3]P6                  R]R3]P8                  R]R3]P:                  R]R3]P>                  R]R3]P@                  R]R3]PB                  R]R3]PD                  R]R3]PF                  R]R3.	4      R 4       4       t$]
P                  P                  R]PJ                  PL                  R]R3]PJ                  PN                  R]R 3]PJ                  PP                  R]R3]PJ                  PR                  R]R3]PJ                  PT                  R]R!3]PJ                  PV                  R]R3]PJ                  PX                  R]R3]PJ                  PZ                  R]R3.4      R" 4       t.]
P                  P-                  ]RR7      ]
P                  P                  R]P2                  R]R3]P^                  R]R3]P6                  R]R3]P8                  R]R3]P:                  R]R3]P>                  R]R3]P@                  R]R3]PB                  R]R3]PD                  R]R3]PF                  R]R3.
4      R# 4       4       t0]
P                  P                  R$]P2                  RR73]P^                  RR73]P6                  RR83]P8                  RR93]P:                  RR:3]P>                  RR;3]P@                  RR<3]PB                  RR=3]PD                  RR>3]PF                  RR?3.
4      R% 4       t1]
P                  P                  R&R'/ R3R(R)R*/R*3R+/ R3R,/ R3R-/ R3R./ R3R// R3R0R1]Pd                  ! R24      /R3.4      R3 4       t3R4 t4R5t5V t6R6# )@TestCommonIOCapabilitiesziindex,A,B,C,D
foo,2,3,4,5
bar,7,8,9,10
baz,12,13,14,15
qux,12,13,14,15
foo2,12,13,14,15
bar2,12,13,14,15
c                    R p\         P                  ! V4      pW!8w  g   Q h\        P                  P	                  V4      '       g   Q h\        P                  P                  V4      V8X  g   Q hR# )z
~/sometestN)icom_expand_userosr   isabs
expanduserr   filenameexpanded_names   &  r   test_expand_user)TestCommonIOCapabilities.test_expand_user?   sY    ))(3(((ww}}]++++ww!!(+}<<<r   c                    R p\         P                  ! V4      pW!8X  g   Q h\        P                  P	                  V4      V8X  g   Q hR# )z/somefolder/sometestN)r,   r-   r.   r   r0   r1   s   &  r   test_expand_user_normal_path5TestCommonIOCapabilities.test_expand_user_normal_pathG   s@    )))(3(((ww!!(+}<<<r   c                    \         P                  ! \        R 4      4      pVR 8X  g   Q h\         P                  ! \        R4      4      pV\        P                  P                  RR4      8X  g   Q hR# ).zfoo//barfoobarN)r,   stringify_pathr   r.   r   join)r   rel_pathredundant_paths   &  r   test_stringify_path_pathlib4TestCommonIOCapabilities.test_stringify_path_pathlibN   sT    &&tCy13,,T*-=>eU!;;;;r   c                Z    \        R 4      p\        P                  ! V4      pVR 8X  g   Q hR# )foo/bar.csvN)r   r,   r=   )r   presults   &  r   test_stringify_path_fspath3TestCommonIOCapabilities.test_stringify_path_fspathT   s*    '$$Q'&&&r   c                    \         P                  ! R 4      pVP                  RV 2RR7      ;_uu_ 4       pV\        P                  ! V4      8X  g   Q h RRR4       R#   + '       g   i     R# ; i)fsspeczfile://wbmodeN)pytestimportorskipopenr,   r=   )r   	temp_filerJ   
fsspec_objs   &&  r   !test_stringify_file_and_path_like:TestCommonIOCapabilities.test_stringify_file_and_path_likeY   sV    $$X.[[79+.T[::j!4!4Z!@@@@ ;:::s   AA/		path_typec                l    Vw  r4V! R V,           4      p\         P                  ! VRR7      pWd8X  g   Q hR# )rD   infer)compressionN)r,   infer_compression)r   compression_formatrU   	extensionexpectedr   rX   s   &&&    r    test_infer_compression_from_path9TestCommonIOCapabilities.test_infer_compression_from_path_   s7    0	23,,TwG&&&r   c           	     L   \         P                  ! \        P                  ! 4       R 7      ;_uu_ 4       pV! R\        V4      P                  ,           R,           4      p\
        P                  ! VR4      ;_uu_ 4       p\        VP                  P                  4      P                  4       '       g   Q h\        P                  P                  V4      VP                  P                  8X  g   Q h RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i))dirz~/z	/sometestwN)tempfileTemporaryDirectoryr   homenamer,   
get_handlehandleis_absoluter.   r   r0   )r   rU   tmpr2   handless   &&   r   test_get_handle_with_path2TestCommonIOCapabilities.test_get_handle_with_pathf   s    ((TYY[99S S	!6!DEH3//7GNN//0<<>>>>ww))(3w~~7J7JJJJ 0 :9// :99s%   A	D<A0C?	-D?D
DD#	c           	     R   \        4       ;_uu_ 4       p\        P                  ! VR 4      ;_uu_ 4       pVP                  V8X  g   Q h RRR4       VP                  '       d   Q h RRR4       XP                  '       g   Q hR#   + '       g   i     LC; i  + '       g   i     L9; i)rN)r   r,   rf   rg   closed)r   input_bufferrj   s   &  r   test_get_handle_with_buffer4TestCommonIOCapabilities.test_get_handle_with_buffern   st    ZZ<s33w~~555 4#******  """"" 43 Zs(    BB	B"BBBB&	c                   R p\         P                  ! \        V4      RRR7      ;_uu_ 4       pRp^p VP                  P	                  V4      p\        V4      V8:  g   Q h\        V4      V8  d4   \        VP                  P	                  4       4      ^ 8X  g   Q hW5,          pM
W5,          pK{  W1P                  R4      8X  g   Q h RRR4       R#   + '       g   i     R# ; i)&   a,b,c
1,2,3
©,®,®
Look,a snake,🐍rbFis_textr   utf-8N)r,   rf   r   rg   readlenencode)r   datarj   rF   	chunksizechunks   &     r   )test_bytesiowrapper_returns_correct_bytesBTestCommonIOCapabilities.test_bytesiowrapper_returns_correct_bytesv   s     __Xd^T5AAWFI++I65zY...u:	) w~~2245:::OF[[1111 BAAAs   BCC 	c           	        \         P                  ! R 4      pRp\        P                  ! R. R
OR. ROR. RO/4      p\	        V4      p\
        P                  ! VRRR7      ;_uu_ 4       pVP                  VP                  4      P                  4       p\        '       d   VP                  R4      p\        P                  ! Wc4       VP                  '       d   Q h R	R	R	4       R	#   + '       g   i     R	# ; i)zpyarrow.csvrt   abcru   Frv   objectN)1   ©Look)2   ®za snake)3r   u   🐍)rN   rO   pd	DataFramer   r,   rf   read_csvrg   	to_pandasr	   astypetmassert_frame_equalro   )r   pa_csvr|   r\   srj   dfs   &      r   test_get_handle_pyarrow_compat7TestCommonIOCapabilities.test_get_handle_pyarrow_compat   s    $$]3 <<%s,BCI\]
 TN__Qe440::<B###??84!!"/xxx<x 5444s   'A1C##C4	c                   \         P                  ! \        V P                  4      ^R7      ;_uu_ 4       p\         P                  ! VRR7      pRRR4       \         P                  ! \        V P                  4      4      p\
        P                  ! XV4       \         P                  ! \        V P                  4      ^R7      ;_uu_ 4       p\        V4      p\
        P                  ! WSP                  ^ .,          4       \
        P                  ! \         P                  ! V4      VP                  R,          4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)   )r}   T)ignore_indexN:r   NN)	r   r   r   data1concatr   r   nextiloc)r   readerrF   r\   itfirsts   &     r   test_iterator&TestCommonIOCapabilities.test_iterator   s    [[$**-;;vYYvD9F <;;x

34
fh/ [[$**-;;rHE!!%s);<!!"))B-r1BC <; <; <;;s   EA0EE	E&	"limited file system access on WASMreasonz#reader, module, error_class, fn_extr.   csvtxtxlrdxlsxpyarrowfeathertablesh5dtasas7bdatjsonpicklec                   \         P                  ! V4       \        P                  P	                  \
        R RV,           4      pRV R2pRV R2pRpRp	RV R	V R2p
R
V R2pRV R2pRV 2p\         P                  ! VRV RV RV RV	 RV
 RV RV RV R2R7      ;_uu_ 4        V! V4       RRR4       R#   + '       g   i     R# ; i)r|   does_not_exist.File (b')?.+does_not_exist\.'? does not exist:\[Errno 2\] No such file or directory: '.+does_not_exist\.'zExpected object or value7path_or_buf needs to be a string file path or file-like#\[Errno 2\] File .+does_not_exist\.$ does not exist: '.+does_not_exist\.<   \[Errno 2\] 没有那个文件或目录: '.+does_not_exist\.?\[Errno 2\] File o directory non esistente: '.+does_not_exist\.+Failed to open local file.+does_not_exist\.(|)matchN)rN   rO   r.   r   r>   HEREraises)r   r   moduleerror_classfn_extr   msg1msg2msg3msg4msg5msg6msg7msg8s   &&&&&         r   test_read_non_existent/TestCommonIOCapabilities.test_read_non_existent   s     	F#ww||D&*;f*DE.vh6GHLVHTUV)H26( ;##)(!- 	 OvhVWXNvhVWX 	 >fXF]]tfAdV1TF!D64&$qavQO
 
 4L	
 
 
 
s   &	B99C
	z#method, module, error_class, fn_exthtmlparquetc           	     Z   \         P                  ! V4       \        P                  ! R . R	OR. R
OR. RO/4      p\        P
                  P                  \        RRRV,           4      p\         P                  ! VRR7      ;_uu_ 4        V! WV4       RRR4       R#   + '       g   i     R# ; i)r   r   r   r|   missing_folderr   z@Cannot save file into a non-existent directory: .*missing_folderr   N)r   r      )r   r      )r   r      )	rN   rO   r   r   r.   r   r>   r   r   )r   methodr   r   r   dummy_framer   s   &&&&&  r   #test_write_missing_parent_directory<TestCommonIOCapabilities.test_write_missing_parent_directory   s     	F#llCCC#STww||D&*:<MPV<VW]]U
 
 ;%	
 
 
 
s   	BB*	c                   \         P                  ! V4       \        P                  P	                  R RV,           4      pVP                  \        RR 4       RV R2pRV R2pRp	R	p
R
V RV R2pRV R2pRV R2pRV 2p\         P                  ! VRV RV RV	 RV
 RV RV RV RV R2R7      ;_uu_ 4        V! V4       RRR4       R#   + '       g   i     R# ; i)~r   r-   c                 B    \         P                  P                  R V 4      # )r;   )r.   r   r>   )xs   &r   <lambda>JTestCommonIOCapabilities.test_read_expands_user_home_dir.<locals>.<lambda>  s    BGGLLPQ<Rr   r   r   r   r   z0Unexpected character found when decoding 'false'r   r   r   r   r   r   r   r   r   r   N)rN   rO   r.   r   r>   setattrr,   r   )r   r   r   r   r   monkeypatchr   r   r   r   r   r   r   r   r   s   &&&&&&         r   test_read_expands_user_home_dir8TestCommonIOCapabilities.test_read_expands_user_home_dir   s   & 	F#ww||C!2V!;<D.2RS.vh6GHLVHTUVAH26( ;##)(!- 	 OvhVWXNvhVWX 	 >fXF]]tfAdV1TF!D64&$qavQO
 
 4L	
 
 
 
s   9	CC	zreader, module, pathc                    \         P                  ! V4       V! V!  p\        V4      pV! V4      pV! V4      pVP                  R 4      '       d   \        P
                  ! Wg4       R# \        P                  ! Wg4       R# )z.pickleN)rN   rO   r   endswithr   assert_categorical_equalr   )r   r   r   r   datapathmypathrF   r\   s   &&&&&   r   test_read_fspath_all-TestCommonIOCapabilities.test_read_fspath_all  sc    @ 	F#d#$<==##''9!!&3r   z"writer_name, writer_kwargs, moduleto_csvto_excelengineopenpyxl
to_featherto_htmlto_jsonto_latex	to_pickleto_stata
time_stampz2019-01-01 00:00c           	        VR9   d   \         P                  ! R4       \        VR,          4      p\        VR,          4      p\        P                  ! R^^./4      p\         P                  ! V4       \        V4      p\        Wq4      p	V	! V3/ VB  V	! V3/ VB  \        VR4      ;_uu_ 4       p
\        VR4      ;_uu_ 4       pVR8X  dF   \        P                  ! V
3/ VB p\        P                  ! V3/ VB p\        P                  ! W4       M(V
P                  4       pVP                  4       pW8X  g   Q hRRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)	r   jinja2stringfspathAru   r   N)r   )rN   rO   strr   r   r   getattrrP   
read_excelr   r   ry   )r   writer_namewriter_kwargsr   tmp_pathr   r   r   r   writerf_strf_pathrF   r\   s   &&&&&         r   test_write_fspath_all.TestCommonIOCapabilities.test_write_fspath_allG  s#    ,&)X()X()\\3A-(F#f%)v''v''&$5$vt*<*<j( u>>==A=A%%f7!;;=))) +=*<*<s%   .EA5E
	8E
EEE.	c                   \         P                  ! R 4       \        P                  ! R^^./4      p\	        VR,          4      p\	        VR,          4      p\        V4      pVP                  VRR7       VP                  VRR7       \        P                  ! VRR7      p\        P                  ! VRR7      p\        P                  ! Wg4       R# )r   r   r   r   r<   )keyN)
rN   rO   r   r   r   r   to_hdfread_hdfr   r   )r   r  r   r   r   r   rF   r\   s   &&      r   test_write_fspath_hdf5/TestCommonIOCapabilities.test_write_fspath_hdf5m  s     	H%\\3A-(X()X()f%
		&e	$
		&e	$V/;;v51
f/r   r   N)ior|   r   ziris.csv)r  r|   fixed_widthzfixed_width_format.txt)r  r|   excelz
test1.xlsx)r  r|   r   zfeather-0_3_1.feather)r  r|   
legacy_hdfzpytables_native2.h5)r  r|   statazstata10_115.dta)r  sasr|   ztest1.sas7bdat)r  r   r|   ztsframe_v012.json)r  r|   r   zcategorical.0.25.0.pickle)7r!   r"   r#   r$   r   r4   r7   rA   rG   rS   rN   markparametrizer   r   r   r]   rk   rq   r   r   r   skipifr   r   r   FileNotFoundErrorread_fwfr  read_featherOSErrorr  
read_stataread_sas	read_jsonread_pickler   r   r   r   r   r   
to_parquetr   r   r   r   
read_tabler   r   to_datetimer  r  r&   r'   r(   s   @r   r*   r*   5   s    E==<'
A [[[3d*CD' E' [[[3d*CDK EK#2. &
D [[%IJ[[-[[$ 159[[$ 159]]F$5v>__i)<[[($5t<]]D"3U;[[$ 1:>\\4!2F;^^T#4h?
	
 K0 [[-\\  $7\\!!4&9\\""FGV<\\$$i)D\\$$i)D\\""D'59\\!!4&9\\##T7H=		
&& [[%IJ[[-[[$ 159]]D"3U;[[$ 159]]F$5v>__i)<[[($5t<]]D"3U;[[$ 1:>\\4!2F;^^T#4h?	
 K 8 [[[[$ AB]]D"CDG
 ]]F$IJB C
 ]]D"LM[[$ GH\\4!LME-	
>4?>4 [[,r4 (J/<2y)D!D!T""d#,7I(JKTR		
**20 0r   r*   c                     V ! R RRR4      # )r  r|   r   ztest_mmap.csvr   )r   s   &r   	mmap_filer%    s    D&%99r   c                   B  a  ] tR tRt o ]P
                  P                  ]RR7      R 4       t]P
                  P                  ]RR7      R 4       t	R t
R t]P
                  P                  RR	R
.4      ]P
                  P                  RRR.4      R 4       4       tRtV tR# )TestMMapWrapperi  r   r   c                >   \        R 4      pR Vn        \        4       '       d
   Rp\        pMRp\        P
                  p\        P                  ! WCR7      ;_uu_ 4        \        P                  ! VR4       RRR4       \        VRR7      ;_uu_ 4       p RRR4       R	p\        P                  ! \        VR7      ;_uu_ 4        \        P                  ! XR4       RRR4       R#   + '       g   i     Lw; i  + '       g   i     Lk; i  + '       g   i     R# ; i)
zI am not a filec                      R# )r   r   r   r   r   r   ;TestMMapWrapper.test_constructor_bad_file.<locals>.<lambda>  s    "r   zThe parameter is incorrectz
[Errno 22]r   TNrx   encodingzI/O operation on closed file)r   filenor   r  mmaperrorrN   r   r,   _maybe_memory_maprP   
ValueError)r   r%  non_filemsgerrtargets   &&    r   test_constructor_bad_file)TestMMapWrapper.test_constructor_bad_file  s    -.$   .CCC**C]]3**""8T2 + )g..& / -]]:S11""640 21 +* /. 211s$   C%C8D%C5	8D	D	c                   \        VR R7      ;_uu_ 4       pVP                  4       p\        P                  ! VRRRR7      ;_uu_ 4       pVP                  p\        VP                  P                  \        P                  4      '       g   Q hV F3  p\        V4      pVP                  4       VP                  4       8X  d   K3  Q h	  \        P                  ! \        RR7      ;_uu_ 4        \        V4       RRR4       RRR4       RRR4       R#   + '       g   i     L"; i  + '       g   i     L-; i  + '       g   i     R# ; i)rx   r,  rn   T)rw   
memory_mapz^$r   N)rP   	readlinesr,   rf   rg   
isinstancebufferr/  r   striprN   r   StopIteration)r   r%  r6  lineswrapperswrapperline	next_lines   &&      r   	test_nextTestMMapWrapper.test_next  s    )g..&$$&ETd "//!'.."7"7CCCC!D $WI$??,

<<< " ]]=>>M ? /. ?>  /..sB   3D5	A3D"	(D"	)D5D"	=D5DD"	"D2-D55E	c                   \         P                  ! R \        P                  ! ^x4      P	                  R	4      ,          \         P
                  ! \        R4      4      \         P
                  ! \        ^4       Uu. uF  pRV 2NK
  	  up4      R7      pVP                  V4       \        P                  ! \        RR7      ;_uu_ 4        \         P                  ! VRR7       RRR4       R# u upi   + '       g   i     R# ; i)
皙?ABCDi-columnsindexzUnknown enginer   pyt)r   N   r   )r   r   nparangereshapeIndexlistranger   rN   r   r2  r   r   rQ   ir   s   &&  r   test_unknown_engine#TestMMapWrapper.test_unknown_engine  s    \\"))C.((11HHT&\*((eBi8ibHi89

 			)]]:-=>>KK	%0 ?> 9 ?>>s   7C)C..C?	c                   \         P                  ! R\        P                  ! ^x4      P	                  R	4      ,          \         P
                  ! \        R4      4      \         P
                  ! \        ^4       Uu. uF  pRV 2NK
  	  up4      R7      pVP                  VRR7       \        P                  ! V\         P                  ! V^ R7      4       R# u upi )
zD
'encoding' shouldn't be passed to 'open' in binary mode.

GH 35058
rH  rI  rJ  rK  zw+brL   	index_colNrO  )r   r   rQ  rR  rS  rT  rU  rV  r   r   r   r   rW  s   &&  r   test_binary_mode TestMMapWrapper.test_binary_mode  s     \\"))C.((11HHT&\*((eBi8ibHi89

 			)%	(
b"++i1"EF 9s   7Cr-  zutf-16zutf-32compression_bz2xzc                   \         P                  ! R\        P                  ! ^x4      P	                  R
4      ,          \         P
                  ! \        R4      4      \         P
                  ! \        ^4       Uu. uF  pRV 2NK
  	  up4      R7      p\        P                  ! \        RR7      ;_uu_ 4        VP                  W2VR7       RRR4       R	p\        P                  ! \        VR7      ;_uu_ 4        \         P                  ! W2VR7       RRR4       R# u upi   + '       g   i     L^; i  + '       g   i     R# ; i)zz
bz2 and xz do not write the byte order mark (BOM) for utf-16/32.

https://stackoverflow.com/questions/55171439

GH 35681
rH  rI  rJ  rK  zbyte order markr   )rX   r-  NzHUTF-\d+ stream does not start with BOM|'utf-\d+' codec can't decode byterO  )r   r   rQ  rR  rS  rT  rU  rV  r   assert_produces_warningUnicodeWarningr   rN   r   UnicodeErrorr   )r   r-  r`  rQ   rX  r   r4  s   &&&&   r   test_warning_missing_utf_bom,TestMMapWrapper.test_warning_missing_utf_bom  s     \\"))C.((11HHT&\*((eBi8ibHi89

 ''>OPPIIiHIM Q
1 	 ]]<s33KK	hO 43 9PP 433s   7D5D7D2D/	2E	r   N)r!   r"   r#   r$   rN   r  r  r   r7  rE  rY  r^  r  rg  r&   r'   r(   s   @r   r'  r'    s     [[%IJ1 K1, [[%IJ" K""1G [[Z(H)=>[[^eT];P < ?Pr   r'  c                  "   \         P                  ! R 4      '       g   Q h\         P                  ! R4      '       g   Q h\         P                  ! R4      '       d   Q h\         P                  ! R4      '       d   Q h\         P                  ! R4      '       d   Q h\         P                  ! R4      '       d   Q h\         P                  ! R4      '       d   Q h\         P                  ! R4      '       d   Q h\         P                  ! R4      '       g   Q hR	# )
zgcs://pandas/somethingelse.comzgs://pandas/somethingelse.comzhttp://pandas/somethingelse.comzrandom:pandas/somethingelse.comz/local/pathzrelative/local/pathzthis is not fsspec://urlz({'url': 'gs://pandas/somethingelse.com'}z#RFC-3986+compliant.spec://somethingNr,   is_fsspec_urlr   r   r   test_is_fsspec_urlrl    s    >????=>>>>!!"CDDDD!!"CDDDD!!-0000!!"78888!!"<====!!"LMMMMCDDDDr   c                     \         P                  ! R 4      '       g   Q h\         P                  ! R4      '       g   Q h\         P                  ! R4      '       g   Q h\         P                  ! R4      '       g   Q h\         P                  ! R4      '       d   Q h\         P                  ! R4      '       d   Q h\         P                  ! R4      '       d   Q hR# )zfilecache::s3://pandas/test.csvz0zip://test.csv::filecache::gcs://bucket/file.zipz0filecache::zip://test.csv::gcs://bucket/file.zipz%filecache::dask::s3://pandas/test.csvzfilecache:s3://pandas/test.csvz filecache:::s3://pandas/test.csvzfilecache::://pandas/test.csvNrj  r   r   r   test_is_fsspec_url_chainedrn    s     ?@@@@PQQQQPQQQQEFFFF!!"BCCCC!!"DEEEE!!"ABBBBBr   r   r   r   c                    \         P                  ! R \        P                  ! ^x4      P	                  R4      ,          \         P
                  ! \        R4      4      \         P
                  ! \        ^4       Uu. uF  pRV 2NK
  	  up4      R7      p\        VRRR7      ;_uu_ 4       p\        VRV  24      ! V4       RRR4       \        VRR	7      ;_uu_ 4       pV R
8X  d   \         P                  ! V^ R7      pM\         P                  ! V4      pRRR4       \        P                  ! VX4       R# u upi   + '       g   i     L; i  + '       g   i     LA; i)rH  rI  rJ  rK  ra   rx   )rM   r-  to_Nr,  r   r\  rO  )r   r   rQ  rR  rS  rT  rU  rV  rP   r   r   r  r   r   )r   rQ   rX  r\   rg   r   s   &&    r   test_codecs_encodingrq    s     ||biin$$W--f&hh%)4)Q"QC)45H
 
icG	4	4Cx.)&1 
5	i'	*	*fU?Vq1Bf%B	 
+
 (B' 5	4	4	*	*s   7D2'D77E
7E	
E	c                 p   \         P                  ! R \        P                  ! ^x4      P	                  R	4      ,          \         P
                  ! \        R4      4      \         P
                  ! \        ^4       Uu. uF  pRV 2NK
  	  up4      R7      p\        V R4      ;_uu_ 4       p\        P                  ! R4      ! V4      ;_uu_ 4       pVP                  V4       RRR4       RRR4       \        V R4      ;_uu_ 4       p\        P                  ! R4      ! V4      ;_uu_ 4       p\         P                  ! V^ R7      pRRR4       RRR4       \        P                  ! VX4       R# u upi   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L\; i  + '       g   i     Lg; i)
rH  rI  rJ  rK  rK   rx   Nru   r\  rO  )r   r   rQ  rR  rS  rT  rU  rV  rP   codecs	getwriterr   	getreaderr   r   r   )rQ   rX  r\   rg   encodedr   s   &     r   test_codecs_get_writer_readerrw    s   ||biin$$W--f&hh%)4)Q"QC)45H
 
i		&g&v..'OOG$ / 
 
i		&g&v..'W2B / 
 (B' 5 /. 
	 /. 
	sN   7E'%%E?
E,	E? %F%%F	>F%,E<7E??F	F"F%%F5	zio_class,mode,msgtz*a bytes-like object is required, not 'str'r   z%string argument expected, got 'bytes'c                 4   \         P                  ! R \        P                  ! ^x4      P	                  R4      ,          \         P
                  ! \        R4      4      \         P
                  ! \        ^4       Uu. uF  pRV 2NK
  	  up4      R7      pV ! 4       ;_uu_ 4       p\        P                  ! \        VR7      ;_uu_ 4        VP                  VRV 2R7       RRR4       RRR4       R# u upi   + '       g   i     L; i  + '       g   i     R# ; i)	rH  rI  rJ  rK  r   ra   rL   NrO  )r   r   rQ  rR  rS  rT  rU  rV  rN   r   	TypeErrorr   )io_classrM   r4  rX  r\   r=  s   &&&   r   test_explicit_encodingr|     s     ||biin$$W--f&hh%)4)Q"QC)45H
 
v]]9C00OOF1TFO4 1 
 5 10 
s*   7C. %DC3	D3D>DD	encoding_errorsstrictreplacec                    R pRpVR8X  dI   RV,           R,           V^,          ,           R,           V,           p\        \        P                  ^ R7      pMNRV^,          ,           R,           V,           R,           V,           R	,           p\        \        P                  R
R7      pTpVP	                  V4       V R8w  d9   \
        P                  ! \        VR7      ;_uu_ 4        V! W R7       RRR4       R# V! W R7      pVP                  V R7      p	\        P                  ! W./V	^,          .R7      p
\        P                  ! W4       R#   + '       g   i     R# ; i)z'utf-8' codec can't decode byte   r      ,   
r\  s   {"s   ": {"s   ":"s   "}}rM  )orientr  r   r}  Nerrors)rM  )r   r   r   r  write_bytesrN   r   UnicodeDecodeErrordecoder   r   r   )r}  r   rQ   r4  bad_encodingcontentr   filer   decodedr\   s   &&&        r   test_encoding_errorsr  5  s2    ,CL%-q0@@4G,V2 Q  	
   	 g6DW)#]]-S999> :9 I?%%_%=<<) 4Wq[MJ
b+ :99s    
E		E	c                 "   \        R 4      p\        \        P                  V R7      pRpV\	        V 4      P
                   ,          p\        P                  ! \        VR7      ;_uu_ 4        V! V4       RRR4       R#   + '       g   i     R# ; i)zA,B
1,2
3,4
r  z&encoding_errors must be a string, got r   N)	r   r   r   r   typer!   rN   r   r2  )r}  r  r   expected_errors   &   r   test_encoding_errors_badtyper  W  sc     ()GR[[/BF=No.7789N	z	8	8w 
9	8	8	8s   *	A==B	c                     \         P                  ! \        R R7      ;_uu_ 4        \        P                  ! V RRR7       RRR4       R#   + '       g   i     R# ; i)zunknown error handler namer   ra   badr  N)rN   r   LookupErrorr,   rf   )rQ   s   &r   test_bad_encdoing_errorsr  b  s4    	{*F	G	G	3u5 
H	G	G	Gs   A		A	r   r   c                      \         P                  ! \        R R7      ;_uu_ 4       p \        P                  ! R4       V P
                  \
        P                  8X  g   Q h RRR4       R#   + '       g   i     R# ; i)z\[Errno 2\]r   doesnt_existN)rN   r   r  r   r   errnoENOENT)r5  s    r   test_errno_attributer  h  sJ     
(	@	@C
N#yyELL((( 
A	@	@	@s   8A((A9	c            
         \         P                  ! \        R R7      ;_uu_ 4        \        4       ;_uu_ 4       p \        P
                  ! V RRR7       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)r.  r   ru   T)r:  N)rN   r   r   r   r,   rf   )r=  s    r   test_fail_mmapr  p  sL    	+8	<	<YY&OOFDT:  
=	<Y 
=	<	<s"   A7A$	A7$A4/A77B	c                      ! R  R4      p \         P                  ! \        RR7      ;_uu_ 4        \        4       ;_uu_ 4       p\        P
                  ! VR4      ;_uu_ 4       pVP                  P                  V ! 4       4       RRR4       RRR4       RRR4       R#   + '       g   i     L"; i  + '       g   i     L-; i  + '       g   i     R# ; i)c                   &   a  ] tR tRt o R tRtV tR# )&test_close_on_error.<locals>.TestErrorix  c                    \        R 4      h)test)r  r   s   &r   close,test_close_on_error.<locals>.TestError.closey  s    &/!r   r   N)r!   r"   r#   r$   r  r&   r'   r(   s   @r   	TestErrorr  x  s     	" 	"r   r  r  r   ru   N)rN   r   r  r   r,   rf   created_handlesappend)r  r=  rj   s      r   test_close_on_errorr  v  s~    " " 
wf	-	-YY&..'''..y{; /  
.	-.. Y 
.	-	-s;   C B0	"!BB0	CB-(B0	0C ;CC	rJ   rX   rW   c                     V ! R RRR4      pRV 2p\         P                  ! W1RR7      p\         P                  ! R^ ^/R^ ^//4      p\        P                  ! WT4       R	# )
r  r|   tarztest-csv.tarztar://test.csv::file://;)rX   sepr   r   N)r   r   r   r   r   )r   rX   tar_file_pathchained_file_urlrF   r\   s   &&    r   "test_read_csv_chained_url_no_errorr    s_     T65.AM0@[[)LF||S1a&#1v67H(+r   r   c                     \        4       ;_uu_ 4       p\        P                  ! W4       R R R 4       R #   + '       g   i     R # ; ir   )r   r   dump)r   r=  s   & r   test_pickle_readerr    s%      
fF# 
s	   4A	r   c                      R p \         P                  ! \        V 4      R.RRR7      p\         P                  ! R\         P                  R.RR7      p\         P
                  ! RV/4      p\        P                  ! W14       R# )	z#"date"
"20/12/2025"
""
"31/12/2020"dateTr   )parse_datesdayfirstdtype_backendz
20/12/2025z
31/12/2020)r  N)r   r   r   r#  NaTr   r   r   )r|   rF   expect_dataexpects       r   $test_pyarrow_read_csv_datetime_dtyper    se     4D[[VHt9F ..,!EPTUK\\6;/0F&)r   )Jr%   rs  r  	functoolsr   r  r   r   r   r/  r.   pathlibr   r   rb   numpyrQ  rN   pandas.compatr   r   pandas.compat.pyarrowr	   pandas.util._test_decoratorsutil_test_decoratorstdpandasr   pandas._testing_testingr   pandas.io.commoncommonr,   r  filterwarnings
pytestmarkr   r   abspathdirname__file__r   r*   fixturer%  r'  rl  rn  r  rq  rw  r|  r  r  r  r  r  r  r  
skip_if_nor  r   r  r  r  r  r  r  r  r   r  r  r   r   r   <module>r     s      
  	      7 ) )    [[''C

  
wwrwwx01I0 I0X
 : :ZP ZPzE	C E6?3( 4("(  	#CD	3?@55 *Xy,ABE6?3, 4 C,@ *QI6 76 D!EF) G);	< xw8, 9 , 









$$ y
* 
*r   