Ë k†aZâR[ãóÌ—dZddlZddlZddlZddlmZdaGd„dejj«Z Gd„d «Z e «a d „Zd „Zd „Zd „Zej$d„«Zy)a¤Lazy loading for Python 3.6 and above. This uses the new importlib finder/loader functionality available in Python 3.5 and up. The code reuses most of the mechanics implemented inside importlib.util, but with a few additions: * Allow excluding certain modules from lazy imports. * Expose an interface that's substantially the same as demandimport for Python 2. This also has some limitations compared to the Python 2 implementation: * Much of the logic is per-package, not per-module, so any packages loaded before demandimport is enabled will not be lazily imported in the future. In practice, we only expect builtins to be loaded before demandimport is enabled. éNé)ÚtracingFcó&‡—eZdZdZdZˆfd„ZˆxZS)Ú _lazyloaderexzaThis is a LazyLoader except it also follows the _deactivated global and the ignore list. Tcó:•—tjd|«5ts|jtvrH|j |j _|j |_|j j|«nt‰|�!|«ddd«y#1swYyxYw)zMake the module load lazily.zdemandimport %sN) rÚlogÚ _deactivatedÚ__name__ÚignoresÚloaderÚ__spec__Ú __loader__Ú exec_moduleÚsuper)ÚselfÚmoduleÚ __class__s €úBusr/lib/python3.12/site-packages/hgdemandimport/demandimportpy3.pyrz_lazyloaderex.exec_module*sgø€ä �[‰[Ð*¨FÕ 3ݘvŸ™´'Ñ9à)-¯©�—‘Ô&Ø$(§K¡K�Ô!à— ‘ ×'Ñ'¨Õ/ä‘Ñ# FÔ+÷4× 3Ñ 3ús ˜A0BÂB)r Ú __module__Ú __qualname__Ú__doc__Ú_HAS_DYNAMIC_ATTRIBUTESrÚ __classcell__)rs@rrr#sø„ñð#Ð÷ ,ð ,órcóD—eZdZdZdZd„Zd„Zd„ZeZd„Z d„Z d„Z d d „Z y ) Ú LazyFindera2A wrapper around a ``MetaPathFinder`` that makes loaders lazy. ``sys.meta_path`` finders have their ``find_spec()`` called to locate a module. This returns a ``ModuleSpec`` if found or ``None``. The ``ModuleSpec`` has a ``loader`` attribute, which is called to actually load a module. Our class wraps an existing finder and overloads its ``find_spec()`` to replace the ``loader`` with our lazy loader proxy. We have to use __getattribute__ to proxy the instance because some meta path finders don't support monkeypatching. )Ú_findercó2—tj|d|«y©Nr)ÚobjectÚ __setattr__)rÚfinders rÚ__init__zLazyFinder.__init__Hs€Ü×ј4 ¨FÕ3rcó4—dtj|d«zS)Nzr)r Ú__getattribute__©rs rÚ__repr__zLazyFinder.__repr__Ks€Ø$¤v×'>Ñ'>¸tÀYÓ'OÑOÐOrcó@—ttj|d««Sr)Úboolr r%r&s rÚ __nonzero__zLazyFinder.__nonzero__Ps€Ü”F×+Ñ+¨D°)Ó<Ó=Ð=rcóv—|dvrtj||«Sttj|d«|«S)N)rÚ find_specr)r r%Úgetattr©rÚnames rr%zLazyFinder.__getattribute__Us8€Ø Ð+Ñ +Ü×*Ñ*¨4°Ó6Ð 6ä”v×.Ñ.¨t°YÓ?ÀÓFÐFrcóB—ttj|d«|«Sr)Údelattrr r%r.s rÚ __delattr__zLazyFinder.__delattr__[s€Ü”v×.Ñ.¨t°YÓ?ÀÓFÐFrcóD—ttj|d«||«Sr)Úsetattrr r%)rr/Úvalues rr!zLazyFinder.__setattr__^s€Ü”v×.Ñ.¨t°YÓ?ÀÀuÓMÐMrNcój—tj|d«} |j}||||«}|�=|j�1t|jdd«rt|j«|_|S#t$r:|j ||«}|€d}n t j j||«}YŒƒwxYw)Nrr) r r%r,ÚAttributeErrorÚ find_moduleÚ importlibÚutilÚspec_from_loaderr r-r)rÚfullnameÚpathÚtargetr"r,Úspecr s rr,zLazyFinder.find_specas±€Ü×(Ñ(¨¨yÓ9ˆð 5Ø×(Ñ(ˆIñ˜X t¨VÓ4ˆDð Ð Ø— ‘ Ð'ܘŸ ™  ]°DÔ9ä'¨¯ © Ó4ˆDŒKàˆ øô#ò IØ×'Ñ'¨°$Ó7ˆF؈~Ø‘ä —~‘~×6Ñ6°xÀÓH�ùð  Iús˜ A/Á/AB2Â1B2©N) r rrrÚ __slots__r#r'r*Ú__bool__r%r2r!r,©rrrr7s<„ñ ð€Iò4òPò >ð€HòGò GòNôrrcó—|ayr@)r )Ú ignoresets rÚinitrF|s€à�GrcóT—t xr td„tjD««S)Nc3ó<K—|]}t|t«–—Œy­wr@)Ú isinstancer)Ú.0r"s rÚ zisenabled..‚sèø€ð$Ù5B¨6Œ �6œ:×&±]ùs‚)r ÚanyÚsysÚ meta_pathrCrrÚ isenabledrO�s*€ÜÐ ò ¤ñ$Ü58·]²]ó$ó!ðrcó²—g}tjD]/}|jt|t«r |j n|«Œ1|tjddyr@)rMrNÚappendrIrr©Ú new_findersr"s rÚdisablerT‡sE€Ø€KÜ—-”-ˆØ×ÑÜ(¨´Ô<ˆF�NŠNÀ&õ ð ð#„C‡M�M‘!Ñrcó°—g}tjD].}|jt|t«s t |«n|«Œ0|tjddyr@)rMrNrQrIrrRs rÚenablerV�sF€Ø€KÜ—-”-ˆØ×ÑÜ&0°¼Ô&DŒJ�vÔ È&õ ð ð#„C‡M�M‘!Ñrc#óPK—t«}|rda d–—|rdayy#|rdawwxYw­w)NTF)rOr )Ú demandenableds rÚ deactivatedrY™s9èø€ô$“K€MÙØˆ ð!Û á Ø ‰Lð ø‰=Ø ‰Lð üs‚&’–&œ#£&)rÚ contextlibÚimportlib.utilr9rMÚrr r:Ú LazyLoaderrrÚsetr rFrOrTrVÚcontextmanagerrYrCrrÚr`suðñó$ÛÛ åà€ ô,�I—N‘N×-Ñ-ô,÷(?ñ?ñD ‹%€òò ò #ò#ð ×Ññ!óñ!r