Ë ÉA.U¾jbãó2—ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z m Z m Z ddlmZmZddlmZe ej&efZeZd„Zedde edefd „«Zd ej&de efd „Zej4d e edej&fd „«Zej8d edej&fd„«Zej8d ddej&fd„«Zd„Zd ej&fd„Zej@ dejBdœd„«Z"d„Z#dede$fd„Z%ej4d„«Z&e&j9ejN«ej@d„««Zej@dejPfd„«Z)ej@d„«Z*d„Z+y)éN)ÚUnionÚOptionalÚcasté)ÚResourceReaderÚ Traversable)Ú wrap_speccó`‡‡—t«Štj‰«‰‰fˆˆfd„ «}|S)a Replace 'package' parameter as 'anchor' and warn about the change. Other errors should fall through. >>> files('a', 'b') Traceback (most recent call last): TypeError: files() takes from 0 to 1 positional arguments but 2 were given có”•—|‰ur1|‰ur ‰||«Stjdtd¬«‰|«S|‰ur‰«S‰|«S)Nz/First parameter to files is renamed to 'anchor'é)Ú stacklevel)ÚwarningsÚwarnÚDeprecationWarning)ÚanchorÚpackageÚfuncÚ undefineds €€ú2/usr/lib/python3.12/importlib/resources/_common.pyÚwrapperz"package_to_anchor..wrapper!sZø€à ˜)Ñ #ؘYÑ&Ù˜F GÓ,Ð,Ü �M‰MØAÜ"Øõ ñ ˜“=Ð Ø �yÑ Ù“6ˆMÙ�F‹|Ðó)ÚobjectÚ functoolsÚwraps)rrrs` @rÚpackage_to_anchorrs3ù€ô“€Iä‡_�_�TÓØ ¨)õ óð ð €NrrÚreturncó*—tt|««S)z3 Get a Traversable resource for an anchor. )Ú from_packageÚresolve)rs rÚfilesr 3s€ô œ ›Ó (Ð(rrcór—|j}t|jdd«}|€y||j«S)z? Return the package's loader if it's a ResourceReader. Úget_resource_readerN)Ú__spec__ÚgetattrÚloaderÚname©rÚspecÚreaders rr"r";s9€ð × Ñ €DÜ �T—[‘[Ð"7¸Ó >€FØ €~ØÙ �$—)‘)Ó ÐrÚcandcó6—ttj|«S©N)rÚtypesÚ ModuleType©r*s rrrKs€ä ”× Ñ  $Ó 'Ð'rcó,—tj|«Sr,)Ú importlibÚ import_moduler/s rÚ_r3Ps€ä × "Ñ " 4Ó (Ð(rcóB—tt«jd«S)NÚ__name__)rÚ _infer_callerÚ f_globalsr/s rr3r3Us€ä ”=“?×,Ñ,¨ZÑ8Ó 9Ð9rc󾇗ˆfd„}d„}tj«Štj|‰«}tj||«}t |«j S)zS Walk the stack and find the frame of the first caller not in this module. có<•—|j‰djk(S)Nr)Úfilename)Ú frame_infoÚstacks €rÚ is_this_filez#_infer_caller..is_this_file_sø€Ø×"Ñ" e¨A¡h×&7Ñ&7Ñ7Ð7rcó —|jdk(S)Nr)Úfunction)r;s rÚ is_wrapperz!_infer_caller..is_wrapperbs€Ø×"Ñ" iÑ/Ð/r)Úinspectr<Ú itertoolsÚ filterfalseÚnextÚframe)r=r@Ú not_this_fileÚcallersr<s @rr6r6ZsNø€ô 8ò0ô �M‰M‹O€EÜ×)Ñ)¨,¸Ó>€Mä×#Ñ# J° Ó>€GÜ �‹=× Ñ Ðrcó‚—t|«}|jj|j«}|j «S)z= Return a Traversable object for the given package. )r r%r"r&r r's rrrls2€ô �WÓ €DØ �[‰[× ,Ñ ,¨T¯Y©YÓ 7€FØ �<‰<‹>Ðr)Ú _os_removec#ópK—tj|¬«\}} tj||««tj|«~t j |«–— ||«y#tj|«wxYw#t$rYywxYw# ||«w#t$rYwwxYwxYw­w©N)Úsuffix)ÚtempfileÚmkstempÚosÚwriteÚcloseÚpathlibÚPathÚFileNotFoundError)r)rLrIÚfdÚraw_paths rÚ _tempfilerWvs èø€ô×#Ñ#¨6Ô2�L€Bˆð ð Ü �H‰H�R™›Ô "ä �H‰H�RŒLØ Ü�l‰l˜8Ó$Ò$ð Ù �xÕ øô �H‰H�R�Lûô !ò Ù ð ûð Ù �xÕ øÜ ò Ù ð ÿso‚B6žA0¹-BÁ'B Á/B6Á0BÂB BÂB6ÂBÂB6ÂB3ÂB$Â#B3Â$ B0Â-B3Â/B0Â0B3Â3B6cóD—t|j|j¬«SrK)rWÚ read_bytesr&©Úpaths rÚ _temp_filer\‘s€Ü �T—_‘_¨T¯Y©YÔ 7Ð7rr[có€—tjt«5|j«cddd«S#1swYyxYw)a Some Traversables implement ``is_dir()`` to raise an exception (i.e. ``FileNotFoundError``) when the directory doesn't exist. This function wraps that call to always return a boolean and only return True if there's a dir and it exists. NF)Ú contextlibÚsuppressrTÚis_dirrZs rÚ_is_present_dirra•s+€ô × Ñ Ô.Õ /Ø�{‰{‹}÷ 0× /Ñ /à úsš4´=cóD—t|«r t|«St|«S)zu Given a Traversable object, return that object as a path on the local file system in a context manager. )raÚ _temp_dirr\rZs rÚas_filerd¢s€ô .¨dÔ3Œ9�T‹?ÐI¼ÀDÓ9IÐIrc#óK—|–—y­w)z7 Degenerate behavior for pathlib.Path objects. N©rZs rr3r3«s èø€ð ƒJùs‚Údirc#óhK—|5}tj|«–—ddd«y#1swYyxYw­w)zD Wrap tempfile.TemporyDirectory to return a pathlib object. N)rRrS)rgÚresults rÚ _temp_pathrj´s%èø€ñ �Ü�l‰l˜6Ó"Ò"÷ �‰üs‚2…&� 2¦/«2c#ó°K—|j«sJ‚ttj««5}t ||«–—ddd«y#1swYyxYw­w)zt Given a traversable dir, recursively replicate the whole tree to the file system in a context manager. N)r`rjrMÚTemporaryDirectoryÚ_write_contents)r[Útemp_dirs rrcrc½sAèø€ð �;‰;Œ=Ј=Ü ”H×/Ñ/Ó1Ô 2°hܘh¨Ó-Ò-÷ 3× 2Ñ 2üs‚0A²A Á AÁ AÁAcó—|j|j«}|j«r3|j«|j «D]}t ||«Œ|S|j |j««|Sr,)Újoinpathr&r`ÚmkdirÚiterdirrmÚ write_bytesrY)ÚtargetÚsourceÚchildÚitems rrmrmÈsf€Ø �O‰O˜FŸK™KÓ (€EØ ‡}�}„Ø � ‰ Œ Ø—N‘NÖ$ˆDÜ ˜E 4Õ (ð%ð €Lð ×ј&×+Ñ+Ó-Ô.Ø €Lrr,)Ú),rOrRrMrr^r-r1rArrBÚtypingrrrÚabcrrÚ _adaptersr r.ÚstrÚPackageÚAnchorrr r"ÚsingledispatchrÚregisterr3r6rÚcontextmanagerÚremoverWr\ÚboolrardrSrlrjrcrmrfrrÚr„sðÛ ÛÛÛÛÛ ÛÛÛÛç(Ñ(ß,å à �× Ñ  #Ð%Ñ &€Ø €òð<ñ)�(˜6Ñ"ð)¨kò)óð)ð  ×!1Ñ!1ð °h¸~Ñ6Nó ð  ×Ñð(�(˜6Ñ"ð( u×'7Ñ'7ò(óð(ð ×Ñð)ˆCð)�E×$Ñ$ò)óð)ð ×Ñð:ˆDð:�U×%Ñ%ò:óð:òð$˜%×*Ñ*óð ×Ñð ðð �y‰yó óðò48ð ˜+ð ¨$ó ð ×ÑñJóðJð ×Ñ�'—,‘,ÓØ ×Ññóó ðð ×Ñð#�H×/Ñ/ò#óð#ð ×Ññ.óð.ór