[AIRFLOW-2850] Remove deprecated airflow.utils.apply_defaults (#3695)

This commit is contained in:
Taylor D. Edmiston 2018-08-05 14:13:12 -04:00 коммит произвёл Kaxil Naik
Родитель c0c63ae2a4
Коммит b0e912cea9
10 изменённых файлов: 9 добавлений и 31 удалений

Просмотреть файл

@ -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)