a
    (ñ»jh	  ã                   @   sj   d Z ddlZddlZddlmZmZ eeedœdd„Zeeeeegef dœdd	„Zeeed
œ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 tdœ‡ ‡‡fdd„ƒ}|jtddœ‡ ‡‡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   © ú6E:\soccer\ml_env\Lib\site-packages\bs4/_deprecation.pyÚalias   s    ýz _deprecated_alias.<locals>.aliasN)Úvaluer   c                    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   r   r   r   c                    s   t t t dœ‡ ‡‡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_byr   r   c                    s   t t dœ‡ ‡fdd„}|S )N)Úfuncr   c                    s(   t  ˆ ¡tttdœ‡ ‡‡fdd„ƒ}|S )Nr    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   þ