
    MhZ	              
       |    d Z ddlZddlZddlmZmZ dededefdZdedededeegef         fd	Zd
ededefdZ	dS )a  Helper functions for deprecation.

This interface is itself unstable and may change without warning. Do
not use these functions yourself, even as a joke. The underscores are
there for a reason. No support will be given.

In particular, most of this will go away without warning once
Beautiful Soup drops support for Python 3.11, since Python 3.12
defines a `@typing.deprecated()
decorator. <https://peps.python.org/pep-0702/>`_
    N)AnyCallableold_namenew_nameversionc                      t           dt          f fd            }|j        dt          ddf fd            }|S )zWAlias one attribute name to another for backward compatibility

    :meta private:
    returnc           	      p    t          j        d d d dt          d           t          |           S ):meta private:zAccess to deprecated property . (Replaced by ) -- Deprecated since version .   
stacklevelwarningswarnDeprecationWarninggetattr)selfr   r   r   s    P/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/bs4/_deprecation.pyaliasz _deprecated_alias.<locals>.alias   sU     	xXxxhxxnuxxx	
 	
 	
 	

 tX&&&    valueNc           	      r    t          j        d d d dt          d           t          | |          S )r   zWrite to deprecated property r   r   r   r   r   )r   r   r   setattr)r   r   r   r   r   s     r   r   z _deprecated_alias.<locals>.alias&   sW     	wHwwXwwmtwww	
 	
 	
 	

 tXu---r   )propertyr   setterstrr   r   r   r   s   ``` r   _deprecated_aliasr"      s     's ' ' ' ' ' ' ' X' \.3 .4 . . . . . . . \. Lr   r	   c                 F     dt           dt           dt           f fd}|S )Nargskwargsr	   c           	      |    t          j        d d d dt          d            t          |           |i |S r   zCall to deprecated method r   r   r   r   r   r   )r   r$   r%   r   r   r   s      r   r   z)_deprecated_function_alias.<locals>.alias6   sb    ttt(ttjqttt	
 	
 	
 	

 'wtX&&7777r   )r   r!   s   ``` r   _deprecated_function_aliasr(   3   sI    83 8# 8# 8 8 8 8 8 8 8 8 Lr   replaced_byc                 4     dt           dt           f fd}|S )Nfuncr	   c                 x     t          j                   dt          dt          dt          f fd            }|S )Nr$   r%   r	   c            	      j    t          j        dj         d d dt          d            | i |S r'   )r   r   __name__r   )r$   r%   r+   r)   r   s     r   with_warningz4_deprecated.<locals>.deprecate.<locals>.with_warningD   st     M AT]  A  A;  A  Av}  A  A  A"   
 4((((r   )	functoolswrapsr   )r+   r/   r)   r   s   ` r   	deprecatez_deprecated.<locals>.deprecateC   s^    				) 	)s 	)s 	) 	) 	) 	) 	) 	) 	) 
		) r   )r   )r)   r   r2   s   `` r   _deprecatedr3   B   s=     X        r   )
__doc__r0   r   typingr   r   r    r"   r(   r3    r   r   <module>r7      s   
 
             s S    : +.seSj   S 3 8      r   