
    > /i                         d Z ddlmZmZmZ ddlmZ ddlmZ defdedede	d	e	d
e	de
dee	ee   e
gdf   defdZ	 dde	de	d
e	de
ddf
dZy)zThis module contains functionality used for transition warnings issued by this library.

It was created to prevent circular imports that would be caused by creating the warnings
inside warnings.py.

.. versionadded:: 20.2
    )AnyCallableType)warn)PTBDeprecationWarning   deprecated_argnew_argdeprecated_arg_namenew_arg_namebot_api_version
stacklevelwarn_callbackNreturnc                     | r(|r&| |k7  r!t        d| d| d| d| d| d| d| d      | r |d	| d
| d| dt        |dz          | S |S )a  A helper function for the transition in API when argument is renamed.

    Checks the `deprecated_arg` and `new_arg` objects; warns if non-None `deprecated_arg` object
    was passed. Returns `new_arg` object (either the one originally passed by the user or the one
    that user passed as `deprecated_arg`).

    Raises `ValueError` if both `deprecated_arg` and `new_arg` objects were passed, and they are
    different.
    z"You passed different entities as 'z' and 'z'. The parameter 'z' was renamed to 'z' in Bot API z. We recommend using 'z' instead of ''.Bot API z renamed the argument '' to '   )
ValueErrorr   )r	   r
   r   r   r   r   r   s          Y/srv/sistema/bot/venv/lib/python3.12/site-packages/telegram/_utils/warnings_transition.py(warn_about_deprecated_arg_return_new_argr   "   s    $ 'n&?01D0EW\N [122D\NR_5l^ D#$B(
 	
 ''>?R>S T~R!!N		
 N    deprecated_attr_namenew_attr_namec           	      B    t        d| d|  d| dt        |dz          y)zA helper function for the transition in API when attribute is renamed. Call from properties.

    The properties replace deprecated attributes in classes and issue these deprecation warnings.
    r   z renamed the attribute 'r   r   r   )r   N)r   r   )r   r   r   r   s       r   &warn_about_deprecated_attr_in_propertyr   H   s9     	
?##;<P;Q R?"	>	r   )r   )__doc__typingr   r   r   telegram._utils.warningsr   telegram.warningsr   strintWarningr   r    r   r   <module>r&      s   & ' & ) 3 ?C### # 	#
 # # S$w-5t;<# 	#T 	  	
 
r   