
    FeC                    h    d Z ddlmZ ddlZ G d de      Z G d de      ZeZ	 	 	 	 	 	 	 	 	 	 d	dZ	y)
z)Sphinx deprecation classes and utilities.    )annotationsNc                      e Zd Zy)RemovedInSphinx80WarningN__name__
__module____qualname__     4/usr/lib/python3/dist-packages/sphinx/deprecation.pyr   r          r   r   c                      e Zd Zy)RemovedInSphinx90WarningNr   r
   r   r   r   r      r   r   r   c                   |dk(  rt         }n|dk(  rt        }nd|d}t        |      |  d| }|r
d|d|d}n|d	}t        j                  |d
z   |d       y)a  Helper function for module-level deprecations using __getattr__

    Exemplar usage:

    .. code:: python

       # deprecated name -> (object to return, canonical path or empty string)
       _DEPRECATED_OBJECTS = {
           'deprecated_name': (object_to_return, 'fully_qualified_replacement_name', (8, 0)),
       }


       def __getattr__(name):
           if name not in _DEPRECATED_OBJECTS:
               msg = f'module {__name__!r} has no attribute {name!r}'
               raise AttributeError(msg)

           from sphinx.deprecation import _deprecation_warning

           deprecated_object, canonical_name, remove = _DEPRECATED_OBJECTS[name]
           _deprecation_warning(__name__, name, canonical_name, remove=remove)
           return deprecated_object
    )   r   )	   r   zremoval version z is invalid!.z
The alias z is deprecated, use z	 instead.z is deprecated.z, Check CHANGES for Sphinx API modifications.   )
stacklevelN)r   r   RuntimeErrorwarningswarn)module	attributecanonical_nameremovewarning_classmsgqualified_namemessages           r   _deprecation_warningr!      s    > '?	6	0 
,73xq,N1 2(+96 $&o6MM'JJA/r   )
r   strr   r"   r   r"   r   ztuple[int, int]returnNone)
__doc__
__future__r   r   DeprecationWarningr   PendingDeprecationWarningr   RemovedInNextVersionWarningr!   r
   r   r   <module>r*      sc    / " 	1 		8 	 7 ////// //
 // 
//r   