o
    -i                     @   s   d dl Z d dlZddgZe  d ZG dd dZG dd dZG d	d
 d
ZG dd dZG dd dZ	G dd de
ZG dd de
Zdd ZG dd dZdS )    NExceptionInfo	Traceback   c                   @   .   e Zd Zdd Zejdkredd ZdS dS )_Codec                 C   s   |j | _ |j| _|j| _d| _|j| _|j| _d| _d| _d| _|j	| _	|j
| _
|j| _d| _tjdkrA|j| _t| | _d S d S )N           )co_filenameco_nameco_argcountco_cellvarsco_firstlinenoco_flagsco_freevarsco_code	co_lnotabco_names
co_nlocalsco_stacksizeco_varnamessysversion_infoco_qualnamelistco_positions_co_positions)selfcoder   r   I/var/www/html/philips/venv/lib/python3.10/site-packages/billiard/einfo.py__init__   s"   
z_Code.__init__r	   c                 C      | j jS N)r   __iter__r   r   r   r!   r         z_Code.co_positionsN__name__
__module____qualname__r"   r   r   propertyr   r   r   r   r!   r   	   s    
r   c                   @   s2   e Zd ZeZdd Zejdkredd Z	dS dS )_Framec                 C   s   i | _ |jdd|jdd d| _i  | _}z	|jd |d< W n	 ty*   Y nw d | _d | _d | _d | _d | _	| 
|j| _|j| _|j| _d| _d S )N__file____main__r)   r.   r)   
__loader____traceback_hide__F)
f_builtins	f_globalsgetf_localsKeyErrorf_backf_tracef_exc_traceback
f_exc_typef_exc_valueCodef_codef_linenof_lastif_restricted)r   frameflr   r   r!   r"   &   s(   


z_Frame.__init__r	   c                 C   r#   r$   )r>   r   r&   r   r   r!   r   >   r'   z_Frame.co_positionsN)
r)   r*   r+   r   r=   r"   r   r   r,   r   r   r   r   r!   r-   #   s    
r-   c                   @   s@   e Zd Zdd ZejdkrdZedd Zej	dd ZdS dS )	_Objectc                    s    fdd|  D  d S )Nc                    s   g | ]
\}}t  ||qS r   )setattr).0kvr&   r   r!   
<listcomp>F   s    z$_Object.__init__.<locals>.<listcomp>)items)r   kwr   r&   r!   r"   E   s   z_Object.__init__r	   ))NNNNc                 C   s   t | d| jjS )Nr   )getattr__default_co_positions__r%   r&   r   r   r!   r   K   s   z_Object.co_positionsc                 C   
   || _ d S r$   )r   )r   valuer   r   r!   r   S   s   
N)
r)   r*   r+   r"   r   r   rM   r,   r   setterr   r   r   r!   rD   C   s    

rD   c                   @   r   )
_Truncatedc                 C   s6   d| _ tddd dd tdddd| _d | _d| _d S )	N r0   z...z[rest of traceback truncated])r   r   )r4   f_filenor>   r   )	tb_linenorD   tb_frametb_nexttb_lastir&   r   r   r!   r"   Z   s   
z_Truncated.__init__r	   c                 C   r#   r$   )rV   r   r&   r   r   r!   r   h   r'   z_Truncated.co_positionsNr(   r   r   r   r!   rQ   X   s    
rQ   c                   @   s   e Zd ZeZedfddZdS )r   r   c                 C   s^   |  |j| _|j| _|j| _d | _|jd ur-||kr't|j||d | _d S t | _d S d S )N   )FramerV   rU   rX   rW   r   rQ   )r   tb
max_framesdepthr   r   r!   r"   p   s   
zTraceback.__init__N)r)   r*   r+   r-   rZ   DEFAULT_MAX_FRAMESr"   r   r   r   r!   r   m   s    c                   @   s   e Zd Zdd Zdd ZdS )RemoteTracebackc                 C   rN   r$   r[   )r   r[   r   r   r!   r"   }   s   
zRemoteTraceback.__init__c                 C      | j S r$   r`   r&   r   r   r!   __str__      zRemoteTraceback.__str__N)r)   r*   r+   r"   rb   r   r   r   r!   r_   |   s    r_   c                       s,   e Zd Z fddZdd Zdd Z  ZS )ExceptionWithTracebackc                    s   || _ d| | _t   d S )Nz

"""
%s""")excr[   superr"   )r   re   r[   	__class__r   r!   r"      s   
zExceptionWithTraceback.__init__c                 C   ra   r$   r`   r&   r   r   r!   rb      rc   zExceptionWithTraceback.__str__c                 C   s   t | j| jffS r$   )rebuild_excre   r[   r&   r   r   r!   
__reduce__   s   z!ExceptionWithTraceback.__reduce__)r)   r*   r+   r"   rb   rj   __classcell__r   r   rg   r!   rd      s    rd   c                 C   s   t || _| S r$   )r_   	__cause__)re   r[   r   r   r!   ri      s   
ri   c                   @   sJ   e Zd ZdZdZdZdZdZdZdddZ	dd Z
dd	 Zed
d ZdS )r   zException wrapping an exception and its traceback.

    :param exc_info: The exception info tuple as returned by
        :func:`sys.exc_info`.

    NFc                 C   sZ   |pt  \| _}}zt|| _dt| j||| _|| _W ~n~w t	|| j| _
d S )NrS   )r   exc_infotyper   r[   join	tracebackformat_exceptioninternalrd   	exception)r   rm   rr   rs   r[   r   r   r!   r"      s   
zExceptionInfo.__init__c                 C   ra   r$   )rp   r&   r   r   r!   rb      rc   zExceptionInfo.__str__c                 C   s   d| j j| jf S )Nz<%s: %r>)rh   r)   rs   r&   r   r   r!   __repr__   s   zExceptionInfo.__repr__c                 C   s   | j | j| jfS r$   )rn   rs   r[   r&   r   r   r!   rm      s   zExceptionInfo.exc_info)NF)r)   r*   r+   __doc__rn   rs   r[   rp   rr   r"   rb   rt   r,   rm   r   r   r   r!   r      s    
)r   rp   __all__getrecursionlimitr^   r   r-   rD   rQ   r   	Exceptionr_   rd   ri   r   r   r   r   r!   <module>   s     