+
    üÐj!  ã                   óL  € R t ^ RIt^ RIt^ RIt^ RIt^ RIHtHtHtH	t	 ^ RI
HtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt  ! R R	]4      t ! R
 R4      t ! R R4      tR t ]P4                  tR tR R lt]	! R]R7      tRR R llt]t R t!RR.t"R#   ] d	    RR lt L4i ; i)zL
Plugin system for Twisted.

@author: Jp Calderone
@author: Glyph Lefkowitz
N)ÚIterableÚOptionalÚTypeÚTypeVar)Ú	InterfaceÚ
providedBy)Úlog)ÚgetAdapterFactory)Ú	getModule)ÚnamedAnyc                   ó   € ] tR t^tRtRtR# )ÚIPluginzé
Interface that must be implemented by all plugins.

Only objects which implement this interface will be considered for return
by C{getPlugins}.  To be useful, plugins should also implement some other
application-specific interface.
© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    Ú0/usr/lib/python3/dist-packages/twisted/plugin.pyr   r      s   † õr   r   c                   óL   a € ] tR t^&t o R tV 3R lR ltR tRR lt]tRt	V t
R# )	ÚCachedPluginc                ó€   € Wn         W n        W0n        W@n        V P                   P                  P                  V 4       R # ©N)ÚdropinÚnameÚdescriptionÚprovidedÚpluginsÚappend)Úselfr   r   r   r   s   &&&&&r   Ú__init__ÚCachedPlugin.__init__'   s/   € ØŒØŒ	Ø&ÔØ ŒØ�‰×Ñ×"Ñ" 4Ö(r   c                ó    <€ V ^8„  d   QhRS[ /# ©é   Úreturn)Ústr)ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚCachedPlugin.__annotate__.   s   ø€ ÷ 
ñ 
™#ñ 
r   c           
     óÒ   € R P                  V P                  V P                  P                  RP	                  V P
                   Uu. uF  qP                  NK  	  up4      4      # u upi )z(<CachedPlugin {!r}/{!r} (provides {!r})>z, )r)   r   r   Ú
moduleNameÚjoinr   r   )r!   Úis   & r   Ú__repr__ÚCachedPlugin.__repr__.   sO   € Ø9×@Ñ@Ø�I‰IØ�K‰K×"Ñ"Ø�I‰I¨4¯=ª=Ó9©= a—z”z©=Ñ9Ó:ó
ð 	
ùò :s   ÁA$c                óp   € \        V P                  P                  R ,           V P                  ,           4      # )Ú.)r   r   r.   r   )r!   s   &r   ÚloadÚCachedPlugin.load5   s%   € Ü˜Ÿ™×.Ñ.°Õ4°t·y±yÕ@ÓAÐAr   Nc                óÌ   € V P                    FS  pVP                  V4      '       d   V P                  4       u # \        WAR 4      f   K<  V! V P                  4       V4      u # 	  V# r   )r   ÚisOrExtendsr5   r	   )r!   Ú	interfaceÚregistryÚdefaultÚprovidedInterfaces   &&&& r   Ú__conform__ÚCachedPlugin.__conform__8   sV   € Ø!%§¤ÐØ ×,Ñ,¨Y×7Ò7Ø—y‘y“{Ò"Ü Ð!2¸tÓDÔPÙ  §¡£¨gÓ6Ò6ñ	 "/ð
 ˆr   )r   r   r   r   )NN)r   r   r   r   r"   r1   r5   r=   ÚgetComponentr   Ú__classdictcell__©r*   s   @r   r   r   &   s&   ø‡ € ò)÷
ð 
òBôð †Lr   r   c                   ó*   a € ] tR t^Dt o RtR tRtV tR# )ÚCachedDropinaÎ  
A collection of L{CachedPlugin} instances from a particular module in a
plugin package.

@type moduleName: C{str}
@ivar moduleName: The fully qualified name of the plugin module this
    represents.

@type description: C{str} or L{None}
@ivar description: A brief explanation of this collection of plugins
    (probably the plugin module's docstring).

@type plugins: C{list}
@ivar plugins: The L{CachedPlugin} instances which were loaded from this
    dropin.
c                ó,   € Wn         W n        . V n        R # r   )r.   r   r   )r!   r.   r   s   &&&r   r"   ÚCachedDropin.__init__V   s   € Ø$ŒØ&ÔØˆŽr   )r   r.   r   N)r   r   r   r   r   r"   r   r@   rA   s   @r   rC   rC   D   s   ø‡ € ñ÷"ð r   rC   c                 ó  € \        V P                  V P                  4      pV P                  P	                  4        F@  w  r#\        VR 4      pVf   K  \        WVP                  \        \        V4      4      4       KB  	  V# r   )	rC   r   r   Ú__dict__Úitemsr   r   Úlistr   )Úproviderr   ÚkÚvÚplugins   &    r   Ú_generateCacheEntryrN   \   sh   € Ü˜(×+Ñ+¨X×-=Ñ-=Ó>€FØ×!Ñ!×'Ñ'Ö)‰ˆÜ˜˜DÓ!ˆØÔä˜ A§I¡I¬t´J¸vÓ4FÓ/GÖHñ	 *ð
 €Mr   c                 ó$   € / pV  F  pWV&   K	  	  V# r   r   )ÚkeysÚvalueÚdrK   s   &&  r   ÚfromkeysrS   j   s   € ØˆÛˆAØˆa‹Dñ àˆr   c                ó  € / p\        V P                  4      p/ pVP                  4        F@  pVP                  P	                  4       pWS9  d   . W5&   W5,          pVP                  V4       KB  	  VP                  4        EFH  w  rvVP                  R4      p VP                  4       p	VP                  R4      ;_uu_ 4       p
\        P                  ! V
4      pRRR4       Rp/ pT Fs  pTP                  P                  R4      R
,          pRYß&   TX9  g"   TP                  P                  4       T	8¼  g   KQ  Rp TP                  4       p\        T4      pTY¿&   Ku  	  \%        XP'                  4       4       F  pYý9  g   K  Y¿ RpK  	  T'       d'    TP)                  \        P*                  ! T4      4       TP5                  T4       EKK  	  V#   + '       g   i     Lÿ; i  \         d	    / p^ p	 ELi ; i  \         d    \         P"                  ! 4         EK6  i ; i  \,         d8   p\         P.                  ! RTP0                  TP2                  R7        Rp?L¦Rp?i\         d    \         P"                  ! RR	4        LÍi ; i)a#  
Compute all the possible loadable plugins, while loading as few as
possible and hitting the filesystem as little as possible.

@param module: a Python module object.  This represents a package to search
for plugins.

@return: a dictionary mapping module names to L{CachedDropin} instances.
zdropin.cacheÚrNFr4   Tz@Unable to write to plugin cache %(path)s: error number %(errno)d)r)   ÚpathÚerrnoz)Unexpected error while writing cache fileéÿÿÿÿ)r
   r   ÚiterModulesÚfilePathÚparentr    rH   ÚchildÚgetModificationTimeÚopenÚpickler5   ÚBaseExceptionr   ÚsplitrN   r   ÚerrrI   rP   Ú
setContentÚdumpsÚOSErrorÚmsgrV   rW   Úupdate)ÚmoduleÚallCachesCombinedÚmodÚbucketsÚplugmodÚfppÚbucketÚpseudoPackagePathÚ
dropinPathÚ
lastCachedÚfÚdropinDotCacheÚ
needsWriteÚexistingKeysÚpluginModuleÚ	pluginKeyrJ   ÚentryÚes   &                  r   ÚgetCacherz   q   s:  € ð ÐÜ
�F—O‘OÓ
$€Cà€Gð —?‘?Ö$ˆØ×Ñ×%Ñ%Ó'ˆØÔØˆG‰LØ•ˆØ�‰�gÖñ %ð &-§]¡]§_Ñ!ÐØ&×,Ñ,¨^Ó<ˆ
ð	Ø#×7Ñ7Ó9ˆJØ—‘ ×%Ô%¨Ü!'§¢¨Q£�÷ &ð ˆ
ØˆÛ"ˆLØ$×)Ñ)×/Ñ/°Ó4°RÕ8ˆIØ&*ˆLÑ#Ø Ô/Ø×%Ñ%×9Ñ9Ó;¸zÖIà!�
ð6Ø+×0Ñ0Ó2�Hô
 0°Ó9�EØ05�NÓ-ñ #ô  ˜n×1Ñ1Ó3Ö4ˆIØÖ,Ø"Ð-Ø!’
ñ 5÷ ðKØ×%Ñ%¤f§l¢l°>Ó&BÔCð 	× Ñ  ×0ñ] &5ð^ Ð÷W &×%ûäô 	ØˆNØ‹Jð	ûô %ô ä—G’G—I�Iðûô ô Ü—’ð+ð $Ÿ™ØŸ'™'÷ò ûô !ô KÜ—’˜ÐIÖJðKúsf   Â)G Â?GÃG Ä8G6Æ%HÇGÇG ÇG Ç G3Ç2G3Ç6 HÈHÈJÈ)-IÉJÉ(JÊJc                ó8   € V ^8„  d   QhR\         P                  /# r%   )ÚtypesÚ
ModuleType)r)   s   "r   r+   r+   ½   s   € ÷ ñ œ×)Ñ)ñ r   c                  ó   € ^ RI Hp  V # )é    N)Útwisted.pluginsr   )Úpackages    r   Ú_pluginsPackager‚   ½   s
   € Ý%à€Nr   Ú_TInterface)Úboundc                ó’   € V ^8„  d   QhR\         \        ,          R\        \        P                  ,          R\
        \        ,          /# )r&   r9   r�   r'   )r   rƒ   r   r|   r}   r   )r)   s   "r   r+   r+   Æ   s9   € ÷ "ñ "Ü”KÕ ð"Ü+3´E×4DÑ4DÕ+Eð"äŒkÕñ"r   c              #  ó  "  € Vf   \        4       p\        V4      pVP                  4        F,  w  r4VP                   F  p V ! VR4      pVe   Vx € K  K  	  K.  	  R#   \         d    \
        P                  ! 4         KD  i ; i5i)aG  
Retrieve all plugins implementing the given interface beneath the given module.

@param interface: An interface class.  Only plugins which implement this
interface will be returned.

@param package: A package beneath which plugins are installed.  For
most uses, the default value is correct.

@return: An iterator of plugins.
N)r‚   rz   rH   r   r`   r   rb   )r9   r�   Ú
allDropinsÚkeyr   rM   Úadapteds   &&     r   Ú
getPluginsrŠ   Æ   s}   é € ð ‚Ü!Ó#ˆÜ˜'Ó"€JØ!×'Ñ'Ö)‰ˆØ—n”nˆFð"Ù# F¨DÓ1�ð Ò&Ø!”Mñ 'ó %ó *øô !ô Ü—’—	ðüs)   ‚>BÁ	AÁ
BÁ BÁ>BÂBÂBc           
     ó†  € V P                  R4      p\        P                   Uu. uF‘  p\        P                  P	                  \        P                  P
                  ! V.VR.,           O5!  4      '       d   KR  \        P                  P                  \        P                  P
                  ! V.VO5!  4      NK“  	  up# u upi )a„  
Return a list of additional directories which should be searched for
modules to be included as part of the named plugin package.

@type name: C{str}
@param name: The fully-qualified Python name of a plugin package, eg
    C{'twisted.plugins'}.

@rtype: C{list} of C{str}
@return: The absolute paths to other directories which may contain plugin
    modules for the named plugin package.
r4   z__init__.py)ra   ÚsysrV   ÚosÚexistsr/   Úabspath)r   r�   Úxs   &  r   ÚpluginPackagePathsr‘   æ   s†   € ð �j‰j˜‹o€Gô —’óáˆAÜ�w‰w�~‰~œbŸg™gŸlšl¨1ÐI¨w¸-¸Õ/HÓI×Jô 	3Œ�‰�‰œŸ™Ÿš QÐ1¨Ó1Ö2Ùñð ùò s   ¤AB>Á8AB>rŠ   r‘   r   )#r   r�   r_   rŒ   r|   Útypingr   r   r   r   Úzope.interfacer   r   Útwisted.pythonr   Útwisted.python.componentsr	   Útwisted.python.modulesr
   Útwisted.python.reflectr   r   r   rC   rN   ÚdictrS   ÚAttributeErrorrz   r‚   rƒ   rŠ   Ú
getPlugInsr‘   Ú__all__r   r   r   Ú<module>rœ      s¯   ðñó 
Û Û 
Û ß 4Ó 4ç 0å Ý 7Ý ,Ý +ôˆiô ÷ñ ÷<ñ ò0ðØ�}‰}€HòIõXñ �m¨9Ô5€÷"ð: €
òð< Ð-Ð
.‚øðy ô öðús   Á"B ÂB#Â"B#