+
    Df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=JJEvx=GKK55%6u%FK#.w#7EKE u:[))r2;;&&r   c                0   < V ^8  d   QhRS[ S[,          /# r   r   )r   r   )r   r   s   "r   r   r   \   s     ' 'd3i '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 94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-) * SM*+ 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     & $ENF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 !73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]    GL)* 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     KK("-E
5zA~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9h!Hr   