o 0¦ièL ã @ sÊ d Z ddlZg d¢Zd=dd„Zd>dd„Zdd „ Zd d„ ZeZdd „ ZeZ dd„ Z dedddfdd„Zeddfdd„Z dd„ Zdd„ ZG dd„ deƒZdd„ Zdd„ Zd d!„ Zd"d#„ Zd$d%„ Zd&d'„ Zd?d)d*„Z d@d+d,„ZG d-d.„ d.eƒZG d/d0„ d0eƒZd1d2„ Zzdd3lmZm Z m!Z!mZmZm"Z" e Z#e!Z$d4Z%W n e&y± g Zd5Z#i Z$d(a'd6d7„ Z"dZ%Y nw eej(ƒ e%sâe)ed8ƒsâed5e*d9d(d:� e d;e*d(d<� e d;e+d(d<� e d;e,d(d<� e d;e-d(d<� [%dS )Az&Python part of the warnings subsystem.é N)ÚwarnÚ warn_explicitÚshowwarningÚ formatwarningÚfilterwarningsÚsimplefilterÚ resetwarningsÚcatch_warningsc C s t | |||||ƒ}t|ƒ dS )ú7Hook to write a warning to a file; replace if you like.N)ÚWarningMessageÚ_showwarnmsg_impl)ÚmessageÚcategoryÚfilenameÚlinenoÚfileÚlineÚmsg© r ú//opt/alt/python310/lib64/python3.10/warnings.pyr s r c C s t | |||d|ƒ}t|ƒS )ú.Function to format a warning the standard way.N)r Ú_formatwarnmsg_impl)r r r r r r r r r r s r c C sN | j }|d u rtj}|d u rd S t| ƒ}z| |¡ W d S ty& Y d S w ©N)r ÚsysÚstderrÚ_formatwarnmsgÚwriteÚOSError)r r Útextr r r r s þr c C s† | j j}| j› d| j› d|› d| j› d�}| jd u r6zdd l}| | j| j¡}W n ty5 d }d }Y nw | j}|rE| ¡ }|d| 7 }| j d urÁzdd l}W n ty] d}d }Y nw | ¡ }z| | j ¡}W n tyu d }Y nw |d ur¸|d7 }|D ]5}|d|j|jf 7 }z|d urš| |j|j¡}nd }W n ty¨ d }Y nw |rµ| ¡ }|d | 7 }q€|S |sÁ||› d �7 }|S )Nú:z: Ú r z %s Tz-Object allocated at (most recent call last): z File "%s", lineno %s z %s z<: Enable tracemalloc to get the object allocation traceback )r Ú__name__r r r r Ú linecacheÚgetlineÚ ExceptionÚstripÚsourceÚtracemallocÚ is_tracingÚget_object_traceback) r r Úsr" r r' ÚtracingÚtbÚframer r r r # sb " ü ýý ÿ€ÿ€ýr c C sb zt }W n ty Y nw |tur+t|ƒstdƒ‚|| j| j| j| j| j | j ƒ dS t| ƒ dS )r z:warnings.showwarning() must be set to a function or methodN)r Ú NameErrorÚ_showwarning_origÚcallableÚ TypeErrorr r r r r r r )r Úswr r r Ú_showwarnmsg` s ÿÿr3 c C sL zt }W n ty Y t| ƒS w |tur"|| j| j| j| j| jƒS t| ƒS )r ) r r. Ú_formatwarning_origr r r r r r )r Úfwr r r r u s ù ÿr Ú Fc C sÌ | dv sJ d| f ƒ‚t |tƒsJ dƒ‚t |tƒsJ dƒ‚t|tƒs&J