§
    ÖŽ’jÍ*  ã            	      óÂ  — 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        j        ZdPd„Z G d„ dej        ¦  «        Zej        Zded<   dQd„Z dQd„Z!dRd„Z"dSdTd#„Z#dUd%„Z$d&dd'œdVd.„Z%dWd/„Z&d0„  e'd1¦  «        D ¦   «         Z(e( )                     e*d2¦  «        d3 e*d4¦  «        d5 e*d6¦  «        d7i¦  «         dXd:„Z+d;„ Z,d<„ Z-dYd?„Z.dZd@„Z/d[dB„Z0ej        dCk    rddDlm1Z1 nd\dG„Z1 G dH„ dI¦  «        Z2d]dJ„Z3ej        dKk    rddLl4m5Z5 dS erddLl6m5Z5 dS ddMdNœdO„Z5dS )^z?Python version compatibility code and random general utilities.é    )Úannotations)ÚCallableN)Ú	Parameter)Ú	Signature)ÚPath)ÚAny)ÚFinal)ÚNoReturn)ÚTYPE_CHECKING©é   é   )ÚFormatÚpathústr | os.PathLike[str]ÚreturnÚLEGACY_PATHc                ó    — t          | ¦  «        S )zBInternal wrapper to prepare lazy proxies for legacy_path instances)r   )r   s    ú<C:\Projects\DSCons\.venv\Lib\site-packages\_pytest\compat.pyÚlegacy_pathr   $   s   € å�tÑÔÐó    c                  ó   — e Zd ZdZdS )Ú
NotSetTyper   N)Ú__name__Ú
__module__Ú__qualname__Útoken© r   r   r   r   ,   s   € € € € € Ø€E€E€Er   r   r	   ÚNOTSETÚfuncÚobjectÚboolc                óL   — t          j        | ¦  «        p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©r    s    r   r&   r&   2   s&   € õ Ô& tÑ,Ô,ÐUµ¸¸oÈuÑ0UÔ0UÐUr   c                óH   — t          | ¦  «        p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À4Ñ(HÔ(HÐHr   ÚobjúCallable[..., Any]r   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©r,   s    r   r2   r2   D   s9   € å
Ô˜7Ò"Ð"ÝÔ  ½¼ÐFÑFÔFÐFÝÔ˜SÑ!Ô!Ð!r   Úcurdirústr | os.PathLike[str] | NoneÚstrc                óò   — t          | ¦  «        } t          t          j        | ¦  «        ¦  «        }| j        j        }|�0	 |                     |¦  «        }|› d|dz   › �S # t          $ r Y nw xY w|› d|dz   › �S )Nú:é   )Úget_real_funcr   r%   ÚgetfileÚ__code__Úco_firstlinenoÚrelative_toÚ
ValueError)Úfunctionr5   ÚfnÚlinenoÚrelfns        r   ÚgetlocationrE   K   s£   € Ý˜XÑ&Ô&€HÝ	�gŒo˜hÑ'Ô'Ñ	(Ô	(€BØÔÔ-€FØÐð	+Ø—N’N 6Ñ*Ô*ˆEð Ð*Ð*˜f q™jÐ*Ð*Ð*øõ ð 	ð 	ð 	ØˆDð	øøøð ÐÐ�6˜A‘:ÐÐÐs   Á A Á
A,Á+A,Úintc                óP  ‡‡— t          | dd¦  «        }|sdS t          t          j                             d¦  «        dt	          ¦   «         ¦  «        Št          t          j                             d¦  «        dt	          ¦   «         ¦  «        Št          ˆˆfd„|D ¦   «         ¦  «        S )z>Return number of arguments used up by mock arguments (if any).Ú	patchingsNr   ÚmockÚDEFAULTzunittest.mockc                óF   •— g | ]}|j         s|j        ‰u s	|j        ‰u ¯|‘ŒS r   )Úattribute_nameÚnew)Ú.0ÚpÚmock_sentinelÚut_mock_sentinels     €€r   ú
<listcomp>z'num_mock_patch_args.<locals>.<listcomp>c   sM   ø€ ð 	
ð 	
ð 	
àØÔ#ð	
ð ”˜-Ð'Ð'¨1¬5Ð4DÐ+DÐ+Dð ð ,EÐ+DÐ+Dr   )r'   r0   ÚmodulesÚgetr!   Úlen)rA   rH   rP   rQ   s     @@r   Únum_mock_patch_argsrV   Y   s¦   øø€ å˜ +¨tÑ4Ô4€IØð Øˆqå�CœKŸOšO¨FÑ3Ô3°YÅÁÄÑIÔI€MÝ�sœ{Ÿš¨Ñ?Ô?ÀÍFÉHÌHÑUÔUÐåð	
ð 	
ð 	
ð 	
ð 	
àð	
ñ 	
ô 	
ñô ð r   Ú )ÚnameÚclsrA   úCallable[..., object]rX   rY   útype | Noneútuple[str, ...]c               óô  — 	 t          | ¦  «        j                             ¦   «         }n7# t          t          f$ r#}ddlm}  |d| ›d|› �d¬¦  «         Y d}~nd}~ww xY wt          d„ |D ¦   «         ¦  «        }|s| j        }t          d	„ |D ¦   «         ¦  «        s6|r4t          t          j        ||d¬
¦  «        t          ¦  «        s
|dd…         }t          | d¦  «        r|t          | ¦  «        d…         }|S )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 ¯;|j        V — ŒEd S ©N©Úkindr   ÚPOSITIONAL_OR_KEYWORDÚKEYWORD_ONLYÚdefaultÚemptyrX   ©rN   rO   s     r   ú	<genexpr>z"getfuncargnames.<locals>.<genexpr>’   sa   è è € ð ð ààŒF•iÔ5Ð5Ð5ØŒv�Ô/Ð/Ð/àŒI�œÐ(Ð(ð 	
Œð )Ð(Ð(Ð(ðð r   c              3  ó<   K  — | ]}|j         t          j        u V — Œd S ra   )rc   r   ÚPOSITIONAL_ONLYrh   s     r   ri   z"getfuncargnames.<locals>.<genexpr>¡   s,   è è € ÐGÐG°qˆqŒv�Ô2Ð2ÐGÐGÐGÐGÐGÐGr   )rf   r:   Ú__wrapped__)r2   Ú
parametersÚvaluesr@   Ú	TypeErrorÚ_pytest.outcomesr^   Útupler   ÚanyÚ
isinstancer%   Úgetattr_staticÚstaticmethodÚhasattrrV   )rA   rX   rY   rm   Úer^   Ú	arg_namess          r   Úgetfuncargnamesry   l   sx  € ð8
Ý˜xÑ(Ô(Ô3×:Ò:Ñ<Ô<ˆ
ˆ
øÝ�	Ð"ð 
ð 
ð 
Ø)Ð)Ð)Ð)Ð)Ð)àˆØA°ÐAÐA¸aÐAÐAØð	
ñ 	
ô 	
ð 	
ð 	
ð 	
ð 	
ð 	
ð 	
øøøøð
øøøõ ð ð àðñ ô ñ ô €Ið ð !ØÔ ˆõ
 ÐGÐG¸JÐGÑGÔGÑGÔGð "ð 	ð"õ ÝÔ" 3¨°dÐ;Ñ;Ô;½\ñ
ô 
ð	"ð ˜a˜b˜b”Mˆ	åˆx˜Ñ'Ô'ð ?ØÕ1°(Ñ;Ô;Ð=Ð=Ô>ˆ	ØÐs   ‚&) ©AºAÁAc                ó|   — t          d„ t          | ¦  «        j                             ¦   «         D ¦   «         ¦  «        S )Nc              3  óˆ   K  — | ]=}|j         t          j        t          j        fv r|j        t          j        u¯4|j        V — Œ>d S ra   rb   rh   s     r   ri   z(get_default_arg_names.<locals>.<genexpr>´   sY   è è € ð ð àØŒ6•iÔ5µyÔ7MÐNÐNÐNØŒI�Yœ_Ð,Ð,ð 	
Œð -Ð,Ð,Ð,ð	ð r   )rq   r2   rm   rn   )rA   s    r   Úget_default_arg_namesr|   °   sI   € õ ð ð å˜8Ñ$Ô$Ô/×6Ò6Ñ8Ô8ðñ ô ñ ô ð r   c                ó@   — i | ]}|t          d d¦  «        v¯|d|d›�“ŒS )é    é   z\xÚ02x)Úrange)rN   Úis     r   ú
<dictcomp>rƒ   ¼   s;   € ð (ð (ð (Ø¨AµU¸2¸s±^´^Ð,CÐ,C€A€}ˆQ€}€}€}Ð,CÐ,CÐ,Cr   é€   ú	z\túz\rú
z\nÚvalúbytes | strc                óÞ   — t          | t          ¦  «        r|                      dd¦  «        }n(|                      d¦  «                             d¦  «        }|                     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)rs   ÚbytesÚdecodeÚencodeÚ	translateÚ$_non_printable_ascii_translate_table)rˆ   Úrets     r   Úascii_escapedr”   Ä   s_   € õ  �#•uÑÔð ;Ø�jŠj˜Ð"4Ñ5Ô5ˆˆà�jŠjÐ)Ñ*Ô*×1Ò1°'Ñ:Ô:ˆØ�=Š=Õ=Ñ>Ô>Ð>r   c                óp   — 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%   Úunwraprs   Ú	functoolsÚpartialr    r4   s    r   r;   r;   Û   s4   € õ Œ.˜Ñ
Ô
€Cå�#•yÔ(Ñ)Ô)ð ØŒhˆØ€Jr   c                ó6   — 	 | j         S # t          $ r | cY S w xY wra   )Ú__func__ÚAttributeErrorr(   s    r   Ú	getimfuncrœ   å   s3   € ðØŒ}ÐøÝð ð ð Øˆˆˆðøøøs   ‚	 ‰—r   rf   c                óL   — 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)rp   rž   r'   )r!   rX   rf   rž   s       r   Úsafe_getattrrŸ   ì   sQ   € ð .Ð-Ð-Ð-Ð-Ð-ðÝ�v˜t WÑ-Ô-Ð-øØð ð ð Øˆˆˆðøøøs   ˆ ™#¢#c                óN   — 	 t          j        | ¦  «        S # t          $ r Y dS w xY w)z0Ignore any exception via isinstance on Python 3.F)r%   ÚisclassÚ	Exceptionr4   s    r   Úsafe_isclassr£   ý   s9   € ðÝŒ˜sÑ#Ô#Ð#øÝð ð ð Øˆuˆuðøøøs   ‚ –
$£$ú
int | Nonec                 ó„   — t           j        dk    st           j        dk    rdS d} t          j        ¦   «         }|| k    r|n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éÿÿÿÿ)r0   ÚplatformÚosÚgetuid)ÚERRORÚuids     r   Úget_user_idr®     sH   € õ „|�wÒÐ¥#¤,°,Ò">Ð">ð ˆtð ˆÝŒi‰kŒkˆØ˜U’l�lˆsˆs¨Ð,r   )r   é   )Úassert_neverÚvaluer
   c                óH   — J d| › dt          | ¦  «        j        › d�¦   «         ‚)NFzUnhandled value: z (ú))Útyper   )r±   s    r   r°   r°     s,   € ØJÐJ¨%ÐJÐJµ4¸±;´;Ô3GÐJÐJÐJÑJÔJˆur   c                  ó*   — e Zd ZdZd
d„Zdd„Zdd„Zd	S )Ú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.
    r±   r"   r   ÚNonec                ó   — || _         d S ra   ©Ú_value)Úselfr±   s     r   Ú__init__zCallableBool.__init__,  s   € ØˆŒˆˆr   c                ó   — | j         S ra   r¹   ©r»   s    r   Ú__bool__zCallableBool.__bool__/  ó
   € ØŒ{Ðr   c                ó   — | j         S ra   r¹   r¾   s    r   Ú__call__zCallableBool.__call__2  rÀ   r   N)r±   r"   r   r·   ©r   r"   )r   r   r   Ú__doc__r¼   r¿   rÂ   r   r   r   r¶   r¶   "  sZ   € € € € € ðð ðð ð ð ðð ð ð ðð ð ð ð ð r   r¶   c                 ó<   — ddg} t          d„ | D ¦   «         ¦  «        S )z0Check if we're currently running on a CI system.ÚCIÚBUILD_NUMBERc              3  óT   K  — | ]#}t           j                             |¦  «        V — Œ$d S ra   )rª   ÚenvironrT   )rN   Úvars     r   ri   z running_on_ci.<locals>.<genexpr>;  s0   è è € Ð7Ð7 s�rŒz�~Š~˜cÑ"Ô"Ð7Ð7Ð7Ð7Ð7Ð7r   )rr   )Úenv_varss    r   Úrunning_on_cirÌ   6  s+   € ð �nÐ%€HÝÐ7Ð7¨hÐ7Ñ7Ô7Ñ7Ô7Ð7r   )r   é   )Ú
deprecatedr:   )ÚcategoryÚ
stacklevelc              ó   — d„ }|S )Nc                ó   — | S ra   r   r(   s    r   Ú	decoratorzdeprecated.<locals>.decoratorF  s   € Ø�r   r   )ÚmsgrÏ   rÐ   rÓ   s       r   rÎ   rÎ   E  s   € ðð ð ð Ðr   )r   r   r   r   )r    r!   r   r"   )r,   r-   r   r   ra   )r5   r6   r   r7   )r   rF   )rA   rZ   rX   r7   rY   r[   r   r\   )rA   r-   r   r\   )rˆ   r‰   r   r7   )r!   r   rX   r7   rf   r   r   r   )r,   r!   r   r"   )r   r¤   )r±   r
   r   r
   rÃ   )7rÄ   Ú
__future__r   Úcollections.abcr   Úenumr—   r%   r   r   rª   Úpathlibr   r0   Útypingr   r	   r
   r   Úpyr1   Úannotationlibr   r   Úlocalr   r   ÚEnumr   r   r   Ú__annotations__r&   r+   r2   rE   rV   ry   r|   r�   r’   ÚupdateÚordr”   r;   rœ   rŸ   r£   r®   r°   r¶   rÌ   ÚwarningsrÎ   Útyping_extensionsr   r   r   ú<module>rã      sÞ  ðà EÐ EÐ Eà "Ð "Ð "Ð "Ð "Ð "à $Ð $Ð $Ð $Ð $Ð $Ø €€€Ø Ð Ð Ð Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø 	€	€	€	Ø Ð Ð Ð Ð Ð Ø 
€
€
€
Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  à 	€	€	€	ð Ô�wÒÐØ$Ð$Ð$Ð$Ð$Ð$ð ŒgŒn€ðð ð ð ðð ð ð ð �”ñ ô ð àÔ €Ð  Ð  Ð  Ñ  ð	Vð 	Vð 	Vð 	VðIð Ið Ið Ið"ð "ð "ð "ð ð  ð  ð  ð  ðð ð ð ð, Øð	Að Að Að Að Að AðH	ð 	ð 	ð 	ð(ð (Ø#˜e C™jœjð(ñ (ô (Ð $ð %× +Ò +Ø€Sˆ�Y„Y��s�s˜4‘y”y %¨¨¨T©¬°EÐ:ñô ð ð
?ð ?ð ?ð ?ð.ð ð ðð ð ðð ð ð ð"ð ð ð ð-ð -ð -ð -ð* Ô�wÒÐØ#Ð#Ð#Ð#Ð#Ð#Ð#ðKð Kð Kð Kðð ð ð ð ñ ô ð ð(8ð 8ð 8ð 8ð Ô�wÒÐØ1Ð1Ð1Ð1Ð1Ð1Ð1Ð1àð Ø>Ð>Ð>Ð>Ð>Ð>Ð>Ð>ð ,0¸Að 	ð 	ð 	ð 	ð 	ð 	ð 	r   