Ë
    æØjj„)  ã            	      ó  — U d Z ddlmZ ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
Z
ddlmZ ddlZddlmZ dd	lmZ dd
lmZ ddlmZ ddlZej(                  dk\  rddlmZ ej.                  j0                  Zd8d„Z G d„ dej6                  «      Zej:                  Zded<   d9d„Z d9d„Z!d:d„Z"d;d<d„Z#d=d„Z$dddœ	 	 	 	 	 	 	 d>d„Z%d?d„Z& e'd«      D � ci c]  } |  e'dd«      vsŒ| d| d ›�“Œ c} Z(e(jS                   e*d!«      d" e*d#«      d$ e*d%«      d&i«       d@d'„Z+d(„ Z,d)„ Z-dAd*„Z.dBd+„Z/dCd,„Z0ej(                  d-k\  rdd.lm1Z1 ndDd/„Z1 G d0„ d1«      Z2dEd2„Z3ej(                  d3k\  rdd4l4m5Z5 yerdd4l6m5Z5 ydd5d6œd7„Z5yc c} w )Fz?Python version compatibility code and random general utilities.é    )Úannotations)ÚCallableN)Ú	Parameter)Ú	Signature)ÚPath)ÚAny)ÚFinal)ÚNoReturn)ÚTYPE_CHECKING©é   é   )ÚFormatc                ó   — t        | «      S )zBInternal wrapper to prepare lazy proxies for legacy_path instances)ÚLEGACY_PATH)Úpaths    úP/opt/eval-harness/bench_task/venv/lib/python3.12/site-packages/_pytest/compat.pyÚlegacy_pathr   $   s   € ä�tÓÐó    c                  ó   — e Zd ZdZy)Ú
NotSetTyper   N)Ú__name__Ú
__module__Ú__qualname__Útoken© r   r   r   r   ,   s   „ Ø�Er   r   r	   ÚNOTSETc                óJ   — t        j                  | «      xs t        | dd«      S )az  Return True if func is a coroutine function (a function defined with async
    def syntax, and doesn't contain yield), or a function decorated with
    @asyncio.coroutine.

    Note: copied and modified from Python 3.5's builtin coroutines.py to avoid
    importing asyncio directly, which in turns also initializes the "logging"
    module as a side-effect (see issue #8).
    Ú_is_coroutineF)ÚinspectÚiscoroutinefunctionÚgetattr©Úfuncs    r   r!   r!   2   s#   € ô ×&Ñ& tÓ,ÒU´¸¸oÈuÓ0UÐUr   c                óF   — t        | «      xs t        j                  | «      S )zZReturn True if the given function seems to be an async function or
    an async generator.)r!   r    Úisasyncgenfunctionr#   s    r   Úis_async_functionr'   >   s   € ô ˜tÓ$ÒH¬×(BÑ(BÀ4Ó(HÐHr   c                óœ   — t         j                  dk\  r%t        j                  | t        j
                  ¬«      S t        j                  | «      S )z0Return signature without evaluating annotations.r   )Úannotation_format)ÚsysÚversion_infor    Ú	signaturer   ÚSTRING©Úobjs    r   r,   r,   D   s8   € ä
×Ñ˜7Ò"Ü× Ñ  ¼¿¹ÔFÐFÜ×Ñ˜SÓ!Ð!r   c                óî   — t        | «      } t        t        j                  | «      «      }| j                  j
                  }|�	 |j                  |«      }|› d|dz   › �S |› d|dz   › �S # t        $ r Y Œw xY w)Nú:é   )Úget_real_funcr   r    ÚgetfileÚ__code__Úco_firstlinenoÚrelative_toÚ
ValueError)ÚfunctionÚcurdirÚfnÚlinenoÚrelfns        r   Úgetlocationr>   K   s‰   € Ü˜XÓ&€HÜ	Œg�o‰o˜hÓ'Ó	(€BØ×Ñ×-Ñ-€FØÐð	+Ø—N‘N 6Ó*ˆEð �W˜A˜f q™j˜\Ð*Ð*ØˆT��6˜A‘:�,ÐÐøô	 ò 	Ùð	ús   ÁA( Á(	A4Á3A4c                óv  — t        | dd«      }|syt        t        j                  j                  d«      dt	        «       «      }t        t        j                  j                  d«      dt	        «       «      }t        |D �cg c],  }|j                  s|j                  |u s|j                  |u r|‘Œ. c}«      S c c}w )z>Return number of arguments used up by mock arguments (if any).Ú	patchingsNr   ÚmockÚDEFAULTzunittest.mock)r"   r*   ÚmodulesÚgetÚobjectÚlenÚattribute_nameÚnew)r9   r@   Úmock_sentinelÚut_mock_sentinelÚps        r   Únum_mock_patch_argsrL   Y   sœ   € ä˜ +¨tÓ4€IÙØäœCŸK™KŸO™O¨FÓ3°YÄÃÓI€MÜœsŸ{™{Ÿ™¨Ó?ÀÌFËHÓUÐäð ö	
àØ×#Ò#Ø—‘˜-Ñ'¨1¯5©5Ð4DÑ+Dò ò	
óð ùò	
s   Á>1B6Ú )ÚnameÚclsc               ó¤  — 	 t        | «      j                  j                  «       }t        d„ D «       «      }|s| j                  }t        d	„ |D «       «      s-|r+t        t        j                  ||d¬
«      t        «      s|dd }t        | d«      r|t        | «      d }|S # t        t        f$ r }ddlm}  |d| ›d|› �d¬«       Y d}~Œ¥d}~ww xY w)a   Return the names of a function's mandatory arguments.

    Should return the names of all function arguments that:
    * Aren't bound to an instance or type as in instance or class methods.
    * Don't have default values.
    * Aren't bound with functools.partial.
    * Aren't replaced with mocks.

    The cls arguments indicate that the function should be treated as a bound
    method even though it's not unless the function is a static method.

    The name parameter should be the original name in which the function was collected.
    r   )Úfailz!Could not determine arguments of z: F)ÚpytraceNc              3  óÜ   K  — | ]d  }|j                   t        j                  u s|j                   t        j                  u r*|j                  t        j
                  u r|j                  –— Œf y ­w©N©Úkindr   ÚPOSITIONAL_OR_KEYWORDÚKEYWORD_ONLYÚdefaultÚemptyrN   ©Ú.0rK   s     r   ú	<genexpr>z"getfuncargnames.<locals>.<genexpr>’   sP   è ø€ ò àà�F‰F”i×5Ñ5Ñ5Ø�v‰vœ×/Ñ/Ñ/à�I‰IœŸ™Ñ(ð 	
��ñùs   ‚A*A,c              3  óT   K  — | ]   }|j                   t        j                  u –— Œ" y ­wrT   )rV   r   ÚPOSITIONAL_ONLYr[   s     r   r]   z"getfuncargnames.<locals>.<genexpr>¡   s   è ø€ ÒG°qˆq�v‰vœ×2Ñ2Ô2ÑGùs   ‚&()rY   r2   Ú__wrapped__)r,   Ú
parametersÚvaluesr8   Ú	TypeErrorÚ_pytest.outcomesrQ   Útupler   ÚanyÚ
isinstancer    Úgetattr_staticÚstaticmethodÚhasattrrL   )r9   rN   rO   ra   ÚerQ   Ú	arg_namess          r   Úgetfuncargnamesrm   l   så   € ð8
Ü˜xÓ(×3Ñ3×:Ñ:Ó<ˆ
ô ñ àôó €Iñ Ø× Ñ ˆô
 ÑG¸JÔGÔGñ 	ÜÜ×"Ñ" 3¨°dÔ;¼\ô
ð ˜a˜b�Mˆ	äˆx˜Ô'ØÔ1°(Ó;Ð=Ð>ˆ	ØÐøôG œ	Ð"ò 
Ý)áØ/°¨|¸2¸a¸SÐAØ÷	
ò 	
ûð
ús   ‚#B  Â CÂ/C
Ã
Cc                óh   — t        d„ t        | «      j                  j                  «       D «       «      S )Nc              3  óÄ   K  — | ]X  }|j                   t        j                  t        j                  fv r*|j                  t        j
                  ur|j                  –— ŒZ y ­wrT   rU   r[   s     r   r]   z(get_default_arg_names.<locals>.<genexpr>´   sI   è ø€ ò àØ�6‰6”i×5Ñ5´y×7MÑ7MÐNÑNØ�I‰IœYŸ_™_Ñ,ð 	
��ñùs   ‚AA )re   r,   ra   rb   )r9   s    r   Úget_default_arg_namesrp   °   s2   € ô ñ ä˜8Ó$×/Ñ/×6Ñ6Ó8ôó ð r   é€   é    é   z\xÚ02xú	z\túz\rú
z\nc                ó²   — t        | t        «      r| j                  dd«      }n | j                  d«      j                  d«      }|j	                  t
        «      S )a	  If val is pure ASCII, return it as an str, otherwise, escape
    bytes objects into a sequence of escaped bytes:

    b'\xc3\xb4\xc5\xd6' -> r'\xc3\xb4\xc5\xd6'

    and escapes strings into a sequence of escaped unicode ids, e.g.:

    r'4\nV\U00043efa\x0eMXWB\x1e\u3028\u15fd\xcd\U0007d944'

    Note:
       The obvious "v.decode('unicode-escape')" will return
       valid UTF-8 unicode if it finds them in bytes, but we
       want to return escaped bytes for any byte, even if they match
       a UTF-8 string.
    ÚasciiÚbackslashreplaceÚunicode_escape)rg   ÚbytesÚdecodeÚencodeÚ	translateÚ$_non_printable_ascii_translate_table)ÚvalÚrets     r   Úascii_escapedrƒ   Ä   sI   € ô  �#”uÔØ�j‰j˜Ð"4Ó5‰à�j‰jÐ)Ó*×1Ñ1°'Ó:ˆØ�=‰=Ô=Ó>Ð>r   c                ó|   — t        j                  | «      } t        | t        j                  «      r| j
                  } | S )z{Get the real function object of the (possibly) wrapped object by
    :func:`functools.wraps`, or :func:`functools.partial`.)r    Úunwraprg   Ú	functoolsÚpartialr$   r.   s    r   r3   r3   Û   s0   € ô �.‰.˜Ó
€Cä�#”y×(Ñ(Ô)Ø�h‰hˆØ€Jr   c                ó>   — 	 | j                   S # t        $ r | cY S w xY wrT   )Ú__func__ÚAttributeErrorr#   s    r   Ú	getimfuncr‹   å   s%   € ðØ�}‰}ÐøÜò ØŠðús   ‚ Ž›c                óD   — ddl m} 	 t        | ||«      S # |$ r |cY S w xY w)aR  Like getattr but return default upon any Exception or any OutcomeException.

    Attribute access can potentially fail for 'evil' Python objects.
    See issue #214.
    It catches OutcomeException because of #2490 (issue #580), new outcomes
    are derived from BaseException instead of Exception (for more details
    check #2707).
    r   )ÚTEST_OUTCOME)rd   r�   r"   )rE   rN   rY   r�   s       r   Úsafe_getattrrŽ   ì   s/   € õ .ðÜ�v˜t WÓ-Ð-øØò ØŠðús   ˆ •žc                óL   — 	 t        j                  | «      S # t        $ r Y yw xY w)z0Ignore any exception via isinstance on Python 3.F)r    ÚisclassÚ	Exceptionr.   s    r   Úsafe_isclassr’   ý   s(   € ðÜ�‰˜sÓ#Ð#øÜò Ùðús   ‚ —	#¢#c                 óŽ   — t         j                  dk(  st         j                  dk(  ryd} t        j                  «       }|| k7  r|S dS )zšReturn the current process's real user id or None if it could not be
    determined.

    :return: The user id or None if it could not be determined.
    Úwin32Ú
emscriptenNéÿÿÿÿ)r*   ÚplatformÚosÚgetuid)ÚERRORÚuids     r   Úget_user_idrœ     sC   € ô ‡|�|�wÒ¤#§,¡,°,Ò">ð ð ˆÜ�i‰i‹kˆØ˜U’lˆsÐ,¨Ð,r   )r   é   )Úassert_neverc                óD   — J d| › dt        | «      j                  › d�«       ‚)NzUnhandled value: z (ú))Útyper   )Úvalues    r   rž   rž     s'   € ØJÐ)¨%¨°´4¸³;×3GÑ3GÐ2HÈÐJÓJˆur   c                  ó(   — e Zd ZdZdd„Zdd„Zdd„Zy)ÚCallableBoola'  
    A bool-like object that can also be called, returning its true/false value.

    Used for backwards compatibility in cases where something was supposed to be a method
    but was implemented as a simple attribute by mistake (see `TerminalReporter.isatty`).

    Do not use in new code.
    c                ó   — || _         y rT   ©Ú_value)Úselfr¢   s     r   Ú__init__zCallableBool.__init__,  s	   € Øˆ�r   c                ó   — | j                   S rT   r¦   ©r¨   s    r   Ú__bool__zCallableBool.__bool__/  ó   € Ø�{‰{Ðr   c                ó   — | j                   S rT   r¦   r«   s    r   Ú__call__zCallableBool.__call__2  r­   r   N)r¢   ÚboolÚreturnÚNone©r±   r°   )r   r   r   Ú__doc__r©   r¬   r¯   r   r   r   r¤   r¤   "  s   „ ñóóôr   r¤   c                 ó.   — ddg} t        d„ | D «       «      S )z0Check if we're currently running on a CI system.ÚCIÚBUILD_NUMBERc              3  óZ   K  — | ]#  }t         j                  j                  |«      –— Œ% y ­wrT   )r˜   ÚenvironrD   )r\   Úvars     r   r]   z running_on_ci.<locals>.<genexpr>;  s   è ø€ Ò7 sŒr�z‰z�~‰~˜c×"Ñ7ùs   ‚)+)rf   )Úenv_varss    r   Úrunning_on_cir¼   6  s   € ð �nÐ%€HÜÑ7¨hÔ7Ó7Ð7r   )r   é   )Ú
deprecatedr2   )ÚcategoryÚ
stacklevelc              ó   — d„ }|S )Nc                ó   — | S rT   r   r#   s    r   Ú	decoratorzdeprecated.<locals>.decoratorF  s   € Ø�r   r   )Úmsgr¿   rÀ   rÃ   s       r   r¾   r¾   E  s   € òð Ðr   )r   zstr | os.PathLike[str]r±   r   )r$   rE   r±   r°   )r/   úCallable[..., Any]r±   r   rT   )r:   zstr | os.PathLike[str] | Noner±   Ústr)r±   Úint)r9   zCallable[..., object]rN   rÆ   rO   ztype | Noner±   útuple[str, ...])r9   rÅ   r±   rÈ   )r�   zbytes | strr±   rÆ   )rE   r   rN   rÆ   rY   r   r±   r   )r/   rE   r±   r°   )r±   z
int | None)r¢   r
   r±   r
   r³   )7r´   Ú
__future__r   Úcollections.abcr   Úenumr†   r    r   r   r˜   Úpathlibr   r*   Útypingr   r	   r
   r   Úpyr+   Úannotationlibr   r   Úlocalr   r   ÚEnumr   r   r   Ú__annotations__r!   r'   r,   r>   rL   rm   rp   Úranger€   ÚupdateÚordrƒ   r3   r‹   rŽ   r’   rœ   rž   r¤   r¼   Úwarningsr¾   Útyping_extensions)Úis   0r   ú<module>rÙ      s¨  ðâ Eå "å $Û Û Û Ý Ý Û 	Ý Û 
Ý Ý Ý Ý  ã 	ð ×Ñ�wÒÝ$ð �g‰g�n‰n€óô�—‘ô à× Ñ €ˆÓ  ó	VóIó"ô óð, Øñ	AØ#ðAð ðAð 
ð	Að
 óAóH	ñ $ C›jö(Ø¨A±U¸2¸s³^Ò,C€AˆˆQˆsˆG€}Ñò(Ð $ð %× +Ñ +ÙˆƒY�‘s˜4“y %©¨T«°EÐ:ôó
?ò.òóó"ó-ð* ×Ñ�wÒÞ#óK÷ñ ó(8ð ×Ñ�wÒÞ1áÞ>ð ,0¸Aõ 	ùòS(s   ÃFÃ*	F