§
    ìóÉj%  ã                  ó  — d dl mZ d dlZd dlZd dlmZ d dlmZ d dlmZ d dlZd dl	m
Z
 d dlmZ d dlmZ er-d d	lmZ d d
lmZ  ed¦  «        Z ed¦  «        Z ed¦  «        ZdZdZd d„Zd!d„Z	 	 d"d#d„Z	 	 d"d$d„ZdS )%é    )ÚannotationsN)ÚAny)ÚTYPE_CHECKING)ÚTypeVar)Úversion)Ú_get_docstring_indent)Ú_validate_version)ÚCallable)Ú	ParamSpecÚFTÚFPÚCTa  

.. warning::
    Deprecated in v{d_ver}. This feature will be removed in the future. The removal of this
    feature is currently scheduled for v{r_ver}, but this schedule is subject to change.
    See https://github.com/optuna/optuna/releases/tag/v{d_ver}.
z�{name} has been deprecated in v{d_ver}. This feature will be removed in v{r_ver}. See https://github.com/optuna/optuna/releases/tag/v{d_ver}.Úold_versionÚstrÚnew_versionÚreturnÚNonec                ó†   — t          j        | ¦  «        t          j        |¦  «        k    rt          d| › d|› d�¦  «        ‚d S )NzŒInvalid version relationship. The deprecated version must be smaller than the removed version, but (deprecated version, removed version) = (z, z) are specified.)r   ÚparseÚ
ValueError)r   r   s     úu/home/lighthouse/badge-speaker-benchmark/.benchmark-venv-community/lib/python3.11/site-packages/optuna/_deprecated.pyÚ_validate_two_versionr   *   s_   € Ý„}�[Ñ!Ô!¥G¤M°+Ñ$>Ô$>Ò>Ð>Ýð=àð=ð =à*ð=ð =ð =ñ
ô 
ð 	
ð ?Ð>ó    Útextc                ó\   — dt          j        |                      ¦   «         d¦  «        z   dz   S )Nz

z    ú
)ÚtextwrapÚindentÚstrip)r   s    r   Ú_format_textr    3   s&   € Ø•H”O D§J¢J¡L¤L°&Ñ9Ô9Ñ9¸DÑ@Ð@r   Údeprecated_versionÚremoved_versionÚnameú
str | Noneú0'Callable[[Callable[FP, FT]], Callable[FP, FT]]'c                ó|   ‡ ‡‡‡— t          ‰ ¦  «         t          ‰¦  «         t          ‰ ‰¦  «         dˆ ˆˆˆfd„}|S )a5  Decorate function as deprecated.

    Args:
        deprecated_version:
            The version in which the target feature is deprecated.
        removed_version:
            The version in which the target feature will be removed.
        name:
            The name of the feature. Defaults to the function name. Optional.
        text:
            The additional text for the deprecation note. The default note is build using specified
            ``deprecated_version`` and ``removed_version``. If you want to provide additional
            information, please specify this argument yourself.

            .. note::
                The default deprecation note is as follows: "Deprecated in v{d_ver}. This feature
                will be removed in the future. The removal of this feature is currently scheduled
                for v{r_ver}, but this schedule is subject to change. See
                https://github.com/optuna/optuna/releases/tag/v{d_ver}."

            .. note::
                The specified text is concatenated after the default deprecation note.
    Úfuncú'Callable[FP, FT]'r   c                ód  •‡ — ‰ j         €d‰ _         t                               ‰‰¬¦  «        }‰�|t          ‰¦  «        z  }t	          ‰ j         ¦  «        }‰ j                              ¦   «         t          j        ||¦  «        z   |z   ‰ _         t          j	        ‰ ¦  «        d	ˆˆ ˆˆˆfd„¦   «         }|S )
NÚ ©Úd_verÚr_verÚargsr   Úkwargsr   ú'FT'c                 ó¬   •— t                                ‰�‰n‰j        ‰‰¬¦  «        }‰�|d‰z   z  }t          j        |t
          d¬¦  «          ‰| i |¤ŽS )z‚Decorates a function as deprecated.

            This decorator is supposed to be applied to the deprecated function.
            N©r#   r,   r-   ú é   ©Ú
stacklevel)Ú_DEPRECATION_WARNING_TEMPLATEÚformatÚ__name__ÚwarningsÚwarnÚFutureWarning)r.   r/   Úmessager!   r'   r#   r"   r   s      €€€€€r   Úwrapperz3deprecated_func.<locals>.decorator.<locals>.wrapperc   su   ø€ õ 4×:Ò:Ø"Ð.�d�d°D´MØ(Ø%ð ;ñ ô ˆGð
 ÐØ˜3 ™:Ñ%�ÝŒM˜'¥=¸QÐ?Ñ?Ô?Ð?à�4˜Ð( Ð(Ð(Ð(r   )r.   r   r/   r   r   r0   )
Ú__doc__Ú_DEPRECATION_NOTE_TEMPLATEr8   r    r   r   r   r   Ú	functoolsÚwraps)r'   Únoter   r>   r!   r#   r"   r   s   `   €€€€r   Ú	decoratorz"deprecated_func.<locals>.decoratorY   sÍ   øø€ ØŒ<ÐØˆDŒLå)×0Ò0Ð7IÐQ`Ð0ÑaÔaˆØÐØ•L Ñ&Ô&Ñ&ˆDÝ& t¤|Ñ4Ô4ˆØ”|×)Ò)Ñ+Ô+­h¬o¸dÀFÑ.KÔ.KÑKÈfÑTˆŒå	Œ˜Ñ	Ô	ð	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)ð 	)ñ 
Ô	ð	)ð" ˆr   )r'   r(   r   r(   ©r	   r   ©r!   r"   r#   r   rD   s   ```` r   Údeprecated_funcrG   7   sk   øøøø€ õ< Ð(Ñ)Ô)Ð)Ý�oÑ&Ô&Ð&ÝÐ,¨oÑ>Ô>Ð>ðð ð ð ð ð ð ð ð ð< Ðr   ú'Callable[[CT], CT]'c                ó|   ‡ ‡‡‡— t          ‰ ¦  «         t          ‰¦  «         t          ‰ ‰¦  «         dˆ ˆˆˆfd„}|S )a/  Decorate class as deprecated.

    Args:
        deprecated_version:
            The version in which the target feature is deprecated.
        removed_version:
            The version in which the target feature will be removed.
        name:
            The name of the feature. Defaults to the class name. Optional.
        text:
            The additional text for the deprecation note. The default note is build using specified
            ``deprecated_version`` and ``removed_version``. If you want to provide additional
            information, please specify this argument yourself.

            .. note::
                The default deprecation note is as follows: "Deprecated in v{d_ver}. This feature
                will be removed in the future. The removal of this feature is currently scheduled
                for v{r_ver}, but this schedule is subject to change. See
                https://github.com/optuna/optuna/releases/tag/v{d_ver}."

            .. note::
                The specified text is concatenated after the default deprecation note.
    Úclsú'CT'r   c                ó,   •— dˆˆˆˆfd„} || ¦  «        S )NrJ   rK   r   c                óÊ  •‡‡— t          | d¦  «        Št          | d¦  «        Št          j        ‰¦  «        dˆˆˆˆˆˆ	fd	„¦   «         }t          | d|¦  «         | j        €d| _        t
                               ‰‰¬¦  «        }‰	�|t          ‰	¦  «        z  }t          | j        ¦  «        }| j         	                    ¦   «         t          j        ||¦  «        z   |z   | _        | S )z|Decorates a class as deprecated.

            This decorator is supposed to be applied to the deprecated class.
            Ú__init__r9   Úselfr   r.   r/   r   r   c                ó®   •— t                                ‰�‰n‰‰‰¬¦  «        }‰	�|d‰	z   z  }t          j        |t          d¬¦  «          ‰| g|¢R i |¤Ž d S )Nr2   r3   r4   r5   )r7   r8   r:   r;   r<   )
rO   r.   r/   r=   Ú_original_initÚ_original_namer!   r#   r"   r   s
       €€€€€€r   Úwrapped_initzJdeprecated_class.<locals>.decorator.<locals>.wrapper.<locals>.wrapped_init¥   s�   ø€ å7×>Ò>Ø"&Ð"2˜$˜$¸Ø,Ø)ð ?ñ ô �ð
 Ð#Ø˜s T™zÑ)�GÝ”ØÝ!Ø ðñ ô ð ð �˜tÐ5 dÐ5Ð5Ð5¨fÐ5Ð5Ð5Ð5Ð5r   Nr*   r+   )rO   r   r.   r   r/   r   r   r   )ÚgetattrrA   rB   Úsetattrr?   r@   r8   r    r   r   r   r   )
rJ   rS   rC   r   rQ   rR   r!   r#   r"   r   s
       @@€€€€r   r>   z4deprecated_class.<locals>.decorator.<locals>.wrapper�   s  øøø€ õ
 % S¨*Ñ5Ô5ˆNÝ$ S¨*Ñ5Ô5ˆNåŒ_˜^Ñ,Ô,ð6ð 6ð 6ð 6ð 6ð 6ð 6ð 6ð 6ð 6ñ -Ô,ð6õ  �C˜ \Ñ2Ô2Ð2àŒ{Ð"Ø �”å-×4Ò4Ø(°ð 5ñ ô ˆDð ÐØ� TÑ*Ô*Ñ*�Ý*¨3¬;Ñ7Ô7ˆFØœ+×+Ò+Ñ-Ô-µ´ÀÀfÑ0MÔ0MÑMÐPVÑVˆCŒKàˆJr   ©rJ   rK   r   rK   © )rJ   r>   r!   r#   r"   r   s     €€€€r   rD   z#deprecated_class.<locals>.decoratorœ   sA   ø€ ð&	ð &	ð &	ð &	ð &	ð &	ð &	ð &	ð &	ðP ˆw�s‰|Œ|Ðr   rV   rE   rF   s   ```` r   Údeprecated_classrX   z   sl   øøøø€ õ< Ð(Ñ)Ô)Ð)Ý�oÑ&Ô&Ð&ÝÐ,¨oÑ>Ô>Ð>ð)ð )ð )ð )ð )ð )ð )ð )ð )ðV Ðr   )r   r   r   r   r   r   )r   r   r   r   )NN)
r!   r   r"   r   r#   r$   r   r$   r   r%   )
r!   r   r"   r   r#   r$   r   r$   r   rH   )Ú
__future__r   rA   r   Útypingr   r   r   r:   Ú	packagingr   Úoptuna._experimentalr   r	   Úcollections.abcr
   Útyping_extensionsr   r   r   r   r@   r7   r   r    rG   rX   rW   r   r   ú<module>r_      sŽ  ðØ "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø €€€Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð Ø €€€à Ð Ð Ð Ð Ð à 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2ð ð Ø(Ð(Ð(Ð(Ð(Ð(à+Ð+Ð+Ð+Ð+Ð+à	ˆ�‰Œ€BØ	ˆ�4‰Œ€BØ	ˆ�‰Œ€BðÐ ðBð ð
ð 
ð 
ð 
ðAð Að Að Að Øð	@ð @ð @ð @ð @ðL Øð	Mð Mð Mð Mð Mð Mð Mr   