ʕ{ c UdZddlmZddlZddlZddlZddlZddlZddlZddlm Z ddlm Z ddl m Z ddl mZddl mZdd l mZdd l mZdd l mZdd l mZddlZ ddl mZerddlmZedZedZejjZdXdZGddejZej Z!de"d<ej#dkr ddl$Z%e%j&Z'nddl'Z'dYdZ(dZd"Z)dZd#Z*dZd$Z+d[d\d'Z,d]d)Z-d*d+dd,d^d3Z.d_d4Z/d5e0d6DZ1e12e3d7d8e3d9d:e3d;dZ4e5e6fZ7dadAZ8dbdCZ9ej:GdDdEZ;dFZdcdKZ?dddMZ@erej#dkrddNl mAZAnddNlmAZAnej#dkrddNl mAZAndOZAej#dkrddPlmBZBnGdQdReeefZBdedTZCdfdWZDdS)gz"Python version compatibility code.) annotationsN) Parameter) signature)Path)Any)Callable)Generic)NoReturn) TYPE_CHECKING)TypeVarT)overload)Final_T_Spathstr | os.PathLike[str]return LEGACY_PATHc t|S)zBInternal wrapper to prepare lazy proxies for legacy_path instances)r)rs /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/_pytest/compat.py legacy_pathr0s t  ceZdZdZdS) NotSetTyperN)__name__ __module__ __qualname__tokenrrrr8s EEErrrNOTSET)funcCallable[..., Any]strc:tt|SN)r%rr#s r _format_argsr)Es y  robjectboolcNtj|}|ot| Sr')inspectisgeneratorfunctioniscoroutinefunction)r#genfuncs r is_generatorr1Is))$//G  4.t4444rcLtj|pt|ddS)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 rr/r/Ns&  &t , , Uou0U0UUrcHt|ptj|S)zZReturn True if the given function seems to be an async function or an async generator.)r/r-isasyncgenfunctionr(s ris_async_functionr7Zs" t $ $ H(B4(H(HHrcurdir str | Nonect|}ttj|}|jj}|0 ||}d||dzfzS#t$rYnwxYwd||dzfzS)Nz%s:%d) get_real_funcrr-getfile__code__co_firstlineno relative_to ValueError)functionr8fnlinenorelfns r getlocationrF`sX&&H goh'' ( (B   -F  1NN6**EeVaZ00 0    D  b&1*% %%sA A,+A,intcPt|dd}|sdSttjddt ttjddt t fd|DS)z>Return number of arguments used up by mock arguments (if any). patchingsNrmockDEFAULTz unittest.mockcFg|]}|js|jus |ju|Sr)attribute_namenew).0p mock_sentinelut_mock_sentinels r z'num_mock_patch_args..xsM   # -''154D+D+D ,E+D+Dr)r4sysmodulesgetr*len)rBrIrQrRs @@rnum_mock_patch_argsrXns+t44I qCKOOF33YIIMs{??FHHUU           rF)name is_methodclsrBrZr[r\ type | Nonetuple[str, ...]c t|j}n7#ttf$r#}ddlm}|d|d|dYd}~nd}~wwxYwt d|D}|s|j}|s,|r4ttj ||d ts |d d}t|d r|t|d}|S) aLReturn 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)pytraceNc3K|]D}|jtjus|jtjur|jtju;|jVEdSr'kindrPOSITIONAL_OR_KEYWORD KEYWORD_ONLYdefaultemptyrZrOrPs r z"getfuncargnames..sa Fi5 5 5v/// I ( (  ) ( ( (r)rgr; __wrapped__)r parametersrA TypeError_pytest.outcomesr`tuplevaluesr isinstancer-getattr_static staticmethodhasattrrX)rBrZr[r\rler` arg_namess rgetfuncargnamesrwsa< x((3  "   ))))))  A A Aa A A          ""$$I !  " "  "3d ; ; ;\  "abbM x''?1(;;==> sA AA c|tdt|jDS)Nc3K|]=}|jtjtjfvr|jtju4|jV>dSr'rcris rrjz(get_default_arg_names..sY 6i5y7MN N N IY_ , ,  - , , , r)rorrlrp)rBs rget_default_arg_namesrzsI 8$$/6688  rc@i|]}|tddv|d|dS) z\x02x)range)rOis r rs;(((AU2s^^,C,CA}Q}}},C,C,Cr z\t z\r z\nsc6|tSr') translate$_non_printable_ascii_translate_table)rs r_translate_non_printablers ;;; < < 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)rqrrencoderr)rrets r ascii_escapedrsS"#u;c""jj)**11':: #C ( ((rceZdZUdZded<dS)_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. robjN)rrr__doc____annotations__rrrrrs% HHHHHrrct|}tdD]H}t|dd}t|tr |j}nTt|dd}|n?|}Iddlm}td||||t|tj r|j }|S) zjGet the real function object of the (possibly) wrapped object by functools.wraps or functools.partial.d__pytest_wrapped__Nrkr)safereprz                   rr int | Nonec\tjdvrdStj}|dkr|ndS)zYReturn the current user id, or None if we cannot get it reliably on the current platform.)win32 emscriptenN)rTplatformosgetuid)uids r get_user_idr~s6 |...t )++C))33%rrr cHJd|dt|jd)NFzUnhandled value: z ())typer)rs r assert_neverrs,FFeFFtE{{/CFFFFF5r)rrrr)r#r$rr%)r#r*rr+r')r8r9rr%)rrG) rBr$rZr%r[r+r\r]rr^)rBr$rr^)rr%rr%)rrrr%)rrrr%)r*rrZr%rgrrr)rr*rr+)rr)rr rr )Er __future__r dataclassesenumrr-rrTrrpathlibrtypingrrr r r r pyr typing_extensionsrrrrlocalrrEnumrrr r version_infoimportlib.metadata importlibmetadataimportlib_metadatar)r1r/r7rFrXrwrzrrupdateordrrr% STRING_TYPESrr dataclassrr<rrrrrrrrrrrrs(((""""""    ,++++++('''''' WT]] WT]]gn   v"+3333    5555 V V V VIIII & & & & &, CCCCCCL    ((#eCjj((($%++SYYss4yy%TE: ====cz 3333))))0         :   "  6!!)))))))4444444%%%%%%%v<<<<<<<'"b&/0 & & & &VGGGGGGr