
    hZ	              
       t    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	y)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                 x     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           	      h    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    x/var/labsstorage/home/kalaiyarasan.offl.2004/htdocs/course/socket/myenv/lib/python3.12/site-packages/bs4/_deprecation.pyaliasz _deprecated_alias.<locals>.alias   sB     	,XJohZOmnumvvwx	

 tX&&    valueNc           	      j    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&   sD     	+H:_XJNlmtluuvw	

 tXu--r   )propertyr   setterstrr   r   r   r   s   ``` r   _deprecated_aliasr"      sK     's ' ' \\.3 .4 . . Lr   r	   c                 @     dt         dt         dt         f fd}|S )Nargskwargsr	   c           	      t    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   sL    (
/(Kijqirrst	

 'wtX&777r   )r   r!   s   ``` r   _deprecated_function_aliasr(   3   s$    83 8# 8# 8 Lr   replaced_byc                 0     dt         dt         f fd}|S )Nfuncr	   c                 n     t        j                         dt        dt        dt        f fd       }|S )Nr$   r%   r	   c            	      t    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   sL     MM,T]]O?;-Wuv}u~~  A"
 (((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   