
    -eQ                        d Z ddlmZ ddlZ ej        e          ZddlZddlZddl	Z	dZ
 G d de          Z G d de          ZdddZddZdS )z Provide Bokeh-specific warning subclasses.

The primary use of these subclasses to to force them to be unconditionally
displayed to users by default.

    )annotationsN)BokehDeprecationWarningBokehUserWarningfind_stack_levelwarnc                      e Zd ZdZdS )r   z A Bokeh-specific ``DeprecationWarning`` subclass.

    Used to selectively filter Bokeh deprecations for unconditional display.

    N__name__
__module____qualname____doc__     3lib/python3.11/site-packages/bokeh/util/warnings.pyr   r   .              r   r   c                      e Zd ZdZdS )r   z{ A Bokeh-specific ``UserWarning`` subclass.

    Used to selectively filter Bokeh warnings for unconditional display.

    Nr	   r   r   r   r   r   5   r   r   r   messagestrcategorytype[Warning] | None
stacklevel
int | NonereturnNonec                T    |t                      }t          j        | ||           d S )N)r   )r   warningsr   )r   r   r   s      r   r   r   <   s0    %''
M'8
;;;;;;r   intc                     ddl } t          j                            | j                  }t          j                    }d}|r9t          j        |          }|                    |          r|j	        }|dz  }nn|9|S )z{Find the first place in the stack that is not inside Bokeh.

    Inspired by: pandas.util._exceptions.find_stack_level
    r   N   )
bokehospathdirname__file__inspectcurrentframegetfile
startswithf_back)r    pkg_dirframenfnames        r   r   r   B   s     LLLgooen--G  ""E	A
 &&G$$ 	LEFAA   Hr   )NN)r   r   r   r   r   r   r   r   )r   r   )r   
__future__r   logging	getLoggerr
   logr%   r!   r   __all__DeprecationWarningr   UserWarningr   r   r   r   r   r   <module>r5      s     # " " " " " g!!  				     0       {   < < < < <     r   