+
    üÐjÏ  ã                   ó~   € R t R.t^ RIHt ^ RIHtHtHtHtH	t	 ^ RI
HtHt ] ! R R4      4       tR R ltR R	 ltR
# )zƒ
Integration with systemd.

Currently only the minimum APIs necessary for using systemd's socket activation
feature are supported.
Ú	ListenFDs)Úgetpid)ÚDictÚListÚMappingÚOptionalÚSequence)ÚFactoryÚdefinec                   óˆ   a € ] tR t^t o Rt]! ]4      t^t]	RV 3R lR ll4       t
V 3R lR ltV 3R lR ltV 3R	 ltR
tV tR# )r   aŠ  
L{ListenFDs} provides access to file descriptors inherited from systemd.

Typically L{ListenFDs.fromEnvironment} should be used to construct a new
instance of L{ListenFDs}.

@cvar _START: File descriptors inherited from systemd are always
    consecutively numbered, with a fixed lowest "starting" descriptor.  This
    gives the default starting descriptor.  Since this must agree with the
    value systemd is using, it typically should not be overridden.

@ivar _descriptors: A C{list} of C{int} giving the descriptors which were
    inherited.

@ivar _names: A L{Sequence} of C{str} giving the names of the descriptors
    which were inherited.
Nc                ó`   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RS[ S[,          RR/# )é   ÚenvironÚstartÚreturnr   )r   r   ÚstrÚint)ÚformatÚ__classdict__s   "€Ú8/usr/lib/python3/dist-packages/twisted/python/systemd.pyÚ__annotate__ÚListenFDs.__annotate__/   s;   ø€ ÷ +'ñ +'á™'¡#¡s (Õ+Õ,ð+'ñ ™�}ð+'ð 
ñ	+'ó    c                ó  € Vf	   ^ RI Hp TpVf   V P                  p\        \	        4       4      VP                  R4      8X  d   \        W!4      p\        V4      pM. pRp\        V4      \        V4      8w  d
   V ! . R4      # V ! WE4      # )a^  
@param environ: A dictionary-like object to inspect to discover
    inherited descriptors.  By default, L{None}, indicating that the
    real process environment should be inspected.  The default is
    suitable for typical usage.

@param start: An integer giving the lowest value of an inherited
    descriptor systemd will give us.  By default, L{None}, indicating
    the known correct (that is, in agreement with systemd) value will be
    used.  The default is suitable for typical usage.

@return: A new instance of C{cls} which can be used to look up the
    descriptors which have been inherited.
)r   Ú
LISTEN_PID© )	Úosr   Ú_STARTr   r   ÚgetÚ_parseDescriptorsÚ_parseNamesÚlen)Úclsr   r   Ú_environÚdescriptorsÚnamess   &&&   r   ÚfromEnvironmentÚListenFDs.fromEnvironment.   s~   € ð( Š?Ý.àˆGØŠ=Ø—J‘JˆEäŒv‹x‹=˜GŸK™K¨Ó5Ô5Ü%6°uÓ%FˆKÜ#.¨wÓ#7‰EàˆKØˆEô ˆu‹:œ˜[Ó)Ô)Ù�r˜2“;Ðá�;Ó&Ð&r   c                ó0   <€ V ^8„  d   QhRS[ S[,          /# ©r   r   )r   r   )r   r   s   "€r   r   r   \   s   ø€ ÷ 'ñ '¡d©3¥iñ 'r   c                ó,   € \        V P                  4      # )z&
@return: The configured descriptors.
)ÚlistÚ_descriptors©Úselfs   &r   ÚinheritedDescriptorsÚListenFDs.inheritedDescriptors\   s   € ô �D×%Ñ%Ó&Ð&r   c                ó6   <€ V ^8„  d   QhRS[ S[S[3,          /# r)   )r   r   r   )r   r   s   "€r   r   r   b   s   ø€ ÷ 9ñ 9©4±±S°­>ñ 9r   c                óT   € \        \        V P                  V P                  4      4      # )zZ
@return: A mapping from the names of configured descriptors to
    their integer values.
)ÚdictÚzipÚ_namesr,   r-   s   &r   ÚinheritedNamedDescriptorsÚ#ListenFDs.inheritedNamedDescriptorsb   s    € ô
 ”C˜Ÿ™ T×%6Ñ%6Ó7Ó8Ð8r   c                óR   <€ V ^8„  d   Qh/ S[ S[,          ;R&   S[ S[,          ;R&   # )r   r,   r5   )r   r   r   )r   r   s   "€r   r   r      s'   ø‡ ‚ ñ( ™3•-Ññ) ñ* ‘S�MÑ*ò+ r   r   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r	   Útupler5   r   Úclassmethodr&   r/   r6   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      sN   ø‡ € ññ& $ E›N€Fà€Fà÷+'ñ +'ó ð+'÷Z'ð '÷9ð 9÷[ ƒ r   c                ót   € V ^8„  d   QhR\         R\        \        \        3,          R\        \         ,          /# )r   r   r   r   )r   r   r   r   )r   s   "r   r   r   j   s.   € ÷ !ñ !œSð !¬7´3¼°8Õ+<ð !ÄÄcÅñ !r   c                ó    €  \        VR,          4      p\        \        W V,           4      4      pVR VR V#   \        \        3 d    . u # i ; i)aú  
Parse the I{LISTEN_FDS} environment variable supplied by systemd.

@param start: systemd provides only a count of the number of descriptors
    that have been inherited.  This is the integer value of the first
    inherited descriptor.  Subsequent inherited descriptors are numbered
    counting up from here.  See L{ListenFDs._START}.

@param environ: The environment variable mapping in which to look for the
    value to parse.

@return: The integer values of the inherited file descriptors, in order.
Ú
LISTEN_FDSr   )r   r+   ÚrangeÚKeyErrorÚ
ValueError)r   r   Úcountr$   s   &&  r   r   r   j   s]   € ðÜ�G˜LÕ)Ó*ˆô œ5 °­Ó6Ó7ˆð �LÐ! 7¨<Ð#8ØÐøô# ”jÐ!ô ØŠ	ðús   ‚7 ·AÁAc                óh   € V ^8„  d   QhR\         \        \        3,          R\        \        ,          /# )r   r   r   )r   r   r   )r   s   "r   r   r   Ž   s'   € ÷ ñ œ¤¤c Õ*ð ¬x¼­}ñ r   c                ó~   € V P                  RR4      p\        V4      ^ 8”  d   \        VP                  R4      4      # R# )zâ
Parse the I{LISTEN_FDNAMES} environment variable supplied by systemd.

@param environ: The environment variable mapping in which to look for the
    value to parse.

@return: The names of the inherited descriptors, in order.
ÚLISTEN_FDNAMESÚ Ú:r   )r   r!   r>   Úsplit)r   r%   s   & r   r    r    Ž   s9   € ð �K‰KÐ(¨"Ó-€EÜ
ˆ5ƒz�A„~Ü�U—[‘[ Ó%Ó&Ð&Ø€Ir   N)r=   Ú__all__r   r   Útypingr   r   r   r   r   Úattrsr	   r
   r   r   r    r   r   r   Ú<module>rS      sG   ðñ
ð ˆ-€å ß :Õ :ç !ð ÷Q9ð Q9ó ðQ9õh!÷Hr   