
    h#                        \ \4rS SKrS SKJr   S SKJr  \" 5       r
SSKJr  SS	KJr  SS
KJr   " S S\5      r " S S\5      r " S S\5      rS rS rS r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      rS0S  jrS! rS0S" jrS# r Sr!S$ r"S% r#S1S& jr$S2S' jr%S2S( jr&S) r'S3S* jr(S+ r)\S3S, j5       r*S- r+S. r,S/ r-g! \	 a     " S S5      r Nf = f)4    N)contextmanager)localc                       \ rS rSrSrg)_threadlocal    N__name__
__module____qualname____firstlineno____static_attributes__r       P/var/www/fran/franai/venv/lib/python3.13/site-packages/Cython/Compiler/Errors.pyr   r      s    r   r      )open_new_file   )
DebugFlags)Optionsc                       \ rS rSrSrg)
PyrexError   r   Nr	   r   r   r   r   r          r   r   c                       \ rS rSrSrg)PyrexWarning   r   Nr	   r   r   r   r   r      r   r   r   c                       \ rS rSrSrg)CannotSpecialize   r   Nr	   r   r   r   r   r      r   r   r   c                    U S   n[        U[        5      (       a
   SU-  5       e UR                  5       nSR                  U[	        SU S   S-
  5      U S    5      nSU< SU S   -  < S	3nS< SU< S< S3nU$ ! [
         a    S
n Nf = f)Nr   zOPlease replace filename strings with Scanning.FileSourceDescriptor instances %r r      z...
 r   z^
z[unprintable code]
z<------------------------------------------------------------
)
isinstanceany_string_type	get_linesjoinmaxUnicodeDecodeError)positionsourceFss       r   contextr/       s    a[F6?33 dY\bbd44
 GGAc!Xa[]+HQK89hqk!236*AH  #"#s   A< <B
Bc                 P    U (       a  SU S   R                  5       U S   U S   4-  $ g)Nz
%s:%d:%d: r   r   r   r!   )get_error_descriptionr+   s    r   format_positionr3   /   s6    x{@@B (Xa[: : 	:r   c                 l    U(       a,  [        U5      n[        U5      nSU< SU< U =(       d    S< 3n U $ )Nz
Error compiling Cython file:
r$   r!   )r3   r/   )messager+   pos_strconts       r   format_errorr8   5   s1    !(+x @Dgw}Z\}]Nr   c                   $    \ rS rSrSS jrS rSrg)CompileError<   Nc                     Xl         X l        [        X!5      U l        SU l        [
        R                  X R                  5        X4U l        g )NF)r+   message_onlyr8   formatted_messagereported	Exception__init__argsselfr+   r5   s      r   rA   CompileError.__init__>   sA     #!-g!@4!7!78 '	r   c                     U R                   $ N)r>   )rD   s    r   __str__CompileError.__str__H   s    %%%r   )rB   r>   r=   r+   r?   Nr!   )r
   r   r   r   rA   rH   r   r   r   r   r:   r:   <   s    (&r   r:   c                       \ rS rSrSS jrSrg)CompileWarningK   Nc                 T    Xl         [        R                  U [        U5      U-   5        g rG   )r+   r@   rA   r3   rC   s      r   rA   CompileWarning.__init__M   s!     4!:W!DEr   r2   rJ   r
   r   r   r   rA   r   r   r   r   rL   rL   K   s    Fr   rL   c                       \ rS rSrS rSrg)InternalErrorQ   c                 B    Xl         [        R                  U SU-  5        g )NzInternal compiler error: %sr=   r@   rA   rD   r5   s     r   rA   InternalError.__init__T   s#    #4!>" 	r   r=   NrP   r   r   r   rR   rR   Q   s    r   rR   c                       \ rS rSrS rSrg)
AbortErrorY   c                 B    Xl         [        R                  U SU-  5        g )NzAbort error: %srU   rV   s     r   rA   AbortError.__init__\   s    #4!2W!<=r   rX   NrP   r   r   r   rZ   rZ   Y   s    >r   rZ   c                       \ rS rSrSS jrSrg)CompilerCrash`   Nc                 T   U(       a  SU-   nOSnX0l         U(       a	  SU< U< 3nU(       a*  SS KnUSSR                  UR                  U5      5      -   -  nU(       a+  U(       d  US-  nX4R                  R
                  < SU< 3-  n[        R                  XU5        XX4U4U l        g )Nr$   zCompiler crash in r   z/

Compiler crash traceback from this point on:
r!   z: )	r=   	tracebackr(   	format_tb	__class__r
   r:   rA   rB   )rD   posr/   r5   cause
stacktracerb   s          r   rA   CompilerCrash.__init__b   s    WnGG#297CGD	++J789:G 4??#;#;UCCGd1 7:>	r   )rB   r=   rG   rP   r   r   r   r_   r_   `   s    ?r   r_   c                       \ rS rSrSrSrg)NoElementTreeInstalledExceptionx   z[raised when the user enabled options.gdb_debug but no ElementTree
implementation was found
r   N)r
   r   r   r   __doc__r   r   r   r   rj   rj   x   s    r   rj   c                     U b  [        U 5      [        l        OS [        l        U(       a  [        R                  [        l        OS [        l        S[        l        g Nr   )r   threadlocalcython_errors_listing_filesysstderrcython_errors_echo_filecython_errors_count)pathecho_to_stderrs     r   open_listing_filerw   }   s>     1>t1D.15..1jj+.2+&'K#r   c                      [         R                  (       a*  [         R                  R                  5         S [         l        g g rG   )ro   rp   closer   r   r   close_listing_filerz      s*    --..44615. .r   c           	         [         R                  nU(       a  U(       a  US   R                  U 5        g U R                  (       a  g SU l        SU -  n[         R                  nU(       a  UR                  U5        [         R                  nU(       a  UR                  U5        [         =R                  S
-  sl        [        R                  (       a  [        S5      eg ! [         a(    [        [        U SS5      [        U SS 5      5      S-   n Nf = f! [         a$    UR                  UR                  SS	5      5         Nf = f! [         a$    UR                  UR                  SS	5      5         Nf = f)NTz%s
r=   z[unprintable exception message]r+   r$   ASCIIreplacer   zfatal errors)ro   cython_errors_stackappendr?   UnicodeEncodeErrorr8   getattrrp   writeencoders   rt   r   	fast_failrZ   )err	use_stackerror_stacklinelisting_file	echo_files         r   report_errorr      s8   11KyBs# <<SLT
 #==##D)  77	& 	''1,'^,,  " 	G^=^ _ 'Z >@BFGD	G & D""4;;w	#BCD
 & AGY ?@As6   C )D E /DD+D?>D?+E0/E0c                     U c  [        U5      e[        X5      n[        R                  (       a  [	        U5      e[        U5        U$ rG   )rR   r:   r   debug_exception_on_errorr@   r   )r+   r5   r   s      r   errorr      s<    G$$
x
)C**)C.,@Jr   c                      U R                  U5        g ! [         a$    U R                  UR                  SS5      5         g f = f)Nasciir~   )r   r   r   )filer   s     r   _write_file_encoder      s9    4

4 4

4;;w	234s    +AAc                     UR                   S   (       d  g [        X5      nSU-  n[        R                  nU(       a  [	        XT5        [        R
                  nU(       a  [	        Xd5        U$ )Nshow_performance_hintszperformance hint: %s
)
directivesrL   ro   rp   r   rs   )r+   r5   envwarnr   r   r   s          r   performance_hintr      sW    >>23(,D#d*D99L<.33I9+Kr   c                     U[         :  a  g [        X5      nSU-  n[        R                  nU(       a  [	        XT5        [        R
                  nU(       a  [	        Xd5        U$ )Nz	note: %s
)LEVELrL   ro   rp   r   rs   r+   r5   levelr   r   r   r   s          r   r5   r5      sQ    u}(,D$D99L<.33I9+Kr   c                    U[         :  a  g [        R                  (       a  U (       a  [        X5      $ [	        X5      nSU-  n[
        R                  nU(       a  [        XT5        [
        R                  nU(       a  [        Xd5        U$ Nzwarning: %s
)	r   r   warning_errorsr   rL   ro   rp   r   rs   r   s          r   warningr      sg    u}(X''(,DT!D99L<.33I9+Kr   c                    U[         :  a  g [        R                  nX;   a  g [        X5      nSU-  n[        R                  nU(       a  [        Xe5        [        R                  nU(       a  [        Xu5        UR                  U5        U$ r   )r   ro   cython_errors_warn_once_seenrL   rp   r   rs   add)r+   r5   r   warn_once_seenr   r   r   r   s           r   	warn_oncer      ss    u} ==N (,DT!D99L<.33I9+wKr   c                  H    / n [         R                  R                  U 5        U $ rG   )ro   r   r   )errorss    r   hold_errorsr      s     F##**62Mr   c                 x    [         R                  R                  5       nU (       d  U H  n[        U5        M     g g rG   )ro   r   popr   )ignoreheld_errorsr   s      r   release_errorsr     s0    11557KC  r   c                  (    [         R                  S   $ )Nr|   )ro   r   r   r   r   r   r   
  s    **2..r   c              #   X   #    [        5       n Uv   [        U S9  g ! [        U S9  f = f7f)N)r   )r   r   )r   r   s     r   local_errorsr     s&     ]F&f%f%s   * 
*'*c                      S[         l        S [         l        S [         l        [	        5       [         l        / [         l        g rn   )ro   rt   rp   rs   setr   r   r   r   r   init_threadr     s,    &'K#-1K**.K'/2uK,&(K#r   c                  f    [         R                  R                  5         [         R                  S S 2	 g rG   )ro   r   clearr   r   r   r   resetr   "  s"    ,,224''*r   c                  "    [         R                  $ rG   )ro   rt   r   r   r   get_errors_countr   &  s    ***r   )T)r   )r   )F).bytesstrr&   rq   
contextlibr   	threadingr   r   ImportErrorro   Utilsr   r!   r   r   r@   r   r   r   r/   r3   r8   r:   rL   rR   rZ   r_   rj   rw   rz   r   r   r   r   r   r5   r   r   r   r   r   r   r   r   r   r   r   r   <module>r      s+  
 #, 
 %/ n !  	 		9 		z 	&: &F\ FI > >?L ?0j 
(6
-6 	
4 (/ & &)++u  s   C! !C43C4