
    Ǆge              
       	   d Z ddlZddlZddlZddlZddlZddlZddlZ	ddl
mZ ddlmZ ddlmZ g Zd Z G d de      Z G d	 d
e      Z G d dee      Z G d dee      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d d ej@                  !      Z! G d" d#e!      Z"da#	 ddl$Z$ e%e$d$d%      Z& e'e&jQ                  d&      D  cg c]
  }  e)|        c}       d'k  rd(Z* ejV                  e*       e,ejZ                  j]                  d)d      re,	 dd*l$m/Z/m0Z0m1Z1m2Z2m3Z3  G d+ d,e4      Z5 G d- d.e4      Z6i Z7ddddddd/e7d0<   e2jp                  e2jr                  e2jt                  e2jv                  e2jx                  e3jz                  d/e7d1<   e2jp                  e2j|                  e2j~                  e2j|                  e2jx                  e3jz                  d/e7d2<   e2jt                  e2jr                  e2j~                  e2j                  e2jx                  e3jz                  d/e7d3<   e2j|                  e2j|                  e2jv                  e2j                  e2jx                  e3jz                  d/e7d4<   e7d0   ZA G d5 d6e"      ZBd7 ZCd;ZEd<ZFd=ZGd>ZHd?eFz  ZId@ZJdAej                  dBeFdCZL eM       ZNeGeNdD<   eJeNdE<   eLeNdF<   eHeNdG<   eIeNdH<   dI ZO G dJ dKe4      ZP G dL dMeQ      ZR G dN dOeR      ZS G dP dQeS      ZT G dR dSeR      ZU G dT dUeU      ZV G dV dWeU      ZW G dX dYeU      ZX G dZ d[eR      ZY G d\ d]eR      ZZ G d^ d_eR      Z[ G d` daeZ      Z\ G db dceR      Z] G dd dee]      Z^ G df dgeR      Z_ G dh dieR      Z` G dj dkeR      Za G dl dmeR      Zb G dn doeb      Zc G dp dqeb      Zd G dr dse]      Ze G dt dueR      Zf G dv dwe]      Zg G dx dye]      Zh G dz d{e]      Zi G d| d}e]      Zj G d~ de]      Zk G d de]      Zl G d de]      Zm G d de]      Zn G d deR      Zod Zpej                  j                  es      Zti Zuej                  d        Zwe ex       j                         D cg c],  \  }}|j                  d      s e{|e|      r e}|eQef      r|. c}}z  Zyc c} w # e,$ r  G d8 d9e"      ZDd: ZCY 8w xY wc c}}w )z%
Numba-specific errors and warnings.
    N)defaultdictwraps)abstractmethodc                  X    	 t         j                  j                   y# t        $ r Y yw xY w)zV
    To detect if numba.core.config has been initialized due to circular imports.
    TF)numbacoreconfigAttributeError     Y/home/mcse/projects/flask_80/flask-venv/lib/python3.12/site-packages/numba/core/errors.py_is_numba_core_config_loadedr      s-    

   s    	))c                   $     e Zd ZdZd fd	Z xZS )NumbaWarningz8
    Base category for all Numba compiler warnings.
    c                     || _         || _        |rt               rt               j                  }nd }|r.t
        t        |    ||d|j                         d             y t
        t        |    ||             y )Nc                     | S Nr   xs    r   	highlightz(NumbaWarning.__init__.<locals>.highlight/       r   
)	msglocr   	termcolorerrmsgsuperr   __init__	strformat)selfr   r   highlightingr   	__class__s        r   r   zNumbaWarning.__init__&   sj     8:!**I,.S]]_=>@ ,.y/GHr   NT__name__
__module____qualname____doc__r   __classcell__r#   s   @r   r   r   !   s    I Ir   r   c                       e Zd ZdZy)NumbaPerformanceWarningzV
    Warning category for when an operation might not be
    as fast as expected.
    Nr&   r'   r(   r)   r   r   r   r-   r-   8       r   r-   c                       e Zd ZdZy)NumbaDeprecationWarningz;
    Warning category for use of a deprecated feature.
    Nr.   r   r   r   r1   r1   ?       r   r1   c                       e Zd ZdZy)NumbaPendingDeprecationWarningzL
    Warning category for use of a feature that is pending deprecation.
    Nr.   r   r   r   r4   r4   E   r2   r   r4   c                       e Zd ZdZy)NumbaParallelSafetyWarningzc
    Warning category for when an operation in a prange
    might not have parallel semantics.
    Nr.   r   r   r   r6   r6   K   r/   r   r6   c                       e Zd ZdZy)NumbaTypeSafetyWarningz9
    Warning category for unsafe casting operations.
    Nr.   r   r   r   r8   r8   R   r2   r   r8   c                       e Zd ZdZy)NumbaExperimentalFeatureWarningz=
    Warning category for using an experimental feature.
    Nr.   r   r   r   r:   r:   X   r2   r   r:   c                       e Zd ZdZy)NumbaInvalidConfigWarningz>
    Warning category for using an invalid configuration.
    Nr.   r   r   r   r<   r<   ^   r2   r   r<   c                   "     e Zd ZdZ fdZ xZS )NumbaPedanticWarningz;
    Warning category for reporting pedantic messages.
    c                 6    t         |   | dt                y )Nr   )r   r   pedantic_warning_info)r!   r   kwargsr#   s      r   r   zNumbaPedanticWarning.__init__h   s    C5#8"9:;r   r%   r+   s   @r   r>   r>   d   s    < <r   r>   c                       e Zd ZdZy)NumbaIRAssumptionWarningzD
    Warning category for reporting an IR assumption violation.
    Nr.   r   r   r   rC   rC   l   r2   r   rC   c                       e Zd ZdZy)NumbaDebugInfoWarningzO
    Warning category for an issue with the emission of debug information.
    Nr.   r   r   r   rE   rE   r   r2   r   rE   c                       e Zd ZdZy)NumbaSystemWarningzF
    Warning category for an issue with the system configuration.
    Nr.   r   r   r   rG   rG   x   r2   r   rG   c                   l    e Zd Zed        Zed        Zed        Zed        Zed        Zed        Z	y)_ColorSchemec                      y r   r   r!   r   s     r   codez_ColorScheme.code       r   c                      y r   r   rK   s     r   r   z_ColorScheme.errmsg   rM   r   c                      y r   r   rK   s     r   filenamez_ColorScheme.filename   rM   r   c                      y r   r   rK   s     r   indicatez_ColorScheme.indicate   rM   r   c                      y r   r   rK   s     r   r   z_ColorScheme.highlight   rM   r   c                      y r   r   rK   s     r   resetz_ColorScheme.reset   rM   r   N)
r&   r'   r(   r   rL   r   rP   rR   r   rU   r   r   r   rI   rI      sx               r   rI   )	metaclassc                   8    e Zd Zd	dZd Zd Zd Zd Zd Zd Z	y)
_DummyColorSchemeNc                      y r   r   r!   themes     r   r   z_DummyColorScheme.__init__       r   c                      y r   r   rK   s     r   rL   z_DummyColorScheme.code   r\   r   c                      y r   r   rK   s     r   r   z_DummyColorScheme.errmsg   r\   r   c                      y r   r   rK   s     r   rP   z_DummyColorScheme.filename   r\   r   c                      y r   r   rK   s     r   rR   z_DummyColorScheme.indicate   r\   r   c                      y r   r   rK   s     r   r   z_DummyColorScheme.highlight   r\   r   c                      y r   r   rK   s     r   rU   z_DummyColorScheme.reset   r\   r   r   
r&   r'   r(   r   rL   r   rP   rR   r   rU   r   r   r   rX   rX      s%    r   rX   __version__z0.0.0.)r      	   zNInsufficiently recent colorama version found. Numba requires colorama >= 0.3.9(NUMBA_DISABLE_ERROR_MESSAGE_HIGHLIGHTING)initreinitdeinitForeStylec                   "    e Zd ZdZd Zd Zd Zy)
ColorShellFc                 &    t                d| _        y r$   )ri   _has_initializedr!   s    r   r   zColorShell.__init__   s    F$(D!r   c                 2    | j                   rt                y y r   )rq   rj   rr   s    r   	__enter__zColorShell.__enter__   s    $$ %r   c                 8    t         j                   t                y r   )rm   	RESET_ALLrk   r!   
exc_details     r   __exit__zColorShell.__exit__   s    OOHr   N)r&   r'   r(   rq   r   rt   ry   r   r   r   ro   ro      s     	)		r   ro   c                       e Zd Zd Zd Zd Zy)reset_terminalc                 $    t        d      | _        y )Nr   )	bytearray_bufrr   s    r   r   zreset_terminal.__init__   s    !#DIr   c                     | j                   S r   )r~   rr   s    r   rt   zreset_terminal.__enter__  s    99r   c                 z    | xj                   t        t        j                  j	                  d            z  c_         y )Nutf-8)r~   r}   rm   rv   encoderw   s     r   ry   zreset_terminal.__exit__  s$    II5??#9#9'#BCCIr   N)r&   r'   r(   r   rt   ry   r   r   r   r{   r{      s    	'		Dr   r{   )rL   r   rP   rR   r   rU   no_colordark_bglight_bgblue_bg
jupyter_nbc                   Z    e Zd ZefdZdej                  fdZd Zd Z	d Z
d Zd Zd	 Zy)
HighlightColorSchemec                     |d   | _         |d   | _        |d   | _        |d   | _        |d   | _        |d   | _        t        j                  | |       y )NrL   r   rP   rR   r   rU   r[   )_code_errmsg	_filename	_indicate
_highlight_resetrX   r   rZ   s     r   r   zHighlightColorScheme.__init__7  sZ    vDJ ?DL":.DN":.DN#K0DO.DK&&t5&9r   Nc                    d}|r||z  }|r||z  }t               5  t               5 }||j                  d      z  }||j                  d      z  }d d d        j                  d      cd d d        S # 1 sw Y   #xY w# 1 sw Y   y xY w)N r   )ro   r{   r   decode)r!   r   colorstylefeaturesmus         r   _markupzHighlightColorScheme._markup@  s    HE!E! *#% 0(//'22B3,,w//B0 yy)	* *0 0* *s"   A=)A1A=1A:	6A==Bc                 :    | j                  || j                        S r   )r   r   rK   s     r   rL   zHighlightColorScheme.codeL  s    <<TZZ00r   c                 :    | j                  || j                        S r   )r   r   rK   s     r   r   zHighlightColorScheme.errmsgO  s    <<T\\22r   c                 :    | j                  || j                        S r   )r   r   rK   s     r   rP   zHighlightColorScheme.filenameR      <<T^^44r   c                 :    | j                  || j                        S r   )r   r   rK   s     r   rR   zHighlightColorScheme.indicateU  r   r   c                 :    | j                  || j                        S r   )r   r   rK   s     r   r   zHighlightColorScheme.highlightX  s    <<T__55r   c                 :    | j                  || j                        S r   )r   r   rK   s     r   rU   zHighlightColorScheme.reset[  s    <<T[[11r   )r&   r'   r(   default_themer   rm   BRIGHTr   rL   r   rP   rR   r   rU   r   r   r   r   r   6  s8    !. 	: &* 
	*	1	3	5	5	6	2r   r   c                      t         6t        t        j                  j                  j
                     } t        |       a t         S r   )_termcolor_instthemesr   r	   r
   COLOR_SCHEMEr   )schemes    r   r   r   ^  s2    "EJJ--::;F26:Or   c                   8    e Zd Zd	dZd Zd Zd Zd Zd Zd Z	y)
NOPColorSchemeNc                 L    |t        d      t        j                  | |       y )Nz specifying a theme has no effectr   )
ValueErrorrX   r   rZ   s     r   r   zNOPColorScheme.__init__   s'      !CDD&&t5&9r   c                     |S r   r   rK   s     r   rL   zNOPColorScheme.code       Jr   c                     |S r   r   rK   s     r   r   zNOPColorScheme.errmsg   r   r   c                     |S r   r   rK   s     r   rP   zNOPColorScheme.filename   r   r   c                     |S r   r   rK   s     r   rR   zNOPColorScheme.indicate   r   r   c                     |S r   r   rK   s     r   r   zNOPColorScheme.highlight   r   r   c                     |S r   r   rK   s     r   rU   zNOPColorScheme.reset   r   r   r   rc   r   r   r   r   r      s%    	:
						r   r   c                  .    t         
t               a t         S r   )r   r   r   r   r   r   r      s    ",.Or   z
This warning came from an internal pedantic check. Please report the warning
message and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new?template=bug_report.md
aD  
Please report the error message and traceback, along with a minimal reproducer
at: https://github.com/numba/numba/issues/new?template=bug_report.md

If more help is needed please feel free to speak to the Numba core developers
directly at: https://gitter.im/numba/numba

Thanks in advance for your help in improving Numba!
z
Unsupported functionality was found in the code Numba was trying to compile.

If this functionality is important to you please file a feature request at:
https://github.com/numba/numba/issues/new?template=feature_request.md
a  
Unsupported Python functionality was found in the code Numba was trying to
compile. This error could be due to invalid code, does the code work
without Numba? (To temporarily disable Numba JIT, set the `NUMBA_DISABLE_JIT`
environment variable to non-zero, and then rerun the code).

If the code is valid and the unsupported functionality is important to you
please file a feature request at:
https://github.com/numba/numba/issues/new?template=feature_request.md

To see Python/NumPy features supported by the latest release of Numba visit:
https://numba.readthedocs.io/en/stable/reference/pysupported.html
and
https://numba.readthedocs.io/en/stable/reference/numpysupported.html
a  
Numba could not make a constant out of something that it decided should be
a constant. This could well be a current limitation in Numba's internals,
however please first check that your code is valid for compilation,
particularly with respect to string interpolation (not supported!) and
the requirement of compile time constants as arguments to exceptions:
https://numba.readthedocs.io/en/stable/reference/pysupported.html?highlight=exceptions#constructs

If the code is valid and the unsupported functionality is important to you
please file a feature request at:
https://github.com/numba/numba/issues/new?template=feature_request.md

If you think your code should work with Numba. %s
a  
This is not usually a problem with Numba itself but instead often caused by
the use of unsupported features or an issue in resolving types.

To see Python/NumPy features supported by the latest release of Numba visit:
https://numba.readthedocs.io/en/stable/reference/pysupported.html
and
https://numba.readthedocs.io/en/stable/reference/numpysupported.html

For more information about typing errors and how to debug them visit:
https://numba.readthedocs.io/en/stable/user/troubleshoot.html#my-code-doesn-t-compile

If you think your code should work with Numba, please report the error message
and traceback, along with a minimal reproducer at:
https://github.com/numba/numba/issues/new?template=bug_report.md
z
-------------------------------------------------------------------------------
This should not have happened, a problem has occurred in Numba's internals.
You are currently using Numba version z.
r   unsupported_errortyping
reportableinterpreterconstant_inferencec                 N    t        | t              r| ndfd}s ||       S |S )zDefine a deprecation decorator.
    An optional string should refer to the new API to be used instead.

    Example:
      @deprecated
      def old_func(): ...

      @deprecated('new_func')
      def old_func(): ...Nc                 4      fd} t               |      S )Nc                      d}r|dz  }t        j                  |j                  j                        t        d        | i |S )Nz!Call to deprecated function "{}".z
 Use "{}" instead.   )category
stacklevel)warningswarnformatr&   DeprecationWarning)argsrA   r   funcsubsts      r   wrapperz.deprecated.<locals>.decorator.<locals>.wrapper  sI    7C//MM#**T]]E:#5!E(((r   r   )r   r   r   s   ` r   	decoratorzdeprecated.<locals>.decorator  s    	) uT{7##r   )
isinstancestr)argr   r   s     @r   
deprecatedr     s/     c3'CTE	$ ~r   c                   N    e Zd ZdZd Zej                  dd       Zd Zd Z	d Z
y)	WarningsFixeraB  
    An object "fixing" warnings of a given category caught during
    certain phases.  The warnings can have their filename and lineno fixed,
    and they are deduplicated as well.

    When used as a context manager, any warnings caught by `.catch_warnings()`
    will be flushed at the exit of the context manager.
    c                 :    || _         t        t              | _        y r   )	_categoryr   set	_warnings)r!   r   s     r   r   zWarningsFixer.__init__  s    !$S)r   Nc              #   &  K   t        j                  d      5 }t        j                  d| j                         d ddd       D ]  }t	        |j
                        }t        |j                  | j                        rL|xs |j                  }|xs |j                  }| j                  |||j                  f   j                  |       t        j                  ||j                  |j                  |j                          y# 1 sw Y   xY ww)zN
        Store warnings and optionally fix their filename and lineno.
        T)recordalwaysN)r   catch_warningssimplefilterr   r   message
issubclassr   rP   linenor   addwarn_explicit)r!   rP   r   wlistwr   s         r   r   zWarningsFixer.catch_warnings  s     
 $$D1 	U!!(DNN;	  
	=Aaii.C!**dnn5#1qzz+188x;<@@E &&sAJJ'(zz188=
	=		 	s   D%DCDD
Dc                     d }t        | j                  j                         |      D ]1  \  \  }}}}t        |      D ]  }t        j                  ||||        3 | j                  j                          y)z+
        Emit all stored warnings.
        c                 B    t        |       t        t        |             z   S r   )r   id)r   s    r   keyz WarningsFixer.flush.<locals>.key  s    
 s8c"S'l**r   )r   N)sortedr   itemsr   r   clear)r!   r   rP   r   r   messagesr   s          r   flushzWarningsFixer.flush  sy    	+ 7=$$&C71 	H2(Xvx(h' H&&sHhGH	H 	r   c                      y r   r   rr   s    r   rt   zWarningsFixer.__enter__  s    r   c                 $    | j                          y r   )r   )r!   exc_type	exc_value	tracebacks       r   ry   zWarningsFixer.__exit__  s    

r   NN)r&   r'   r(   r)   r   
contextlibcontextmanagerr   r   rt   ry   r   r   r   r   r     s5    *
 = =("r   r   c                   <     e Zd Zd fd	Zed        Zd Zd Z xZS )
NumbaErrorc                     || _         || _        |rt               j                  }nd }|r|d|j	                         d}n|}t
        t        |    ||             y )Nc                     | S r   r   r   s    r   r   z&NumbaError.__init__.<locals>.highlight  r   r   r   )r   r   r   r   r    r   r   r   )r!   r   r   r"   r   new_msgr#   s         r   r   zNumbaError.__init__  sT    !**I $'9G!Gj$(7);<r   c                 P    	 | j                   S # t        $ r g x| _         }|cY S w xY wr   )	_contextsr   )r!   lsts     r   contextszNumbaError.contexts'  s1    	>>! 	#%%DNSJ	s    %%c                     | j                   j                  |       t               j                  d      t               j	                  d      z   }|j                  | |      }|f| _        | S )zv
        Add contextual info.  The exception message is expanded with the new
        contextual information.
        z{0}
zDuring: {1})r   appendr   r   rP   r   r   )r!   r   fnewmsgs       r   add_contextzNumbaError.add_context/  sX    
 	S!Kw')+*>*>}*MM$$I	r   c                 4    |f| j                   dd z   | _         y)zD
        Change the error message to the given new message.
           N)r   )r!   new_messages     r   patch_messagezNumbaError.patch_message:  s     !NTYYqr]2	r   r$   )	r&   r'   r(   r   propertyr   r   r   r*   r+   s   @r   r   r     s&    =  	3r   r   c                       e Zd ZdZy)UnsupportedErrorzG
    Numba does not have an implementation for this functionality.
    Nr.   r   r   r   r  r  A       	r   r  c                       e Zd ZdZy)UnsupportedRewriteErrorz)UnsupportedError from rewrite passes
    Nr.   r   r   r   r  r  H  
    r   r  c                       e Zd ZdZy)IRErrorz7
    An error occurred during Numba IR generation.
    Nr.   r   r   r   r	  r	  N  r  r   r	  c                       e Zd ZdZy)RedefinedErrorzU
    An error occurred during interpretation of IR due to variable redefinition.
    Nr.   r   r   r   r  r  U  r  r   r  c                   $     e Zd ZdZd fd	Z xZS )NotDefinedErrorzK
    An undefined variable is encountered during interpretation of IR.
    c                 H    || _         d|z  }t        t        |   ||       y )NzJThe compiler failed to analyze the bytecode. Variable '%s' is not defined.r   )namer   r  r   )r!   r  r   r   r#   s       r   r   zNotDefinedError.__init__a  s-    	/156ot-cs-;r   r   r%   r+   s   @r   r  r  \  s    < <r   r  c                       e Zd ZdZy)VerificationErrora6  
    An error occurred during IR verification. Once Numba's internal
    representation (IR) is constructed it is then verified to ensure that
    terminators are both present and in the correct places within the IR. If
    it is the case that this condition is not met, a VerificationError is
    raised.
    Nr.   r   r   r   r  r  h  s     	r   r  c                       e Zd ZdZy)DeprecationErrorz&
    Functionality is deprecated.
    Nr.   r   r   r   r  r  s  r  r   r  c                   $     e Zd ZdZd fd	Z xZS )LoweringErrorz,
    An error occurred during lowering.
    c                 0    t         t        |   ||       y Nr  )r   r  r   r!   r   r   r#   s      r   r   zLoweringError.__init__  s    mT+CS+9r   r   r%   r+   s   @r   r  r  z  s    : :r   r  c                       e Zd ZdZy)UnsupportedParforsErrorzM
    An error occurred because parfors is not supported on the platform.
    Nr.   r   r   r   r  r    r  r   r  c                       e Zd ZdZy)ForbiddenConstructzN
    A forbidden Python construct was encountered (e.g. use of locals()).
    Nr.   r   r   r   r  r    r  r   r  c                       e Zd ZdZy)TypingErrorz#
    A type inference failure.
    Nr.   r   r   r   r  r    r  r   r  c                         e Zd Zd fd	Z xZS )UntypedAttributeErrorc                     t        |dd       }||t        k(  rd|z  }nd}|j                  ||      }t        t        |   ||       y )NpymodzPUse of unsupported NumPy function 'numpy.%s' or unsupported use of the function.z)Unknown attribute '{attr}' of type {type})typeattrr  )getattrnpr   r   r!  r   )r!   valuer%  r   moduler   r#   s         r   r   zUntypedAttributeError.__init__  s[    .&B,9<@AC >C**%d*3C#T3CS3Ar   r   )r&   r'   r(   r   r*   r+   s   @r   r!  r!    s    	B 	Br   r!  c                   $     e Zd ZdZd fd	Z xZS )ByteCodeSupportErrorzA
    Failure to extract the bytecode of the user's function.
    c                 0    t         t        |   ||       y r  )r   r+  r   r  s      r   r   zByteCodeSupportError.__init__  s    "D23C2@r   r   r%   r+   s   @r   r+  r+    s    A Ar   r+  c                       e Zd ZdZy)CompilerErrorz0
    Some high-level error in the compiler.
    Nr.   r   r   r   r.  r.    r  r   r.  c                   $     e Zd ZdZd fd	Z xZS )ConstantInferenceErrorz,
    Failure during constant inference.
    c                 0    t         t        |   ||       y r  )r   r0  r   )r!   r(  r   r#   s      r   r   zConstantInferenceError.__init__  s    $d4U4Dr   r   r%   r+   s   @r   r0  r0    s    E Er   r0  c                   "     e Zd ZdZ fdZ xZS )InternalErrorzB
    For wrapping internal error occurred within the compiler
    c                 L    t         t        |   t        |             || _        y r   )r   r3  r   r   old_exception)r!   	exceptionr#   s     r   r   zInternalError.__init__  s    mT+C	N;&r   r%   r+   s   @r   r3  r3    s    ' 'r   r3  c                   "     e Zd ZdZ fdZ xZS )InternalTargetMismatchErrorzXFor signalling a target mismatch error occurred internally within the
    compiler.
    c                 V    |j                          d| d| d}t        | 	  |       y )NzL being resolved on a target from which it does not inherit. Local target is z, declared target class is re   )titler   r   )r!   kind	target_hwhw_clazzr   r#   s        r   r   z$InternalTargetMismatchError.__init__  s:    **,  //8k :""*1. 	r   r%   r+   s   @r   r8  r8    s     r   r8  c                       e Zd ZdZy)NonexistentTargetErrorzDFor signalling that a target that does not exist was requested.
    Nr.   r   r   r   r?  r?    r  r   r?  c                       e Zd ZdZy)RequireLiteralValuezj
    For signalling that a function's typing requires a constant value for
    some of its arguments.
    Nr.   r   r   r   rA  rA    s     	r   rA  c                   6     e Zd ZdZd fd	Zd Zd Zd Z xZS )ForceLiteralArgzA Pseudo-exception to signal the dispatcher to type an argument literally

    Attributes
    ----------
    requested_args : frozenset[int]
        requested positions of the arguments.
    c                 ^    t         t        |   d|       t        |      | _        || _        y)a<  
        Parameters
        ----------
        arg_indices : Sequence[int]
            requested positions of the arguments.
        fold_arguments: callable
            A function ``(tuple, dict) -> tuple`` that binds and flattens
            the ``args`` and ``kwargs``.
        loc : numba.ir.Loc or None
        z=Pseudo-exception to force literal arguments in the dispatcherr  N)r   rC  r   	frozensetrequested_argsfold_arguments)r!   arg_indicesrG  r   r#   s       r   r   zForceLiteralArg.__init__  s6     	ot-K 	. 	
 (4,r   c                 d    ddl m} t        | j                  || j                        } |||       S )z)Bind the fold_arguments function
        r   )chain_exceptionr  )numba.core.utilsrJ  rC  rF  r   )r!   rG  rJ  es       r   bind_fold_argumentsz#ForceLiteralArg.bind_fold_arguments  s/     	5D// $*q$''r   c                     t        |t              s*d}t        |j                  t        t	        |                  t        | j
                  |j
                  z        S )z=Returns a new instance by or'ing the requested_args.
        z)*other* must be a {} but got a {} instead)r   rC  	TypeErrorr   r$  rF  )r!   otherms      r   combinezForceLiteralArg.combine  sI     %1;AAHH_d5kBCCt22U5I5IIJJr   c                 $    | j                  |      S )z$Same as self.combine(other)
        )rR  )r!   rP  s     r   __or__zForceLiteralArg.__or__  s     ||E""r   r   )	r&   r'   r(   r)   r   rM  rR  rT  r*   r+   s   @r   rC  rC    s    -$(K#r   rC  c                       e Zd ZdZy)LiteralTypingErrorz*
    Failure in typing a Literal type
    Nr.   r   r   r   rV  rV    r  r   rV  c                       e Zd Zy)NumbaValueErrorNr&   r'   r(   r   r   r   rX  rX         r   rX  c                       e Zd Zy)NumbaTypeErrorNrY  r   r   r   r\  r\  $  rZ  r   r\  c                       e Zd Zy)NumbaAttributeErrorNrY  r   r   r   r^  r^  (  rZ  r   r^  c                       e Zd Zy)NumbaAssertionErrorNrY  r   r   r   r`  r`  ,  rZ  r   r`  c                       e Zd Zy)NumbaNotImplementedErrorNrY  r   r   r   rb  rb  0  rZ  r   rb  c                       e Zd Zy)NumbaKeyErrorNrY  r   r   r   rd  rd  4  rZ  r   rd  c                       e Zd Zy)NumbaIndexErrorNrY  r   r   r   rf  rf  8  rZ  r   rf  c                       e Zd Zy)NumbaRuntimeErrorNrY  r   r   r   rh  rh  <  rZ  r   rh  c                 &     | j                   |i |S r   )r   )fmtr   rA   s      r   _format_msgrk  @  s    3::t&v&&r   c              /     K   ddl m}m} |j                  dt              }|j                  dd      }|4|j                  j                  t              st        j                  |       	 d y# t        $ r"}|j                  t        | ||              d}~wt        $ r  t        $ r} |       rq ||      j                  t        | ||            }t         j"                  j$                  j&                  rt)        j*                         d   }	nd}	|j-                  |	       |       r|dt         j"                  j$                  j.                   d}
J |
       d}~ww xY ww)	a!  
    A contextmanager that prepend contextual information to any exception
    raised within.  If the exception type is not an instance of NumbaError,
    it will be wrapped into a InternalError.   The exception class can be
    changed by providing a "errcls_" keyword argument with the exception
    constructor.

    The first argument is a message that describes the context.  It can be a
    format string.  If there are additional arguments, it will be used as
    ``fmt_.format(*args, **kwargs)`` to produce the final message string.
    r   )use_old_style_errorsuse_new_style_errorserrcls_r   Nr   z Unknown CAPTURED_ERRORS style: 'z'.)rK  rm  rn  popr3  getrP   
startswith_numba_pathloc_infoupdater   r   rk  AssertionError	Exceptionr   r	   r
   FULL_TRACEBACKSsysexc_infowith_tracebackCAPTURED_ERRORS)fmt_r   rA   rm  rn  errclsr   rL  newerrtbr   s              r   new_error_contextr  H  s&    
 ZZ	=1F
**UD
!C
s||66{C 	k$f56  !AY**;tT6+JKFzz  00\\^A&''++!#Gzz((889=CcM1s7   A'E"*A/ .E"/	E8BE*B0EEE"_)~r)   abcr   osry  r   numba.core.configr   numpyr'  collectionsr   	functoolsr   r   __all__r   Warningr   r-   r   r1   PendingDeprecationWarningr4   r6   r8   r:   r<   r>   rC   rE   rG   ABCMetarI   rX   r   coloramar&  colorama_versiontuplesplitintr   r   ImportErrorenvironrq  ri   rj   rk   rl   rm   objectro   r{   r   BLUEYELLOWWHITEGREENREDrv   BLACKMAGENTACYANr   r   r   r   r@   feedback_detailsunsupported_error_infointerpreter_error_infoconstant_inference_infotyping_error_inford   reportable_issue_infodicterror_extrasr   r   rw  r   r  r  r	  r  r  r  r  r  r  r  r  r!  r+  r.  r0  r3  r8  r?  rA  rC  rV  rX  r\  r^  r`  rb  rd  rf  rh  rk  pathdirname__file__rs  rt  r   r  globalsr   rr  r   r$  r   )r   r  r(  s   000r   <module>r     s  
   	 
    #   	I7 I.l l,> \3L  \ l  << <3 L  S[[ 6 2 m
 x@.44S9:c!f:;iG2 	c
 
zz~~@$G HJ ;:V D D F #'$(&*&*'+#'+F: "&#';;%)ZZ%)ZZ&*hh"'//5F9 #'))$(JJ&*ll&*jj'+xx#(??6F: "&#';;%)\\%)YY&*hh"'//5F9 %)JJ&*jj(,

(,		)-%*__8F< :&M&20 &2P        , *,  v$:  !*X 2\ 4] %<! "<9F 9x(3 (3V	z 		. 		j 		W 		<g 	<	 		z 	:J :	j 		 		* 	
BK 
BA: A	J 	EZ E'J '- 	] 		+ 	/#j /#d	 		k 		[ 		+ 		+ 		{ 		K 		k 		
 	' ggooh' - -` gioo&7 9]dE??3'Jud,C59g"67  9 9w ;  * 05Z9s*    #S S>S 1S2S S/.S/