Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/Cython/Compiler/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/Cython/Compiler/__pycache__/Errors.cpython-37.pyc

B

Z��Z��@s�ddlmZyddlmZWnek
r8eefZYnXddlZddl	m
Z
ddlmZddl
mZdd	l
mZGd
d�de�ZGdd
�d
e�Zdd�Zdd�Zdd�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Zdadadad:d d!�Zd"d#�Z d;d%d&�Z!d'd(�Z"dZ#d<d)d*�Z$d=d+d,�Z%iZ&d>d-d.�Z'gZ(d/d0�Z)d?d2d3�Z*d4d5�Z+e
d@d6d7��Z,d8d9�Z-dS)A�)�absolute_import)�
basestringN)�contextmanager�)�
open_new_file�)�
DebugFlags)�Optionsc@seZdZdS)�
PyrexErrorN)�__name__�
__module__�__qualname__�rr�I/opt/alt/python37/lib64/python3.7/site-packages/Cython/Compiler/Errors.pyr
sr
c@seZdZdS)�PyrexWarningN)rrr
rrrrrsrcCs�|d}t|t�rtd|��y|��}Wntk
rBd}Yn>Xd�|td|dd�|d��}d|d|d	df}d
d|df}|S)NrzOPlease replace filename strings with Scanning.FileSourceDescriptor instances %rz[unprintable code]
�r�z
...
%s%s^
� rz%s
%s%s
z<------------------------------------------------------------)�
isinstance�any_string_type�AssertionError�	get_lines�UnicodeDecodeError�join�max)�position�source�F�srrr�contexts

$rcCs&|r"d|d��|d|dfSdS)Nz
%s:%d:%d: rrrr)Zget_error_description)rrrr�format_position+sr cCs*|r&t|�}t|�}d|||p df}|S)Nz%
Error compiling Cython file:
%s
%s%sr)r r)�messagerZpos_strZcontrrr�format_error1s
r"c@seZdZddd�Zdd�ZdS)�CompileErrorNrcCs:||_||_t||�|_d|_t�||j�||f|_dS)NF)r�message_onlyr"�formatted_message�reported�	Exception�__init__�args)�selfrr!rrrr(:szCompileError.__init__cCs|jS)N)r%)r*rrr�__str__FszCompileError.__str__)Nr)rrr
r(r+rrrrr#8s
r#c@seZdZddd�ZdS)�CompileWarningNrcCs||_t�|t|�|�dS)N)rr'r(r )r*rr!rrrr(KszCompileWarning.__init__)Nr)rrr
r(rrrrr,Isr,c@seZdZdd�ZdS)�
InternalErrorcCs||_t�|d|�dS)NzInternal compiler error: %s)r$r'r()r*r!rrrr(TszInternalError.__init__N)rrr
r(rrrrr-Qsr-c@seZdZdd�ZdS)�
AbortErrorcCs||_t�|d|�dS)NzAbort error: %s)r$r'r()r*r!rrrr(\szAbortError.__init__N)rrr
r(rrrrr.Ysr.c@seZdZddd�ZdS)�
CompilerCrashNcCs�|rd|}nd}||_|r(d||f}|rLddl}|dd�|�|��7}|rp|s\|d7}|d|jj|f7}t�|||�|||||f|_dS)N�
zCompiler crash in %s%srz/

Compiler crash traceback from this point on:
rz%s: %s)	r$�	tracebackr�	format_tb�	__class__rr#r(r))r*�posrr!�causeZ
stacktracer1rrrr(bs"
zCompilerCrash.__init__)N)rrr
r(rrrrr/`sr/c@seZdZdZdS)�NoElementTreeInstalledExceptionzcraised when the user enabled options.gdb_debug but no ElementTree
    implementation was found
    N)rrr
�__doc__rrrrr6xsr6cCs.|dk	rt|�anda|r"tjandadadS)Nr)r�listing_file�sys�stderr�	echo_file�
num_errors)�pathZecho_to_stderrrrr�open_listing_file�s
r>cCstrt��dadS)N)r8�closerrrr�close_listing_file�sr@Tc	Cs�tr|rtd�|�n�|jr"dSd|_yd|}Wn2tk
rftt|dd�t|dd��d}YnXtr�yt�|�Wn&tk
r�t�|�dd	��YnXt	r�yt	�|�Wn&tk
r�t	�|�dd	��YnXt
d
7a
tjr�t
d��dS)N���Tz%s
r$z[unprintable exception message]rr0�ASCII�replacerzfatal errors)�error_stack�appendr&�UnicodeEncodeErrorr"�getattrr8�write�encoder;r<r	Z	fast_failr.)�errZ	use_stack�linerrr�report_error�s.rLcCs4|dkrt|��t||�}tjr(t|��t|�|S)N)r-r#rZdebug_exception_on_errorr'rL)rr!rJrrr�error�s
rMcCs>|tkrdSt||�}d|}tr,t�|�tr:t�|�|S)Nz	note: %s
)�LEVELr,r8rHr;)rr!�level�warnrKrrrr!�s


r!cCsR|tkrdStjr |r t||�St||�}d|}tr@t�|�trNt�|�|S)Nzwarning: %s
)rNr	Zwarning_errorsrMr,r8rHr;)rr!rOrPrKrrr�warning�s




rQcCsN|tks|tkrdSt||�}d|}tr4t�|�trBt�|�dt|<|S)Nzwarning: %s
T)rN�_warn_once_seenr,r8rHr;)rr!rOrPrKrrr�	warn_once�s


rScCst�g�dS)N)rDrErrrr�hold_errors�srTFcCs&t��}|s"x|D]}t|�qWdS)N)rD�poprL)�ignore�held_errorsrJrrr�release_errors�s
rXcCstdS)NrA)rDrrrrrW�srWc	cs*g}t�|�z
|VWdt|d�XdS)N)rV)rDrErX)rV�errorsrrr�local_errors�s


rZcCst��tdd�=dS)N)rR�clearrDrrrr�resetsr\)r)T)r)r)r)F)F).�
__future__rZ__builtin__rr�ImportError�bytes�strr9�
contextlibrZUtilsrrrr	r'r
rrr r"r#r,r-r.r/r6r8r<r;r>r@rLrMrNr!rQrRrSrDrTrXrWrZr\rrrr�<module>sN