§
    �Ÿj<!  ã                   ó¤   — d Z ddlZddlZddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZ dd	l	mZ dd
lmZ dZdZ G d„ de¦  «        Zd„ ZdS )ztsys.excepthook for IPython itself, leaves a detailed report on disk.

Authors:

* Fernando Perez
* Brian E. Granger
é    N)Úpformat)ÚPath)Úultratb)Úauthor_email)Úsys_info)Úinput)Ú__version__)ÚOptionala†  Oops, {app_name} crashed. We do our best to make it stable, but...

A crash report was automatically generated with the following information:
  - A verbatim copy of the crash traceback.
  - A copy of your input history during this session.
  - Data on your current {app_name} configuration.

It was left in the file named:
	'{crash_report_fname}'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.

You can mail it to: {contact_name} at {contact_email}
with the subject '{app_name} Crash Report'.

If you want to do it now, the following command will work (under Unix):
mail -s '{app_name} Crash Report' {contact_email} < {crash_report_fname}

In your email, please also include information about:
- The operating system under which the crash happened: Linux, macOS, Windows,
  other, and which exact version (for example: Ubuntu 16.04.3, macOS 10.13.2,
  Windows 10 Pro), and whether it is 32-bit or 64-bit;
- How {app_name} was installed: using pip or conda, from GitHub, as part of
  a Docker container, or other, providing more detail if possible;
- How to reproduce the crash: what exact sequence of instructions can one
  input to get the same crash? Ideally, find a minimal yet complete sequence
  of instructions that yields the crash.

To ensure accurate tracking of this issue, please file a report about it at:
{bug_tracker}
a„  
If you suspect this is an IPython {version} bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at {email}

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    {config}Application.verbose_crash=True
c                   ór   — e Zd ZdZeZdZ	 	 	 	 	 ddee         dee         dee         d	e	d
e	f
d„Z
d„ Zd„ ZdS )ÚCrashHandlerzýCustomizable crash handlers for IPython applications.

    Instances of this class provide a :meth:`__call__` method which can be
    used as a ``sys.excepthook``.  The :meth:`__call__` signature is::

        def __call__(self, etype, evalue, etb)
    zO

***************************************************************************

NTFÚcontact_nameÚcontact_emailÚbug_trackerÚshow_crash_tracebackÚcall_pdbc                 ó”   — d|j         z  | _        || _        || _        || _        t          |j         |||| j        ¬¦  «        | _        dS )a¢  Create a new crash handler

        Parameters
        ----------
        app : Application
            A running :class:`Application` instance, which will be queried at
            crash time for internal information.
        contact_name : str
            A string with the name of the person to contact.
        contact_email : str
            A string with the email address of the contact.
        bug_tracker : str
            A string with the URL for your project's bug tracker.
        show_crash_traceback : bool
            If false, don't print the crash traceback on stderr, only generate
            the on-disk report
        call_pdb
            Whether to call pdb on crash

        Attributes
        ----------
        These instances contain some non-argument attributes which allow for
        further customization of the crash handler's behavior. Please see the
        source for further details.

        zCrash_report_%s.txt)Úapp_namer   r   r   Úcrash_report_fnameN)Únamer   Úappr   r   ÚdictÚinfo)Úselfr   r   r   r   r   r   s          úf/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/IPython/core/crashhandler.pyÚ__init__zCrashHandler.__init__c   sZ   € ðF #8¸#¼(Ñ"BˆÔØˆŒØ ˆŒà$8ˆÔ!Ý C¤HØ#/Ø$1Ø"-Ø)-Ô)@ð	Bñ Bô BˆŒ	ˆ	ˆ	ó    c                 óŽ  — t           j        t           _        d}	 | j        j        }n#  t          j        ¦   «         }Y nxY w|�t          j        |¦  «        st          j        ¦   «         }|| j        z  }|| _        || j	        d<   t          j        |d| j        ¬¦  «        }| j        r ||||¦  «         dS |                     |||d¬¦  «        }| j        rt          |t           j        ¬¦  «         	 t#          |d	d
¬¦  «        }	n##  t          dt           j        ¬¦  «         Y dS xY w|	5  t          dt           j        ¬¦  «         t           | j        j        di | j	        ¤Žt           j        ¬¦  «         |	                     |                      |¦  «        ¦  «         ddd¦  «         n# 1 swxY w Y   t-          d¦  «         dS )z<Handle an exception, call for compatible with sys.excepthookÚNoColorNr   é   )Úcolor_schemeÚlong_headerr   é   )Úcontext©ÚfileÚwzutf-8)Úencodingz&Could not create crash report on disk.zH
**********************************************************************
z.Hit <Enter> to quit (your terminal may close):© )ÚsysÚ__excepthook__Ú
excepthookr   Úipython_dirr   ÚcwdÚis_dirr   r   r   Ú	VerboseTBr   Útextr   ÚprintÚstderrÚopenÚmessage_templateÚformatÚwriteÚmake_reportr   )
r   ÚetypeÚevalueÚetbr    ÚrptdirÚreport_nameÚ	TBhandlerÚ	tracebackÚreports
             r   Ú__call__zCrashHandler.__call__’   s  € õ Ô+�Œð !ˆð	 Ø”XÔ)ˆFˆFøð	 Ý”X‘Z”ZˆFˆFˆFøøøØˆ>¥¤¨VÑ!4Ô!4ˆ>Ý”X‘Z”ZˆFØ˜tÔ6Ñ6ˆð #.ˆÔØ*5ˆŒ	Ð&Ñ'ÝÔ%Ø%ØØ”]ð
ñ 
ô 
ˆ	ð
 Œ=ð 	DØˆI�e˜F 3Ñ'Ô'Ð'ØˆFà!Ÿš u¨V°CÀ˜ÑCÔCˆIð Ô$ð 	.Ý�)¥#¤*Ð-Ñ-Ô-Ð-ð	Ý˜+ s°WÐ=Ñ=Ô=ˆFˆFøð	ÝÐ:ÅÄÐLÑLÔLÐLØˆFˆFøøøàð 	6ð 	6åÐ"­¬Ð4Ñ4Ô4Ð4ÝÐ.�$Ô'Ô.Ð;Ð;°´Ð;Ð;Å#Ä*ÐMÑMÔMÐMð �LŠL˜×)Ò)¨)Ñ4Ô4Ñ5Ô5Ð5ð	6ð 	6ð 	6ñ 	6ô 	6ð 	6ð 	6ð 	6ð 	6ð 	6ð 	6øøøð 	6ð 	6ð 	6ð 	6õ 	Ð>Ñ?Ô?Ð?Ð?Ð?s'   š' §>Ã3D ÄD&Ä+A4F+Æ+F/Æ2F/c                 óJ  — | j         }dg}|j        } |t          ¦   «         ¦  «         	 t          | j        j        ¦  «        } ||¦  «          |d| j        z  ¦  «          |d¦  «          ||¦  «         n#  Y nxY w ||dz   |z   ¦  «         d                     |¦  «        S )z*Return a string containing a crash report.zi***************************************************************************

IPython post-mortem report

zApplication name: %s

z'Current user configuration structure:

zCrash traceback:

Ú )Úsection_sepÚappendr   r   r   Úconfigr   Újoin)r   r>   Úsec_sepr?   Úrpt_addrE   s         r   r7   zCrashHandler.make_reportÊ   sÆ   € ð Ô"ˆà@ÐAˆØ”-ˆØˆ•‘
”
ÑÔÐð	Ý˜TœXœ_Ñ-Ô-ˆFØˆG�GÑÔÐØˆGÐ.°´Ñ>Ñ?Ô?Ð?ØˆGÐ?Ñ@Ô@Ð@ØˆG�F‰OŒOˆOˆOøð	ØˆDøøøØˆ�Ð.Ñ.°Ñ:Ñ;Ô;Ð;à�wŠw�v‰ŒÐs   ªAA8 Á8A<)NNNTF)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú_default_message_templater4   rC   r
   ÚstrÚboolr   r@   r7   r(   r   r   r   r   W   sÀ   € € € € € ðð ð 1ÐØ&€Kð
 '+Ø'+Ø%)Ø%)Øð,Bð ,Bð ˜s”mð,Bð   ”}ð	,Bð
 ˜c”]ð,Bð #ð,Bð ð,Bð ,Bð ,Bð ,Bð^6@ð 6@ð 6@ðpð ð ð ð r   r   c                 óð   — t          j        | ||¦  «         ddlm} |                     ¦   «         rd}nd}t          t                               t          |t          ¬¦  «        t          j        ¬¦  «         dS )zAa light excepthook, adding a small message to the usual tracebackr   )ÚInteractiveShellz%config zc.)ÚemailrE   Úversionr$   N)r>   Úprint_exceptionÚIPython.core.interactiveshellrQ   Úinitializedr1   Ú_lite_message_templater5   r   rS   r)   r2   )r8   r9   ÚtbrQ   rE   s        r   Úcrash_handler_literY   à   s   € åÔ˜e V¨RÑ0Ô0Ð0à>Ð>Ð>Ð>Ð>Ð>Ø×#Ò#Ñ%Ô%ð àˆˆð ˆÝ	Õ
 ×
'Ò
'­lÀ6ÕSZÐ
'Ñ
[Ô
[ÕbeÔblÐmÑmÔmÐmÐmÐmr   )rL   r)   r>   Úpprintr   Úpathlibr   ÚIPython.corer   ÚIPython.core.releaser   ÚIPython.utils.sysinfor   ÚIPython.utils.py3compatr   r	   rS   Útypingr
   rM   rW   Úobjectr   rY   r(   r   r   ú<module>rb      s  ððð ð( €
€
€
Ø Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à  Ð  Ð  Ð  Ð  Ð  Ø -Ð -Ð -Ð -Ð -Ð -Ø *Ð *Ð *Ð *Ð *Ð *Ø )Ð )Ð )Ð )Ð )Ð )à 7Ð 7Ð 7Ð 7Ð 7Ð 7à Ð Ð Ð Ð Ð ðÐ ðB
Ð ðFð Fð Fð Fð F�6ñ Fô Fð FðRnð nð nð nð nr   