+
    ^|i+"                         R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIt^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHtHt ^ RItR
tRt ! R R4      tR R ltR# )ztsys.excepthook for IPython itself, leaves a detailed report on disk.

Authors:

* Fernando Perez
* Brian E. Granger
N)pformat)Path)ultratb)Application)author_email)sys_info)__version__)OptionalDicta  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   a  ] tR t^Yt o Rt]tRtRV 3R lR ll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# )CrashHandlerzCustomizable 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)
Nc                n   < V ^8  d   QhRS[ RS[S[,          RS[S[,          RS[S[,          RS[RS[/# )   appcontact_namecontact_emailbug_trackershow_crash_tracebackcall_pdb)r   r	   strbool)format__classdict__s   ";/usr/lib/python3/dist-packages/IPython/core/crashhandler.py__annotate__CrashHandler.__annotate__f   s[     ,B ,B,B sm,B  }	,B
 c],B #,B ,B    c                    RVP                   ,          V n        Wn        W`n        WPn        \        VP                   VVVV P                  R7      V n        R# )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   r   r   r   dictinfo)selfr   r   r   r   r   r   s   &&&&&&&r   __init__CrashHandler.__init__f   sK    F #8#(("B $8!CHH#/$1"-)-)@)@	B	r   c                T   < V ^8  d   QhRS[ S[,          RS[RS[P                  RR/# )r   etypeevalueetbreturnNtypeBaseExceptiontypesTracebackType)r   r   s   "r   r   r      sD     :L :LM":L :L   	:L
 
:Lr   c           	        \         P                  \         n        \        V P                  RR4      pVe%   \        V\        4      '       g   Q h\        V4      pM\        P                  ! 4       pVP                  4       '       g   \        P                  ! 4       pWPP                  ,          p\        V4      V n
        \        V4      V P                  R&   \        P                  ! RRV P                  R7      pV P                  '       d   V! WV4       R# VP                  WV^R7      pV P                   '       d   \#        V\         P$                  R7        \'        VR	R
R7      p	T	;_uu_ 4        \#        R\         P$                  R7       \#        T P(                  P*                  ! R/ T P                  B \         P$                  R7       T	P-                  T P/                  \        T4      4      4       RRR4       \0        P2                  ! R4       R#    \#        R\         P$                  R7        R# ; i  + '       g   i     LK; i)z<Handle an exception, call for compatible with sys.excepthookipython_dirNr   nocolorT)
theme_namelong_headerr   )contextfilewzutf-8)encodingz&Could not create crash report on disk.z.Hit <Enter> to quit (your terminal may close):zH
**********************************************************************
 )sys__excepthook__
excepthookgetattrr   
isinstancer   r   cwdis_dirr   r"   r   	VerboseTBr   textr   printstderropenmessage_templater   writemake_reportbuiltin_modinput)
r#   r'   r(   r)   r1   rptdirreport_name	TBhandler	tracebackreports
   &&&&      r   __call__CrashHandler.__call__   s    ++ dhht<"k3////+&FXXZF}}XXZF666 #&k"2*-k*:		&'%% ]]
	
 ===e3'!uCCI $$$)#**-	+sW=F
 V"4$''..;;#**M LL))#i.9:  	JK	:LVs   H -BH4H14I	c                &   < V ^8  d   QhRS[ RS[ /# )r   rO   r*   )r   )r   r   s   "r   r   r      s      S S r   c                j   V P                   pR.pVP                  pV! \        4       4        \        V P                  P
                  4      pV! V4       V! RV P                  P                  ,          4       V! R4       V! V4       T! TR,           T,           4       RP                  T4      #     L+; i)z*Return a string containing a crash report.zApplication name: %s

z'Current user configuration structure:

zCrash traceback:

 zi***************************************************************************

IPython post-mortem report

)section_sepappendr   r   r   configr    join)r#   rO   sec_seprP   rpt_addrX   s   &&    r   rI   CrashHandler.make_report   s     ""@A--
	TXX__-FG.>??@FO 	..:;wwv		s   AB. .B2c                L   < V ^8  d   Qh/ S[ S[S[S[,          3,          ;R&   # )r   r"   )r
   r   r	   )r   r   s   "r   r   r   Y   s       sHSM!
"" r   )r   r   r   r"   r   zO

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

)NNNTF)__name__
__module____qualname____firstlineno____doc___default_message_templaterG   rV   r$   rQ   rI   __annotate_func____static_attributes____classdictcell__)r   s   @r   r   r   Y   sC      1&K,B ,B\:L :Lx o  r   r   c                j    V ^8  d   QhR\         \        ,          R\        R\        P                  RR/# )r   r'   r(   tbr*   Nr+   )r   s   "r   r   r      s=     n nn(5n;@;N;Nn	nr   c                    \         P                  ! WV4       ^ RIHp VP	                  4       '       d   RpMRp\        \        P                  \        V\        R7      \        P                  R7       R# )zAa light excepthook, adding a small message to the usual traceback)InteractiveShellz%config zc.)emailrX   versionr6   N)rO   print_exceptionIPython.core.interactiveshellrj   initializedrD   _lite_message_templater   r   rl   r;   rE   )r'   r(   rh   rj   rX   s   &&&  r   crash_handler_literq      sW     eR0>##%% 	
 
'
'l6SZ
'
[beblblmr   )rb   r;   rO   pprintr   pathlibr   builtinsrJ   IPython.corer   IPython.core.applicationr   IPython.core.releaser   IPython.utils.sysinfor   r   rl   typingr	   r
   r.   rc   rp   r   rq   r:   r   r   <module>rz      sT   (        0 - * 7 !  B
 J JZnr   