airflow.providers.google.common.deprecated¶
类¶
根据包装对象类型和提供的其他详细信息构建详细的弃用消息。 |
函数¶
|
标记类、方法或函数为弃用。 |
模块内容¶
- class airflow.providers.google.common.deprecated.AirflowDeprecationAdapter(planned_removal_date=None, planned_removal_release=None, use_instead=None, reason=None, instructions=None, category=DeprecationWarning, **kwargs)[source]¶
基类:
deprecated.classic.ClassicAdapter
根据包装对象类型和提供的其他详细信息构建详细的弃用消息。
- 参数:
planned_removal_date (str | None) – 计划移除此弃用对象的日期。建议日期为今日起六个月后。期望的日期格式为 月 DD, YYYY,例如:August 22, 2024。如果未设置 planned_removal_release 参数,则此参数为必需项。
planned_removal_release (str | None) – 预计移除此弃用对象的包名和版本。期望的格式为 <包名>==<包版本>,例如 apache-airflow==2.10.0 或 apache-airflow-providers-google==10.22.0。如果未设置 planned_removal_date 参数,则此参数为必需项。
use_instead (str | None) – 可选。弃用对象的替代项。
reason (str | None) – 可选。弃用此对象的详细原因。
instructions (str | None) – 可选。从弃用对象迁移的详细说明。
category (type[DeprecationWarning]) – 可选。用于弃用警告的警告类别。
- planned_removal_date: datetime.date | None[source]¶
- category: type[DeprecationWarning][source]¶
- airflow.providers.google.common.deprecated.deprecated(*args, planned_removal_date=None, planned_removal_release=None, use_instead=None, reason=None, instructions=None, adapter_cls=AirflowDeprecationAdapter, **kwargs)[source]¶
标记类、方法或函数为弃用。
- 参数:
planned_removal_date (str | None) – 计划移除此弃用对象的日期。建议日期为今日起六个月后。期望的日期格式为 月 DD, YYYY,例如:August 22, 2024。如果未设置 planned_removal_release 参数,则此参数为必需项。
planned_removal_release (str | None) – 预计移除此弃用对象的包名和版本。期望的格式为 <包名>==<包版本>,例如 apache-airflow==2.10.0 或 apache-airflow-providers-google==10.22.0。如果未设置 planned_removal_date 参数,则此参数为必需项。
use_instead (str | None) – 可选。弃用对象的替代项。
reason (str | None) – 可选。弃用此对象的详细原因。
instructions (str | None) – 可选。从弃用对象迁移的详细说明。
adapter_cls (type[AirflowDeprecationAdapter]) – 可选。用于获取弃用消息的适配器类。此项应是 AirflowDeprecationAdapter 的子类。