Issue 1:
Apache Airflow version: 2.0.1

Environment:

Cloud provider or hardware configuration: Google Cloud Platform Compute Engine

OS (e.g. from /etc/os-release): NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)"

Kernel (e.g. uname -a): Linux finance-airflow 5.4.0-1041-gcp #44-Ubuntu SMP Fri Mar 26 03:53:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Install tools: pip

What happened:

Installed with usual pip install apache-airflow which installed sqlalchemy 1.4.6, since apache-airflow 2.0.1 requires sqlalchemy<2,>=1.3.18

Ran:

airflow db init

from sqlalchemy.orm.query import _ColumnEntity ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/home/foo/airflow/.direnv/python-3.8.5/lib/python3.8/site-packages/sqlalchemy/orm/query.py)

What you expected to happen:

Initializing sqlite3 database for testing

How to reproduce it:

pip install apache-airflow on Ubuntu 20.04.2 LTS

Anything else we need to know:

Downgraded sqlalchemy via pip install --upgrade sqlalchemy==1.3.18, which lets database initialize, but one expects dependencies to be handled by setup.py. Suggest updating setup.py for apache-airflow version in pypi.

Issue 2:
Apache Airflow version: 2.0.1

Kubernetes version (if you are using kubernetes) (use kubectl version): N/A

Environment:

Cloud provider or hardware configuration:

OS (e.g. from /etc/os-release): Mac OS Big Sur

Kernel (e.g. uname -a):

Install tools: pip 20.1.1

Others:

What happened:

Our CI environment broke due to the release of SQLAlchemy 1.4, which is incompatible with the latest version of sqlalchemy-utils. (Related issue)

Partial stacktrace:

File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/airflow/www/utils.py", line 27, in <module>
from flask_appbuilder.models.sqla.interface import SQLAInterface
File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 16, in <module>
from sqlalchemy_utils.types.uuid import UUIDType
File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py", line 1, in <module>
from .aggregates import aggregated # noqa
File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py", line 372, in <module>
from .functions.orm import get_column_key
File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py", line 1, in <module>
from .database import ( # noqa
File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py", line 11, in <module>
from .orm import quote
File "/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py", line 14, in <module>
from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/Users/samwheating/Desktop/tmp_venv/lib/python3.7/site-packages/sqlalchemy/orm/query.py)

I'm not sure what the typical procedure is in the case of breaking changes to dependencies, but seeing as there's an upcoming release I thought it might be worth pinning sqlalchemy to 1.3.x? (Or pin the version of sqlalchemy-utils to a compatible version if one is released before Airflow 2.0.2)

What you expected to happen:

airflow db init to run successfully.

How to reproduce it:

Create a new virtualenv

pip install apache-airflow

airflow db init