+
    xȇiI                        R t ^ RIHt ^ RIt^ RIHt ^ RIt^ RIHt ^ RI	H
t ^ RIHt ^ RIHu Hu Ht ]P"                  P%                  R4      t]P(                  ! RR.R	 R
7      R 4       t ! R R4      tR tR tR tR# )a  
Tests that features that are currently unsupported in
either the Python or C parser are actually enforced
and are clearly communicated to the user.

Ultimately, the goal is to remove test cases from this
test suite as new feature support is added to the parsers.
)StringION)Path)ParserError)read_csvz=ignore:Passing a BlockManager to DataFrame:DeprecationWarningpythonz
python-fwfc                     V # N )vals   &w/Users/max/.openclaw/workspace/postharvest/venv/lib/python3.14/site-packages/pandas/tests/io/parser/test_unsupported.py<lambda>r      s        )paramsidsc                     V P                   # r   )param)requests   &r   python_enginer      s    ==r   c                   D   a  ] tR t^!t o R tR tR tR tR tR t	Rt
V tR# )	TestUnsupportedFeaturesc           	         R pR FG  p\         P                  ! \        RR7      ;_uu_ 4        \        \	        V4      VRR7       RRR4       KI  	  R#   + '       g   i     K^  ; i)a b c
1 2 3zunexpected keywordmatchT)enginemangle_dupe_colsN)cr   )pytestraises	TypeErrorr   r   )selfdatar   s   &  r   test_mangle_dupe_cols_false3TestUnsupportedFeatures.test_mangle_dupe_cols_false"   sF    %Fy0DEE$N FE &EEEs   AA#c           
         R pRp\         P                  ! \        VR7      ;_uu_ 4        \        \	        V4      RRR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        \	        V4      RR\        ^4      R7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        \	        V4      R^R	7       RRR4       \        P                  ! \        P                  4      ;_uu_ 4        \        \	        V4      RR
7       RRR4       \        P                  ! \        P                  4      ;_uu_ 4        \        \	        V4      R\        ^4      R7       RRR4       \        P                  ! \        P                  4      ;_uu_ 4        \        \	        V4      ^R7       RRR4       RpRp\         P                  ! \        VR7      ;_uu_ 4        \        \	        V4      RR
7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        \	        V4      RRR7       RRR4       RpRp\         P                  ! \        VR7      ;_uu_ 4        \        \	        V4      RR7       RRR4       \         P                  ! \        VR7      ;_uu_ 4        \        \	        V4      RR7       RRR4       RpRp\         P                  ! \        VR7      ;_uu_ 4        \        \	        V4      RR7       RRR4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELK; i  + '       g   i     EL
; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELp; i  + '       g   i     EL=; i  + '       g   i     EL; i  + '       g   i     R# ; i)r   zdoes not supportr   r   z\s)r   sepN	)r   r%   	quotechar)r   
skipfooter)r%   )r%   r'   )r(   a                        A       B       C       D        E
one two three   four
a   b   10.0032 5    -0.5109 -2.3358 -0.4645  0.05076  0.3640
a   q   20      4     0.4473  1.4152  0.2834  1.00661  0.1744
x   q   30      3    -0.6662 -0.5243 -0.3580  0.89145  2.5838zError tokenizing dataz\s+z)Only length-1 thousands markers supportedzA|B|C
1|2,334|5
10|13|10.
z,,)	thousands z(Only length-1 line terminators supportedza,b,c~~1,2,3~~4,5,6z~~)lineterminator)r   r   
ValueErrorr   r   chrtmassert_produces_warningparsersParserWarningr   )r    r!   msgtexts   &   r   test_c_engine%TestUnsupportedFeatures.test_c_engine*   si     ]]:S11Xd^CU; 2]]:S11Xd^CTSXN 2]]:S11Xd^CA> 2 ''(=(=>>Xd^/ ?''(=(=>>Xd^SB ?''(=(=>>Xd^2 ?A
 &]];c22Xd^0 3]];c22Xd^CV< 3 : ]]:S11Xd^t4 2]]:S11Xd^r2 2 9$]]:S11Xd^D9 21O 211111111 ?>>>>>>>> 322222 211111
 211s   L$-"L8;MM !M4'N.N1N09O<OO,$L5	8M		M	 M1	4N	N	N-	0O	O	O)	,O=	c                   ^ RI Hp RpV F^  pRV: RV: R2pV\        4       /p\        P                  ! \
        VR7      ;_uu_ 4        \        \        V4      3RV/VB  RRR4       K`  	  R#   + '       g   i     Ku  ; i)	    )_python_unsupportedz*1,2,3,,
1,2,3,4,
1,2,3,4,5
1,2,,,
1,2,3,4,The z" option is not supported with the z enginer   r   N)pandas.io.parsers.readersr8   objectr   r   r,   r   r   )r    r   py_unsupportedr!   defaultr2   kwargss   &&     r   test_python_engine*TestUnsupportedFeatures.test_python_engineZ   s    S &Gwk "&&3%6g? 
 vx(Fz55$HHH 65 & 655s   	A//B c                     ! R  R4      pRpRp\         P                  ! \        VR7      ;_uu_ 4        \        V! V4      VR7       RRR4       R#   + '       g   i     R# ; i)c                   D   a  ] tR t^ot o V 3R lR ltR tR tR tRtV t	R# )MTestUnsupportedFeatures.test_python_engine_file_no_iter.<locals>.NoNextBufferc                   < V ^8  d   QhRR/# )   returnNr	   )format__classdict__s   "r   __annotate__ZTestUnsupportedFeatures.test_python_engine_file_no_iter.<locals>.NoNextBuffer.__annotate__p   s     % %D %r   c                    Wn         R # r   r!   )r    csv_datas   &&r   __init__VTestUnsupportedFeatures.test_python_engine_file_no_iter.<locals>.NoNextBuffer.__init__p   s    $	r   c                6    V P                   P                  4       # r   )r!   __next__r    s   &r   rQ   VTestUnsupportedFeatures.test_python_engine_file_no_iter.<locals>.NoNextBuffer.__next__s   s    yy))++r   c                    V P                   # r   rL   rR   s   &r   readRTestUnsupportedFeatures.test_python_engine_file_no_iter.<locals>.NoNextBuffer.readv       yy r   c                    V P                   # r   rL   rR   s   &r   readlineVTestUnsupportedFeatures.test_python_engine_file_no_iter.<locals>.NoNextBuffer.readliney   rW   r   rL   N)
__name__
__module____qualname____firstlineno__rN   rQ   rU   rY   __static_attributes____classdictcell__rH   s   @r   NoNextBufferrC   o   s#     % %,!! !r   rb   za
1zD'NoNextBuffer' object is not iterable|argument 1 must be an iteratorr   )r   N)r   r   r   r   )r    r   rb   r!   r2   s   &&   r   test_python_engine_file_no_iter7TestUnsupportedFeatures.test_python_engine_file_no_iterm   sG    	! 	! T]]9C00\$'> 1000s   AA"	c                J   ^ RI Hp RpV F  pRV: R2pV\        4       /pRR0pVR8X  d   RWS&   MW69   d   R	WS&   MVR
8X  d   RWS&   \        P                  ! \
        VR7      ;_uu_ 4        \        \        V4      3RR/VB  RRR4       K  	  R#   + '       g   i     K  ; i)r7   )_pyarrow_unsupportedzJ1,2,3,,
        1,2,3,4,
        1,2,3,4,5
        1,2,,,
        1,2,3,4,r9   z2 option is not supported with the 'pyarrow' enginewarn_bad_lineserror_bad_linesdialectexcelTon_bad_lineswarnr   r   pyarrowN)r:   rf   r;   r   r   r,   r   r   )r    pa_unsupportedr!   r=   r2   r>   default_needs_bools   &      r   test_pyarrow_engine+TestUnsupportedFeatures.test_pyarrow_engine   s    T &G#UVCvx(F"24E!F)#")."&N*"(z55$D	DVD 65 & 655s   +BB"c                   \        R 4      pR pTpVP                  R9  dD   Rp\        P                  ! \        VR7      ;_uu_ 4        VP                  W#R7       RRR4       R# VP                  W#R7       R#   + '       g   i     R# ; i)za,b
1,2c                     V # r   r	   )xs   &r   r   VTestUnsupportedFeatures.test_on_bad_lines_callable_python_or_pyarrow.<locals>.<lambda>   s    1r   zKon_bad_line can only be a callable function if engine='python' or 'pyarrow'r   )rk   N)r   rm   )r   r   r   r   r,   r   )r    all_parserssiobad_lines_funcparserr2   s   &&    r   ,test_on_bad_lines_callable_python_or_pyarrowDTestUnsupportedFeatures.test_on_bad_lines_callable_python_or_pyarrow   sv     z"$%::;  z55A 65 OOCO= 655s   A99B
	r	   N)r[   r\   r]   r^   r"   r4   r?   rc   rp   rz   r_   r`   ra   s   @r   r   r   !   s,     O.:`I&?*E.> >r   r   c           	         T p\         pVP                  R 8X  d   \        P                  ! RR7       Tp\	        V4      P                  RRR7       \        P                  ! R4      ;_uu_ 4        \        P                  ! VRR7      ;_uu_ 4        VP                  V. ROR	7       R
R
R
4       R
R
R
4       \        P                  ! V4       R
#   + '       g   i     L0; i  + '       g   i     L;; i)rm   z,https://github.com/apache/arrow/issues/38676reasonzcol1,col2
a,b
1,2zutf-8)encodingFcol3r   )usecolsN)col1col2r   )r,   r   r   skipr   
write_textr.   r/   r   r   osunlink)rv   	temp_filery   errorfnames   &&   r   )test_close_file_handle_on_invalid_usecolsr      s    FE}}	!IJEK07C		#	#E	*	*]]5//OOE+COD 0 
+ IIe 0/ 
+	*s$   -!CC	$CCCC/	c                 H   TpVP                   R 8X  d=   V P                  \        P                  P	                  VP                    R2R7      4       \        P
                  ! \        RR7      ;_uu_ 4        VP                  . 4       RRR4       R#   + '       g   i     R# ; i)r   z engine supports lists.r}   Invalidr   N)r   applymarkerr   markxfailr   r,   r   )r   rv   ry   s   && r   test_invalid_file_inputsr      sp    F}} KK6M%NO	
 
z	3	3 
4	3	3	3s   4BB!	c                     T pR p\         P                  ! \        VR7      ;_uu_ 4        VP                  RRR7       RRR4       R#   + '       g   i     R# ; i)zPdtype_backend numpy is invalid, only 'numpy_nullable' and 'pyarrow' are allowed.r   testnumpy)dtype_backendN)r   r   r,   r   )rv   ry   r2   s   &  r   test_invalid_dtype_backendr      sC    F	!  
z	-	-g6 
.	-	-	-s   AA	)__doc__ior   r   pathlibr   r   pandas.errorsr   pandas._testing_testingr.   pandas.io.parsersr   r:   r0   readersr   filterwarnings
pytestmarkfixturer   r   r   r   r   r	   r   r   <module>r      s     	   %  & + +[[''C

 ,/_E FF> F>R$	7r   