You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by fo...@apache.org on 2018/05/04 07:02:20 UTC

[24/50] incubator-airflow git commit: [AIRFLOW-2390] Resolve FlaskWTFDeprecationWarning

[AIRFLOW-2390] Resolve FlaskWTFDeprecationWarning

- Replace soon to be deprecated `flask_wtf.Form`
class with `from flask_wtf import FlaskForm`

Closes #3278 from kaxil/AIRFLOW-2390


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/ae48fce9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/ae48fce9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/ae48fce9

Branch: refs/heads/v1-10-test
Commit: ae48fce9b097e48f09b3b8829b3b80dea21c58e9
Parents: e29562e
Author: Kaxil Naik <ka...@gmail.com>
Authored: Mon Apr 30 08:35:54 2018 +0200
Committer: Fokko Driesprong <fo...@godatadriven.com>
Committed: Mon Apr 30 08:35:54 2018 +0200

----------------------------------------------------------------------
 airflow/www/forms.py      | 10 +++++-----
 airflow/www_rbac/forms.py | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/ae48fce9/airflow/www/forms.py
----------------------------------------------------------------------
diff --git a/airflow/www/forms.py b/airflow/www/forms.py
index 1904e72..d6fbe13 100644
--- a/airflow/www/forms.py
+++ b/airflow/www/forms.py
@@ -7,9 +7,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-# 
+#
 #   http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -25,16 +25,16 @@ from __future__ import unicode_literals
 from airflow.utils import timezone
 from flask_admin.form import DateTimePickerWidget
 from wtforms import DateTimeField, SelectField
-from flask_wtf import Form
+from flask_wtf import FlaskForm
 
 
-class DateTimeForm(Form):
+class DateTimeForm(FlaskForm):
     # Date filter form needed for gantt and graph view
     execution_date = DateTimeField(
         "Execution date", widget=DateTimePickerWidget())
 
 
-class DateTimeWithNumRunsForm(Form):
+class DateTimeWithNumRunsForm(FlaskForm):
     # Date time and number of runs form for tree view, task duration
     # and landing times
     base_date = DateTimeField(

http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/ae48fce9/airflow/www_rbac/forms.py
----------------------------------------------------------------------
diff --git a/airflow/www_rbac/forms.py b/airflow/www_rbac/forms.py
index 63d27e6..61a7ce2 100644
--- a/airflow/www_rbac/forms.py
+++ b/airflow/www_rbac/forms.py
@@ -7,9 +7,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-# 
+#
 #   http://www.apache.org/licenses/LICENSE-2.0
-# 
+#
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -30,20 +30,20 @@ from flask_appbuilder.fieldwidgets import (BS3TextFieldWidget, BS3TextAreaFieldW
                                            BS3PasswordFieldWidget, Select2Widget,
                                            DateTimePickerWidget)
 from flask_babel import lazy_gettext
-from flask_wtf import Form
+from flask_wtf import FlaskForm
 
 from wtforms import validators
 from wtforms.fields import (IntegerField, SelectField, TextAreaField, PasswordField,
                             StringField, DateTimeField, BooleanField)
 
 
-class DateTimeForm(Form):
+class DateTimeForm(FlaskForm):
     # Date filter form needed for gantt and graph view
     execution_date = DateTimeField(
         "Execution date", widget=DateTimePickerWidget())
 
 
-class DateTimeWithNumRunsForm(Form):
+class DateTimeWithNumRunsForm(FlaskForm):
     # Date time and number of runs form for tree view, task duration
     # and landing times
     base_date = DateTimeField(