+
    ˜°³j (  ã                   ó  € ^ RI t ^ RIt^ RIt^ RIHtHt ^ RIHtHtH	t
 ^ RIHt ^ RIHt ^RIHtHtHt . ROt]P(                  ! ]4      t ! R R]4      t ! R R]4      t ! R R	]4      t ! R R]4      t]! 4       t ! R R
]4      tR# )é    N)ÚABCÚabstractmethod)Ú_getattributeÚ_PicklerÚwhichmodule)Ú
ModuleType)ÚAny)ÚdemangleÚget_mangle_prefixÚ
is_mangledÚObjNotFoundErrorÚObjMismatchErrorÚImporterÚOrderedImporterc                   ó   € ] tR t^tRtRtR# )r   zHRaised when an importer cannot find an object by searching for its name.© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    ÚW/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/package/importer.pyr   r      s   † ÝRr   c                   ó   € ] tR t^tRtRtR# )r   z]Raised when an importer found a different object with the same name as the user-provided one.r   Nr   r   r   r   r   r      s   † Ýgr   c                   ót   a € ] tR t^t o Rt]V 3R lR l4       tRV 3R lR lltV 3R lR ltV 3R	 lt	R
t
V tR# )r   a,  Represents an environment to import modules from.

By default, you can figure out what module an object belongs by checking
__module__ and importing the result using __import__ or importlib.import_module.

torch.package introduces module importers other than the default one.
Each PackageImporter introduces a new namespace. Potentially a single
name (e.g. 'foo.bar') is present in multiple namespaces.

It supports two main operations:
    import_module: module_name -> module object
    get_name: object -> (parent module name, name of obj within module)

The guarantee is that following round-trip will succeed or throw an ObjNotFoundError/ObjMisMatchError.
    module_name, obj_name = env.get_name(obj)
    module = env.import_module(module_name)
    obj2 = getattr(module, obj_name)
    assert obj1 is obj2
c                ó&   <€ V ^8„  d   QhRS[ RS[/# ©é   Úmodule_nameÚreturn©Ústrr   )ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚImporter.__annotate__4   s   ø€ ÷ ñ ©ð ±ñ r   c                ó   € R# )zfImport `module_name` from this environment.

The contract is the same as for importlib.import_module.
Nr   ©Úselfr!   s   &&r   Úimport_moduleÚImporter.import_module3   s   ‚ r   Nc                óP   <€ V ^8„  d   QhRS[ RS[R,          RS[S[S[3,          /# ©r    ÚobjÚnameNr"   ©r	   r$   Útuple)r%   r&   s   "€r   r'   r(   :   s3   ø€ ÷ U$ñ U$™Cð U$¡s¨T¥zð U$¹UÁ3ÉÀ8½_ñ U$r   c                óþ  a a€ Sfd   V'       d\   \         P                  P                  \        V4      4      f2   \	        VRR4      pVe!    V! 4       p\        V\        4      '       d   VoSf   \	        VRR4      oSf   VP                  oS P                  VS4      p\        V4      p S P                  V4      p\        P                  R8¼  d   \        VSP                  R4      4      pM\        VS4      w  r‰ WJ d   VS3# VV 3R lp
V
! V4      w  r¼pV
! V4      w  rïpRV RV R	V R
V RV RV R2p\)        V4      h  \         d     Lãi ; i  \         \"        \$        3 d    \'        T RT RS 24      Rhi ; i)añ  Given an object, return a name that can be used to retrieve the
object from this environment.

Args:
    obj: An object to get the module-environment-relative name for.
    name: If set, use this name instead of looking up __name__ or __qualname__ on `obj`.
        This is only here to match how Pickler handles __reduce__ functions that return a string,
        don't use otherwise.
Returns:
    A tuple (parent_module_name, attr_name) that can be used to retrieve `obj` from this environment.
    Use it like:
        mod = importer.import_module(parent_module_name)
        obj = getattr(mod, attr_name)

Raises:
    ObjNotFoundError: we couldn't retrieve `obj by name.
    ObjMisMatchError: we found a different object with the same name as `obj`.
NÚ
__reduce__r   Ú.z was not found as c                 ó¾   <€ Sf   \        R4      hSP                  V S4      p\        V4      pV'       d   \        V4      MRpV'       d   R\        V4       2MRpWV3# )Nzname must not be Nonezthe current Python environmentzthe importer for z'sys_importer')ÚAssertionErrorr   r   r   )r0   r!   Úis_mangled_ÚlocationÚimporter_namer1   r+   s   &    €€r   Úget_obj_infoÚ'Importer.get_name.<locals>.get_obj_infou   st   ø€ ØŠ|Ü$Ð%<Ó=Ð=Ø×*Ñ*¨3°Ó5ˆKÜ$ [Ó1ˆK÷ ô " +Ô.à5ð ÷ ð $Ô$5°kÓ$BÐ#CÑDà%ð ð
 ¨-Ð7Ð7r   z

The object provided is from 'z', which is coming from z.
However, when we import 'z', it's coming from z@.
To fix this, make sure this 'PackageExporter's importer lists z before )é   é   )r   ÚdispatchÚgetÚtypeÚgetattrÚ
isinstancer$   Ú	Exceptionr   r   r
   r,   ÚsysÚversion_infor   ÚsplitÚImportErrorÚKeyErrorÚAttributeErrorr   r   )r+   r0   r1   ÚreduceÚrvÚorig_module_namer!   ÚmoduleÚobj2Ú_r<   Úobj_module_nameÚobj_locationÚobj_importer_nameÚobj2_module_nameÚobj2_locationÚobj2_importer_nameÚmsgs   f&f               r   Úget_nameÚImporter.get_name:   sÇ  ù€ ð& Š<ŸC¤H×$5Ñ$5×$9Ñ$9¼$¸s»)Ó$DÒ$Lô ˜S ,°Ó5ˆFØÒ!ðÙ›�BÜ! "¤c×*Ò*Ø!˜ð Š<Ü˜3 °Ó5ˆDØŠ<Ø—<‘<ˆDà×+Ñ+¨C°Ó6Ðô Ð/Ó0ˆð	Ø×'Ñ'¨Ó4ˆFÜ×Ñ 7Ô*ô % V¨T¯Z©Z¸«_Ó=‘ä'¨°Ó5‘��að ‹;Ø Ð$Ð$ö	8ñ" <HÈÓ;LÑ8ˆÐ'8Ù>JÈ4Ó>PÑ;ÐÐ);à/°Ð/@ð A$Ø$0 >ð 2*Ø*:Ð);Ð;OÐP]Èð _Oà Ð! Ð*<Ð)=¸Qð	@ð 	ô ˜sÓ#Ð#øôq !ô Ùðûô, œX¤~Ð6ô 	Ü"Ø�%Ð)¨+¨°a¸°vÐ>óàðð	ús%   ÁE  Â)AE Ã+E Å EÅEÅ+E<c                ó,   <€ V ^8„  d   QhRS[ RS[RS[/# ©r    r0   r1   r"   ©r	   r$   )r%   r&   s   "€r   r'   r(   ‘   s"   ø€ ÷ ñ ™sð ©#ð ±#ñ r   c                ó  € \        VRR4      pVe   V# V P                  P                  4       P                  4        F4  w  r4VR8X  g   VR8X  g   Vf   K   \	        WB4      ^ ,          VJ d   Vu # K6  	  R#   \
         d     KH  i ; i)zòFind the module name an object belongs to.

This should be considered internal for end-users, but developers of
an importer can override it to customize the behavior.

Taken from pickle.py, but modified to exclude the search into sys.modules
r   NÚ__main__Ú__mp_main__)rC   ÚmodulesÚcopyÚitemsr   rK   )r+   r0   r1   r!   rO   s   &&&  r   r   ÚImporter.whichmodule‘   s–   € ô ˜c <°Ó6ˆØÒ"ØÐð $(§<¡<×#4Ñ#4Ó#6×#<Ñ#<Ö#>ÑˆKà˜zÔ)Ø -Ô/Ø’>áðÜ  Ó.¨qÕ1°SÓ8Ø&Ò&ñ 9ñ $?ñ øô "ô Úðús   ÁA6Á6BÂBc                ó<   <€ V ^8„  d   Qh/ S[ S[S[3,          ;R&   # )r    ra   )Údictr$   r   )r%   r&   s   "€r   r'   r(      s   ø‡ ‚ ñ* ‘#‘z�/Õ"Ñ"ò+ r   r   ©N)r   r   r   r   r   r   r,   rY   r   Ú__annotate_func__r   Ú__classdictcell__©r&   s   @r   r   r      s=   ø‡ € ñð, ÷ó ð÷U$ò U$÷nð ÷k ƒ r   c                   óH   a € ] tR t^¯t o RtV 3R lR ltV 3R lR ltRtV tR# )Ú_SysImporterz;An importer that implements the default behavior of Python.c                ó    <€ V ^8„  d   QhRS[ /# )r    r!   )r$   )r%   r&   s   "€r   r'   Ú_SysImporter.__annotate__²   s   ø€ ÷ 4ñ 4©ñ 4r   c                ó.   € \         P                  ! V4      # rg   )Ú	importlibr,   r*   s   &&r   r,   Ú_SysImporter.import_module²   s   € Ü×&Ò& {Ó3Ð3r   c                ó,   <€ V ^8„  d   QhRS[ RS[RS[/# r\   r]   )r%   r&   s   "€r   r'   rn   µ   s"   ø€ ÷ .ñ .™sð .©#ð .±#ñ .r   c                ó>   € \        VR R4      pVe   V# \        W4      # )r   N)rC   Ú_pickle_whichmodule)r+   r0   r1   r!   s   &&& r   r   Ú_SysImporter.whichmoduleµ   s)   € ô ˜c <°Ó6ˆØÒ"ØÐÜ" 3Ó-Ð-r   r   N)	r   r   r   r   r   r,   r   r   ri   rj   s   @r   rl   rl   ¯   s   ø‡ € ÙE÷4ð 4÷.ö .r   rl   c                   ój   a € ] tR t^Ât o RtR tR tRV 3R lR lltV 3R lR ltV 3R	 lR
 lt	Rt
V tR# )r   z�A compound importer that takes a list of importers and tries them one at a time.

The first importer in the list that returns a result "wins".
c                ó&   € \        V4      V n        R # rg   )ÚlistÚ
_importers)r+   Úargss   &*r   Ú__init__ÚOrderedImporter.__init__È   s   € Ü*.¨t«*ˆŽr   c                ó˜   € \        VRR4      '       g   R# \        VR4      '       g   R# \        VR4      '       g   R# VP                  RJ # )a¯  Returns true iff this module is an empty PackageNode in a torch.package.

If you intern `a.b` but never use `a` in your code, then `a` will be an
empty module with no source. This can break cases where we are trying to
re-package an object after adding a real dependency on `a`, since
OrderedImporter will resolve `a` to the dummy package and stop there.

See: https://github.com/pytorch/pytorch/pull/71520#issuecomment-1029603769
Ú__torch_package__FÚ__path__Ú__file__TN)rC   Úhasattrr€   )r+   rO   s   &&r   Ú_is_torchpackage_dummyÚ&OrderedImporter._is_torchpackage_dummyË   sF   € ô �vÐ2°E×:Ò:ÙÜ�v˜z×*Ò*ÙÜ�v˜z×*Ò*ÙØ�‰ $Ð&Ð&r   Nc                óP   <€ V ^8„  d   QhRS[ RS[R,          RS[S[S[3,          /# r/   r2   )r%   r&   s   "€r   r'   ÚOrderedImporter.__annotate__Ý   s.   ø€ ÷ 
ñ 
™Cð 
¡s¨T¥zð 
¹UÁ3ÉÀ8½_ñ 
r   c           
     ó  € V P                    F  p VP                  W4      u # 	  \        RV RV RV P                    24      h  \        \        3 d/   pR T RT RT RT 2p\        P                  T4        Rp?Kq  Rp?ii ; i)z Tried to call get_name with obj z, and name z on z	 and got NzCould not find obj z
 and name z in any of the importers )ry   rY   r   r   ÚlogÚwarning)r+   r0   r1   ÚimporterÚeÚwarning_messages   &&&   r   rY   ÚOrderedImporter.get_nameÝ   s¥   € ØŸœˆHð-Ø×(Ñ(¨Ó3Ò3ñ (ô Ø! #  j°°Ð6OÐPT×P_ÑP_ÐO`Ðaó
ð 	
øô %Ô&6Ð7ô -à6°s°eð < Ø $˜v T¨(¨°9¸Q¸CðAð  ô —‘˜O×,Ò,ûð-ús   ‘AÁBÁ#A>Á>Bc                ó&   <€ V ^8„  d   QhRS[ RS[/# r   r#   )r%   r&   s   "€r   r'   r…   ë   s   ø€ ÷ 3ñ 3©ð 3±ñ 3r   c                ó&  € R pV P                    FT  p\        V\        4      '       g   \        V R24      h VP	                  V4      pV P                  V4      '       d   KR  Vu # 	  Ve   Vh\        V4      h  \         d   pTp R p?K|  R p?ii ; i)NzQ is not an Importer. All importers in OrderedImporter must inherit from Importer.)ry   rD   r   Ú	TypeErrorr,   r‚   ÚModuleNotFoundError)r+   r!   Úlast_errr‰   rO   Úerrs   &&    r   r,   ÚOrderedImporter.import_moduleë   s�   € ØˆØŸœˆHÜ˜h¬×1Ò1ÜØ�jð !Sð Sóð ðØ!×/Ñ/°Ó<�Ø×.Ñ.¨v×6Ò6ÙØ’ñ (ð ÒØˆNä% kÓ2Ð2øô 'ô Ø–ûðús   ·'A8Á!A8Á8BÂBÂBc                ó,   <€ V ^8„  d   QhRS[ RS[RS[/# r\   r]   )r%   r&   s   "€r   r'   r…      s"   ø€ ÷ ñ ™sð ©#ð ±#ñ r   c                ód   € V P                    F  pVP                  W4      pVR 8w  g   K  Vu # 	  R # )r_   )ry   r   )r+   r0   r1   r‰   r!   s   &&&  r   r   ÚOrderedImporter.whichmodule   s3   € ØŸœˆHØ"×.Ñ.¨sÓ9ˆKØ˜jÖ(Ø"Ò"ñ (ñ
 r   )ry   rg   )r   r   r   r   r   r{   r‚   rY   r,   r   r   ri   rj   s   @r   r   r   Â   s2   ø‡ € ñò
5ò'÷$
ò 
÷3ð 3÷*ö r   )r   r   r   r   )rp   ÚloggingrF   Úabcr   r   Úpickler   r   r   rt   Útypesr   Útypingr	   Ú	_manglingr
   r   r   Ú__all__Ú	getLoggerr   r‡   rE   r   r   r   rl   Úsys_importerr   r   r   r   Ú<module>r       s�   ðÛ Û Û 
ß #÷ñ õ
 Ý ç >Ñ >ò R€Ø×Ò˜Ó!€ôS�yô Sôh�yô hôPˆsô Pôf.�8ô .ñ  ‹~€ôD�hö Dr   