Repository: apache/airflow

Issue:
WTFroms new release 2.3.0 breaks airflow 1.10.10
<!--

Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)

If you need to include code snippets or logs, please put them in fenced code
blocks.  If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>

Please delete these comment blocks before submitting the issue.

-->

<!--

IMPORTANT!!!

Please complete the next sections or the issue will be closed.
This questions are the first thing we need to know to understand the context.

-->

**Apache Airflow version**: 1.10.10


**Kubernetes version (if you are using kubernetes)** (use `kubectl version`):

**Environment**:

- **Cloud provider or hardware configuration**:
- **OS** (e.g. from /etc/os-release):
NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
- **Kernel** (e.g. `uname -a`): ubuntu 4.15.0-96-generic #97~16.04.1-Ubuntu SMP Wed Apr 1 03:03:31 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux **Install tools**: pip 
- **Others**:

**What happened**:
airflow initdb 
/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/airflow/configuration.py:652: DeprecationWarning: You have two airflow.cfg files: /home/sgu/airflow/airflow.cfg and /home/sgu/tmp20200221/airflow.cfg. Airflow used to look at ~/airflow/airflow.cfg, even when AIRFLOW_HOME was set to a different value. Airflow will now only read /home/sgu/tmp20200221/airflow.cfg, and you should remove the other file
  category=DeprecationWarning,
Traceback (most recent call last):
  File "/home/sgu/miniconda3/envs/tmp/bin/airflow", line 26, in <module>
    from airflow.bin.cli import CLIFactory
  File "/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/airflow/bin/cli.py", line 71, in <module>
    from airflow.www_rbac.app import cached_app as cached_app_rbac
  File "/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/airflow/www_rbac/app.py", line 28, in <module>
    from flask_appbuilder import AppBuilder, SQLA
  File "/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/flask_appbuilder/__init__.py", line 6, in <module>
    from .base import AppBuilder  # noqa: F401
  File "/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/flask_appbuilder/base.py", line 8, in <module>
    from .api.manager import OpenApiManager
  File "/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/flask_appbuilder/api/manager.py", line 7, in <module>
    from flask_appbuilder.baseviews import BaseView
  File "/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/flask_appbuilder/baseviews.py", line 21, in <module>
    from .forms import GeneralModelConverter
  File "/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/flask_appbuilder/forms.py", line 17, in <module>
    from .fieldwidgets import (
  File "/home/sgu/miniconda3/envs/tmp/lib/python3.6/site-packages/flask_appbuilder/fieldwidgets.py", line 3, in <module>
    from wtforms.widgets import html_params, HTMLString
ImportError: cannot import name 'HTMLString'

<!-- (please include exact error messages if you can) -->

**What you expected to happen**:

<!-- What do you think went wrong? -->

**How to reproduce it**:
pip install apache-airflow
airflow initdb 
<!---

As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.

If you are using kubernetes, please attempt to recreate the issue using minikube or kind.

## Install minikube/kind

- Minikube https://minikube.sigs.k8s.io/docs/start/
- Kind https://kind.sigs.k8s.io/docs/user/quick-start/

If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action

You can include images using the .md sytle of
![alt text](http://url/to/img.png)

To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.

--->


**Anything else we need to know**:
wtforms just released 2.3.0 which breaks flask which  breaks airflow. 
https://wtforms.readthedocs.io/en/2.3.x/changes/#version-2-3-0
<!--

How often does this problem occur? Once? Every time etc?

Any relevant logs to include? Put them here in side a detail tag:
<details><summary>x.log</summary> lots of stuff </details>

-->



Discussion:
Thanks for opening your first issue here! Be sure to follow the issue template!

FYI.  if you want to install airflow in repeatable way, as of airlfow 1.10.10 you have the way to install airflow repeatably no matter if there were some breaking packages:

I will make it more prominent in README/INSTALL now that we have it released but this should give you an "always working" installation mechanism (note python version in the link)

```
pip install apache-airflow[...EXTRAS_HERE..]==1.10.10 \
   --constraint https://raw.githubusercontent.com/apache/airflow/1.10.10/requirements/requirements-python3.7.txt
```
I am looking into it at master and we will also fix it in 1.10.11

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -598,6 +598,7 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
     'tzlocal>=1.4,<2.0.0',
     'unicodecsv>=0.14.1',
     'werkzeug<1.0.0',
+    'WTforms<2.3.0',  # TODO: Remove after https://github.com/dpgaspar/Flask-AppBuilder/issues/1356 is fixed and released.
 ]
 
 


Test patch: