
    9[g,              	         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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&                  j(                  Zd.dZ G d dej.                        Zej2                  Zded<   d/dZd/dZd/dZd0d1dZd2dZ ddd	 	 	 	 	 	 	 d3dZ!d4dZ" e#d      D  ci c]  } |  e#dd      vs| d| d c} Z$e$jK                   e&d      d e&d       d! e&d"      d#i       d5d$Z'ejP                   G d% d&             Z)d' Z*d( Z+d) Z,d6d*Z-d7d+Z.d8d,Z/d9d-Z0yc c} w ):z"Python version compatibility code.    )annotationsN)	Parameter)	signature)Path)Any)Callable)Final)NoReturnc                    t        |       S )zBInternal wrapper to prepare lazy proxies for legacy_path instances)LEGACY_PATH)paths    I/var/www/html/bid-api/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                L    t        j                  |       }|xr t        |        S N)inspectisgeneratorfunctioniscoroutinefunction)funcgenfuncs     r   is_generatorr    .   s&    ))$/G4.t444r   c                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)r   r   getattrr   s    r   r   r   3   s#     &&t,Uou0U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(B4(HHr   c                    t        |       } t        t        j                  |             }| j                  j
                  }|	 |j                  |      }d||dz   fz  S d||dz   fz  S # t        $ r Y w xY w)Nz%s:%d   )get_real_funcr   r   getfile__code__co_firstlinenorelative_to
ValueError)functioncurdirfnlinenorelfns        r   getlocationr5   E   s    X&H	gooh'	(B--F	1NN6*E eVaZ000b&1*%%%	  		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#   sysmodulesgetobjectlenattribute_namenew)r0   r7   mock_sentinelut_mock_sentinelps        r   num_mock_patch_argsrD   S   s    +t4ICKKOOF3YIMs{{?FHU 	
##-'1554D+D 	
 	
s   >1B6 )nameclsc                  	 t        |       j                  }t        d j                         D              }|s| j                  }|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r   kindr   POSITIONAL_OR_KEYWORDKEYWORD_ONLYdefaultemptyrF   .0rC   s     r   	<genexpr>z"getfuncargnames.<locals>.<genexpr>   sP      $AFFi555vv///II( 	
$s   A*A,)rP   r)   __wrapped__)r   
parametersr/   	TypeError_pytest.outcomesrI   tuplevaluesr   
isinstancer   getattr_staticstaticmethodhasattrrD   )r0   rF   rG   rV   erI   	arg_namess          r   getfuncargnamesra   f   s    8
x(33
  ""$ I    	""3d;\
 abM	x'1(;=>	G 	" 
)/|2aSA	
 	

s   B B=B88B=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r   rL   rR   s     r   rT   z(get_default_arg_names.<locals>.<genexpr>   sI      8A66i55y7M7MNNIIY__, 	
8s   AA )rY   r   rV   rZ   )r0   s    r   get_default_arg_namesrd      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)r[   bytesdecodeencode	translate$_non_printable_ascii_translate_table)valrets     r   ascii_escapedrw      sI      #ujj"45jj)*11':===>>r   c                      e Zd ZU dZded<   y)_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   ry   ry      s     
Hr   ry   c                8   | }t        d      D ]@  }t        | dd      }t        |t              r|j                  }  n8t        | dd      }| n'|} B ddlm} t        d ||       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__NrU   r   )safereprz could not find real function of z
stopped at )ranger#   r[   ry   rz   _pytest._io.safereprr   r/   	functoolspartialr   )rz   	start_objinew_objr   s        r   r*   r*      s     I3Z #3T:g~.++C#}d3?  	2.x	/B.C=QYZ]Q^P_`
 	
 #y(()hhJr   c                    	 t        | d      }t        |       } |r2t        | d      r&t        | j                        r| j	                  |      } | S # t        $ r | cY S w xY w)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__)r^   r*   	Exceptioncallabler   )rz   holder	is_methods      r   get_real_methodr      s_    C,	C  WS),#++1Fkk&!J	  
s   A AAc                >    	 | j                   S # t        $ r | cY S w xY wr   )r   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)rX   r   r#   )r=   rF   rP   r   s       r   safe_getattrr     s/     .vtW-- s    c                L    	 t        j                  |       S # t        $ r Y yw xY w)z0Ignore any exception via isinstance on Python 3.F)r   isclassr   )rz   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 )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)r:   platformosgetuid)ERRORuids     r   get_user_idr   *  sC     ||w#,,,">  iikUls,,r   c                D    J d|  dt        |       j                   d       )NzUnhandled value: z ())typer   )values    r   assert_neverr   ^  s'    F%eWBtE{/C/C.DAFF5r   )r   zstr | os.PathLike[str]returnr   )r   r=   r   boolr   )r1   zstr | os.PathLike[str] | Noner   str)r   int)r0   zCallable[..., object]rF   r   rG   ztype | Noner   tuple[str, ...])r0   zCallable[..., Any]r   r   )ru   zbytes | strr   r   )r=   r   rF   r   rP   r   r   r   )rz   r=   r   r   )r   z
int | None)r   r
   r   r
   )1r{   
__future__r   dataclassesenumr   r   r   r   r   pathlibr   r:   typingr   r   r	   r
   pyr   localr   r   Enumr   r   r   r|   r    r   r'   r5   rD   ra   rd   r   rt   updateordrw   	dataclassry   r*   r   r   r   r   r   r   )r   s   0r   <module>r      sw   ( "       	  
     	 ggnn     5
	VI&, 	A#A A 
	A
 AH	 $Cj((AU2s^,CAQsG}j( $ % + +Ys4y%TE:
?.   6"-hGQ(s   D?	D?