o
    í6Wjh	  ã                
   @   sx   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d„Zdededed	eegef fd
d„Zdeded	efd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                    s>   t dtf‡ ‡‡fdd„ƒ}|jdtddf‡ ‡‡fdd„ƒ}|S )zWAlias one attribute name to another for backward compatibility

    :meta private:
    Úreturnc                    s.   t jdˆ› dˆ › dˆ› d�tdd� t| ˆ ƒS )ú:meta private:zAccess to deprecated property ú. (Replaced by ú) -- Deprecated since version Ú.é   ©Ú
stacklevel©ÚwarningsÚwarnÚDeprecationWarningÚgetattr)Úself©r   r   r   © ú_/home/esfera/Documents/content_generation/venv/lib/python3.10/site-packages/bs4/_deprecation.pyÚalias   s   ý
z _deprecated_alias.<locals>.aliasÚvalueNc                    s0   t jdˆ› dˆ › dˆ› d�tdd� t| ˆ |ƒS )r   zWrite to deprecated property r	   r
   r   r   r   )r   r   r   Úsetattr)r   r   r   r   r   r   &   s   ý)Úpropertyr   ÚsetterÚstr©r   r   r   r   r   r   r   Ú_deprecated_alias   s
   		r   r   c                    s"   dt dt dt f‡ ‡‡fdd„}|S )NÚargsÚkwargsr   c                    s8   t jdˆ› dˆ › dˆ› d�tdd� t| ˆ ƒ|i |¤ŽS ©r   zCall to deprecated method r	   r
   r   r   r   r   )r   r    r!   r   r   r   r   6   s   ýz)_deprecated_function_alias.<locals>.alias)r   r   r   r   r   Ú_deprecated_function_alias3   s   	r#   Úreplaced_byc                    s   dt dt f‡ ‡fdd„}|S )NÚfuncr   c                    s,   t  ˆ ¡dtdtdtf‡ ‡‡fdd„ƒ}|S )Nr    r!   r   c                     s4   t jdˆ j› dˆ› dˆ› d�tdd� ˆ | i |¤ŽS r"   )r   r   Ú__name__r   )r    r!   )r%   r$   r   r   r   Úwith_warningD   s   ýz4_deprecated.<locals>.deprecate.<locals>.with_warning)Ú	functoolsÚwrapsr   )r%   r'   ©r$   r   )r%   r   Ú	deprecateC   s    	z_deprecated.<locals>.deprecate)r   )r$   r   r+   r   r*   r   Ú_deprecatedB   s   r,   )
Ú__doc__r(   r   Útypingr   r   r   r   r#   r,   r   r   r   r   Ú<module>   s    ÿÿÿ
þ