Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/celery/utils/__pycache__/deprecated.cpython-39.pyc
Ðазад
a t�h$ � @ sd d Z ddlZddlmZ ddlmZmZ dZdZdZ dd d �Z ddd�Zdd d�ZG dd� d�Z dS )zDeprecation utilities.� N��wraps)�CDeprecationWarning�CPendingDeprecationWarning)�Callable�Property�warnz� {description} is scheduled for deprecation in version {deprecation} and removal in version v{removal}. {alternative} zc {description} is deprecated and scheduled for removal in version {removal}. {alternative} � c C sR | |||d�}|dur,t tjf i |���}nttjf i |���}tj||d� dS )zWarn of (pending) deprecation.)�description�deprecation�removal�alternativeN)� stacklevel)r �PENDING_DEPRECATION_FMT�formatr �DEPRECATION_FMT�warningsr )r r r r r �ctx�w� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/celery/utils/deprecated.pyr s �r c s � ���fdd�}|S )a Decorator for deprecated functions. A deprecation warning will be emitted when the function is called. Arguments: deprecation (str): Version that marks first deprecation, if this argument isn't set a ``PendingDeprecationWarning`` will be emitted instead. removal (str): Future version when this feature will be removed. alternative (str): Instructions for an alternative solution (if any). description (str): Description of what's being deprecated. c s t � ����� �fdd��}|S )Nc s4 ddl m} t�p|����� dd� �| i |��S )N� )�qualname� )r r r r r )Zimportsr r )�args�kwargsr )r r r �funr r r �__inner4 s �z)Callable.<locals>._inner.<locals>.__innerr )r r �r r r r �r r �_inner2 s zCallable.<locals>._innerr �r r r r r r r r r $ s r c s � ���fdd�}|S )z$Decorator for deprecated properties.c s t | ��� �p| jd�S )N)r r r r )�_deprecated_property�__name__r r r r r D s �zProperty.<locals>._innerr r! r r r r A s r c @ s@ e Zd Zddd�Zddd�Zdd� Zdd � Zd d� Zdd � ZdS )r"