o
    iS	                  	   @   s   d dl Z d dlZd dlmZ d dlmZ ddedededB defdd	ZdedededB defd
dZdedededB ddfddZ	deddfddZ
dS )    NCallable)Anydeprecated_in
removed_inhelp_messagereturnc                    s.   dur
d ddt f fdd}|S )zuMark functions as deprecated.

    Adding this will result in a warning being emitted when the function is used.
    N .funcc                    s.   t  dtdtdtf fdd}|S )Nargskwargsr   c                     s4   dj  d  d d }t| | i |S )NzCall to z, deprecated in , will be removed in r
   )__name___deprecation_warning)r   r   message)r   r   r   r    X/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/pyiceberg/utils/deprecated.pynew_func    s   z/deprecated.<locals>.decorator.<locals>.new_func)	functoolswrapsr   )r   r   r   r   r   )r   r   	decorator   s   "zdeprecated.<locals>.decoratorr   )r   r   r   r   r   r   r   
deprecated   s   r   c                 C   s   d|  d| d| S )zReturn a deprecation notice.zDeprecated in r   z. r   r   r   r   r   r   r   deprecation_notice-   s   r   c                 C   s   t t| || dS )ziMark properties or behaviors as deprecated.

    Adding this will result in a warning being emitted.
    N)r   r   r   r   r   r   deprecation_message2   s   r   r   c                 C   s>   t   t j| tdd W d    d S 1 sw   Y  d S )N   )category
stacklevel)warningscatch_warningswarnDeprecationWarning)r   r   r   r   r   :   s   
"r   )N)r   r    collections.abcr   typingr   strr   r   r   r   r   r   r   r   <module>   s    