
    	hE5              	         U d Z ddlmZ ddlZddlZddl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mZ ddlmZ ddlm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	 ddlmZ erddlmZ  ed          Z ed          Zej        j        ZdXdZ G d dej                  Zej         Z!de"d<   ej#        dk    rddl$Z%e%j&        Z'nddl'Z'dYdZ(dZd"Z)dZd#Z*dZd$Z+d[d\d'Z,d]d)Z-d*d+dd,d^d3Z.d_d4Z/d5  e0d6          D             Z1e12                     e3d7          d8 e3d9          d: e3d;          d<i           d`d>Z4e5e6fZ7dadAZ8dbdCZ9ej:         G dD dE                      Z;dF Z<dG Z=dH Z>dcdKZ?dddMZ@erej#        dk    rddNlmAZA nddNlmAZA nej#        dk    rddNlmAZA ndO ZAej#        dk    rddPlmBZB n G dQ dReeef                   ZBdedTZCdfdWZDdS )gz"Python version compatibility code.    )annotationsN)	Parameter)	signature)Path)Any)Callable)Generic)NoReturn)TYPE_CHECKING)TypeVarT)overload)Final_T_Spathstr | os.PathLike[str]returnLEGACY_PATHc                     t          |           S )zBInternal wrapper to prepare lazy proxies for legacy_path instances)r   )r   s    [/var/www/html/web-builder-api.evdpl.com/venv/lib/python3.11/site-packages/_pytest/compat.pylegacy_pathr   0   s    t    c                      e Zd ZdZdS )
NotSetTyper   N)__name__
__module____qualname__token r   r   r   r   8   s        EEEr   r   r   NOTSET)      funcCallable[..., Any]strc                :    t          t          |                     S N)r%   r   r#   s    r   _format_argsr)   E   s    yr   objectboolc                N    t          j        |           }|ot          |            S r'   )inspectisgeneratorfunctioniscoroutinefunction)r#   genfuncs     r   is_generatorr1   I   s)    )$//G4.t4444r   c                L    t          j        |           pt          | dd          S )a{  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 couroutines.py to avoid
    importing asyncio directly, which in turns also initializes the "logging"
    module as a side-effect (see issue #8).
    _is_coroutineF)r-   r/   getattrr(   s    r   r/   r/   N   s&     &t,,Uou0U0U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_functionr7   Z   s"     t$$H(B4(H(HHr   curdir
str | Nonec                    t          |           } t          t          j        |                     }| j        j        }|0	 |                    |          }d||dz   fz  S # t          $ r Y nw xY wd||dz   fz  S )Nz%s:%d   )get_real_funcr   r-   getfile__code__co_firstlinenorelative_to
ValueError)functionr8   fnlinenorelfns        r   getlocationrF   `   s    X&&H	goh''	(	(B-F	1NN6**E eVaZ000  	 	 	D	 b&1*%%%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>x   sM     	
 	
 	
#	
 -''154D+D+D  ,E+D+Dr   )r4   sysmodulesgetr*   len)rB   rI   rQ   rR   s     @@r   num_mock_patch_argsrX   n   s    +t44I qCKOOF33YIIMs{??FHHUU	
 	
 	
 	
 	
	
 	
 	
  r    F)name	is_methodclsrB   rZ   r[   r\   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        }|s,|r4t          t          j        ||d	          t                    s
|d
d         }t          | d          r|t          |           d         }|S )aL  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 is_method and cls arguments indicate that the function should
    be treated as a bound method even though it's not unless, only in
    the case of cls, 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 r'   kindr   POSITIONAL_OR_KEYWORDKEYWORD_ONLYdefaultemptyrZ   rO   rP   s     r   	<genexpr>z"getfuncargnames.<locals>.<genexpr>   sa        Fi555v///I(( 	
 )((( r   )rg   r;   __wrapped__)r   
parametersrA   	TypeError_pytest.outcomesr`   tuplevaluesr   
isinstancer-   getattr_staticstaticmethodhasattrrX   )rB   rZ   r[   r\   rl   er`   	arg_namess           r   getfuncargnamesrw      sa   <
x((3

	" 
 
 
))))))AAAaAA	
 	
 	
 	
 	
 	
 	
 	
 	

   ""$$    I  ! 
  " 	" "3d;;;\
 
	" abbM	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 r'   rc   ri   s     r   rj   z(get_default_arg_names.<locals>.<genexpr>   sY        6i5y7MNNNIY_,, 	
 -,,,	 r   )ro   r   rl   rp   )rB   s    r   get_default_arg_namesrz      sI       8$$/6688     r   c                @    i | ]}|t          d d          v|d|dS )       z\x02x)range)rO   is     r   
<dictcomp>r      s;     ( ( (AU2s^^,C,CA}Q}}},C,C,Cr      	z\tz\r
z\nsc                6    |                      t                    S r'   )	translate$_non_printable_ascii_translate_table)r   s    r   _translate_non_printabler      s    ;;;<<<r   valbytesc                .    |                      dd          S )Nasciibackslashreplace)decode)r   s    r   _bytes_to_asciir      s    ::g1222r   bytes | strc                    t          | t                    rt          |           }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 unicode objects 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.
    unicode_escaper   )rq   r   r   encoder   r   )r   rets     r   ascii_escapedr      sS    " #u ;c""jj)**11'::#C(((r   c                      e Zd ZU dZded<   dS )_PytestWrappera%  Dummy wrapper around a function object for internal use only.

    Used to correctly unwrap the underlying function object when we are
    creating fixtures, because we wrap the function object ourselves with a
    decorator to issue warnings when the fixture function is called directly.
    r   objN)r   r   r   __doc____annotations__r   r   r   r   r      s%           HHHHHr   r   c                t   | }t          d          D ]H}t          | dd          }t          |t                    r	|j        }  nTt          | dd          }| n?|} Iddlm} t          d                     ||           ||                               t          | t          j
                  r| j        } | S )	zjGet the real function object of the (possibly) wrapped object by
    functools.wraps or functools.partial.d   __pytest_wrapped__Nrk   r   )safereprz<could not find real function of {start}
stopped at {current})startcurrent)r   r4   rq   r   r   _pytest._io.safereprr   rA   format	functoolspartialr#   )r   	start_objr   new_objr   s        r   r<   r<   
  s     I3ZZ 
 
 #3T::g~.. 	+CE#}d33?E111111LTThy))88C== U  
 
 	

 #y()) hJr   c                    	 t          | d          }t          |           } n# t          $ r | cY S w xY w|r9t          | d          r)t          | j                  r|                     |          } | S )zAttempt to obtain the real function object that might be wrapping
    ``obj``, while at the same time returning a bound method to ``holder`` if
    the original object was a bound method.__func____get__)rt   r<   	Exceptioncallabler   )r   holderr[   s      r   get_real_methodr   '  s    C,,	C     


 "WS),, "#+1F1F "kk&!!Js   " 11c                6    	 | j         S # t          $ r | cY S w xY wr'   )r   AttributeErrorr(   s    r   	getimfuncr   5  s3    }   s   	 r   rg   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)rn   r   r4   )r*   rZ   rg   r   s       r   safe_getattrr   <  sQ     .-----vtW---   s    ##r   c                N    	 t          j        |           S # t          $ r Y dS w xY w)z0Ignore any exception via isinstance on Python 3.F)r-   isclassr   )r   s    r   safe_isclassr   M  s9    s###   uus    
$$)finalc                    | S r'   r   )fs    r   r   r   ^  s    r   )cached_propertyc                  X    e Zd ZdZddZe	 ddd            Zeddd            ZddZdS )r   r#   r   r#   Callable[[_S], _T]r   Nonec                ,    || _         |j        | _        d S r'   r   )selfr#   s     r   __init__zcached_property.__init__i  s    DI<DLLLr   .instanceownertype[_S] | Nonecached_property[_S, _T]c                    d S r'   r   r   r   r   s      r   r   zcached_property.__get__m  s	     Cr   r   r   c                    d S r'   r   r   s      r   r   zcached_property.__get__s  s    Cr   Nc                `    || S |                      |          x}|j        | j         j        <   |S r'   )r#   __dict__r   )r   r   r   values       r   r   zcached_property.__get__w  s5    <@IIh<O<OOEH%di&89Lr   )r#   r   r   r   ).)r   r   r   r   r   r   )r   r   r   r   r   r   r'   )r   r   r   	__slots__r   r   r   r   r   r   r   r   f  s        '		( 	( 	( 	( 
;>	 	 	 	 
	
 
	 	 	 	 
		 	 	 	 	 	r   r   
int | Nonec                     t           j        dk    st           j        dk    rdS d} t          j                    }|| k    r|ndS )zReturn 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)rT   platformosgetuid)ERRORuids     r   get_user_idr   ~  sH     |w#,,">"> t ikkUllss,r   r   r
   c                H    J d|  dt          |           j         d            )NFzUnhandled value: z ())typer   )r   s    r   assert_neverr     s,    FFeFFtE{{/CFFFFF5r   )r   r   r   r   )r#   r$   r   r%   )r#   r*   r   r+   r'   )r8   r9   r   r%   )r   rG   )
rB   r$   rZ   r%   r[   r+   r\   r]   r   r^   )rB   r$   r   r^   )r   r%   r   r%   )r   r   r   r%   )r   r   r   r%   )r*   r   rZ   r%   rg   r   r   r   )r   r*   r   r+   )r   r   )r   r
   r   r
   )Er   
__future__r   dataclassesenumr   r-   r   rT   r   r   pathlibr   typingr   r   r	   r
   r   r   pyr   typing_extensionsr   r   r   r   localr   r   Enumr   r   r    r   version_infoimportlib.metadata	importlibmetadataimportlib_metadatar)   r1   r/   r7   rF   rX   rw   rz   r   r   updateordr   r   r%   STRING_TYPESr   r   	dataclassr   r<   r   r   r   r   r   r   r   r   r   r   r   <module>r      s   ( ( ( " " " " " "           				 



                                                             				,++++++ ('''''' WT]]WT]] gn                    v"+3333       5 5 5 5
	V 	V 	V 	VI I I I& & & & &   , C C C C C CL	 	 	 	( (#eCjj( ( ( $ % + +SYYss4yy%TE:  
= = = = cz3 3 3 3) ) ) )0          :       "     

6!!)))))))4444444%%%%%%%   v<<<<<<<    '"b&/   0- - - -hG G G G G Gr   