[AIRFLOW-2850] Remove deprecated airflow.utils.apply_defaults (#3695)
This commit is contained in:
Родитель
c0c63ae2a4
Коммит
b0e912cea9
|
@ -24,7 +24,7 @@ from time import sleep
|
|||
|
||||
from airflow.exceptions import AirflowException
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
|
||||
from airflow.contrib.hooks.aws_hook import AwsHook
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import sys
|
|||
|
||||
from airflow.exceptions import AirflowException
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
|
||||
from airflow.contrib.hooks.aws_hook import AwsHook
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
from airflow.exceptions import AirflowException
|
||||
from airflow.contrib.hooks.emr_hook import EmrHook
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# under the License.
|
||||
from airflow.contrib.hooks.emr_hook import EmrHook
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
from airflow.exceptions import AirflowException
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from airflow.models import BaseOperator
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
from airflow.exceptions import AirflowException
|
||||
from airflow.contrib.hooks.emr_hook import EmrHook
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# under the License.
|
||||
from airflow.sensors.base_sensor_operator import BaseSensorOperator
|
||||
from airflow.contrib.hooks.datadog_hook import DatadogHook
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
from airflow.exceptions import AirflowException
|
||||
from datadog import api
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from airflow.sensors.base_sensor_operator import BaseSensorOperator
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
from airflow.exceptions import AirflowException
|
||||
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# under the License.
|
||||
from airflow.contrib.hooks.emr_hook import EmrHook
|
||||
from airflow.contrib.sensors.emr_base_sensor import EmrBaseSensor
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
|
||||
|
||||
class EmrJobFlowSensor(EmrBaseSensor):
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# under the License.
|
||||
from airflow.contrib.hooks.emr_hook import EmrHook
|
||||
from airflow.contrib.sensors.emr_base_sensor import EmrBaseSensor
|
||||
from airflow.utils import apply_defaults
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
|
||||
|
||||
class EmrStepSensor(EmrBaseSensor):
|
||||
|
|
|
@ -16,25 +16,3 @@
|
|||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
from __future__ import absolute_import
|
||||
|
||||
import warnings
|
||||
|
||||
from .decorators import apply_defaults as _apply_defaults
|
||||
|
||||
|
||||
def apply_defaults(func):
|
||||
warnings.warn_explicit(
|
||||
"""
|
||||
You are importing apply_defaults from airflow.utils which
|
||||
will be deprecated in a future version.
|
||||
Please use :
|
||||
|
||||
from airflow.utils.decorators import apply_defaults
|
||||
""",
|
||||
category=PendingDeprecationWarning,
|
||||
filename=func.__code__.co_filename,
|
||||
lineno=func.__code__.co_firstlineno + 1
|
||||
)
|
||||
return _apply_defaults(func)
|
||||
|
|
Загрузка…
Ссылка в новой задаче