<p dir="auto"><strong>Apache Airflow version</strong>: 2.0.1</p>
<p dir="auto"><strong>Environment</strong>: Python virtual environment based on <em>circleci/python:3.7.9-stretch</em></p>
<p dir="auto"><strong>What happened</strong>: We have CircleCI running unit tests for an extensions library we built for airflow. It</p>
<p dir="auto">It runs unit tests in a virtual environment initialized with the code below:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="        python3 -m venv virtualenv
        . virtualenv/bin/activate
        pip install -U pip==19.3.1 wheel setuptools pylint
        pip install -i https://$ARTIFACTORY_USERNAME:$ARTIFACTORY_PASSWORD@liveintent.jfrog.io/liveintent/api/pypi/pypi/simple/ -r requirements.txt"><pre class="notranslate">        <span class="pl-s1">python3</span> <span class="pl-c1">-</span><span class="pl-s1">m</span> <span class="pl-s1">venv</span> <span class="pl-s1">virtualenv</span>
        . <span class="pl-s1">virtualenv</span><span class="pl-c1">/</span><span class="pl-s1">bin</span><span class="pl-c1">/</span><span class="pl-s1">activate</span>
        <span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-v">U</span> <span class="pl-s1">pip</span><span class="pl-c1">==</span><span class="pl-c1">19.3</span>.<span class="pl-c1">1</span> <span class="pl-s1">wheel</span> <span class="pl-s1">setuptools</span> <span class="pl-s1">pylint</span>
        <span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-s1">i</span> <span class="pl-s1">https</span>:<span class="pl-c1">//</span>$<span class="pl-v">ARTIFACTORY_USERNAME</span>:$<span class="pl-v">ARTIFACTORY_PASSWORD</span>@<span class="pl-s1">liveintent</span>.<span class="pl-s1">jfrog</span>.<span class="pl-s1">io</span><span class="pl-c1">/</span><span class="pl-s1">liveintent</span><span class="pl-c1">/</span><span class="pl-s1">api</span><span class="pl-c1">/</span><span class="pl-s1">pypi</span><span class="pl-c1">/</span><span class="pl-s1">pypi</span><span class="pl-c1">/</span><span class="pl-s1">simple</span><span class="pl-c1">/</span> <span class="pl-c1">-</span><span class="pl-s1">r</span> <span class="pl-s1">requirements</span>.<span class="pl-s1">txt</span></pre></div>
<p dir="auto">This was our <code class="notranslate">requirements.txt</code> file</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pyparsing==2.4.6
pyrsistent==0.16.0
pytest==5.3.5
apache-airflow==2.0.1
apache-airflow-providers-amazon==1.1.0
apache-airflow-providers-cncf-kubernetes==1.0.1
apache-airflow-providers-postgres==1.0.1
apache-airflow-providers-sftp==1.1.0
apache-airflow-providers-ssh==1.1.0
psycopg2==2.8.6
alembic==1.4.3
PyJWT==1.7.1
importlib-metadata==1.7.0"><pre class="notranslate"><code class="notranslate">pyparsing==2.4.6
pyrsistent==0.16.0
pytest==5.3.5
apache-airflow==2.0.1
apache-airflow-providers-amazon==1.1.0
apache-airflow-providers-cncf-kubernetes==1.0.1
apache-airflow-providers-postgres==1.0.1
apache-airflow-providers-sftp==1.1.0
apache-airflow-providers-ssh==1.1.0
psycopg2==2.8.6
alembic==1.4.3
PyJWT==1.7.1
importlib-metadata==1.7.0
</code></pre></div>
<p dir="auto">We run unit tests and linting like this</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="cd test
. ../virtualenv/bin/activate
export PYTHONPATH=$PYTHONPATH:/home/circleci/airflow-build/
airflow db init
pytest --junitxml pytest-result.xml
mkdir ../lint
cd ../li_airflow_common
find . -iname '*.py' | sort | xargs pylint -j0 --output-format=parseable --reports=n --msg-template='{path}:{module}:{line}: [{msg_id}({symbol}), {obj}] {msg}' | tee ../lint/pylint.log"><pre class="notranslate"><span class="pl-s1">cd</span> <span class="pl-s1">test</span>
. ..<span class="pl-c1">/</span><span class="pl-s1">virtualenv</span><span class="pl-c1">/</span><span class="pl-s1">bin</span><span class="pl-c1">/</span><span class="pl-s1">activate</span>
<span class="pl-s1">export</span> <span class="pl-v">PYTHONPATH</span><span class="pl-c1">=</span>$<span class="pl-v">PYTHONPATH</span>:<span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">circleci</span><span class="pl-c1">/</span><span class="pl-s1">airflow</span><span class="pl-c1">-</span><span class="pl-s1">build</span><span class="pl-c1">/</span>
<span class="pl-s1">airflow</span> <span class="pl-s1">db</span> <span class="pl-s1">init</span>
<span class="pl-s1">pytest</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">junitxml</span> <span class="pl-s1">pytest</span><span class="pl-c1">-</span><span class="pl-s1">result</span>.<span class="pl-s1">xml</span>
<span class="pl-s1">mkdir</span> ..<span class="pl-c1">/</span><span class="pl-s1">lint</span>
<span class="pl-s1">cd</span> ..<span class="pl-c1">/</span><span class="pl-s1">li_airflow_common</span>
<span class="pl-s1">find</span> . <span class="pl-c1">-</span><span class="pl-s1">iname</span> <span class="pl-s">'*.py'</span> <span class="pl-c1">|</span> <span class="pl-s1">sort</span> <span class="pl-c1">|</span> <span class="pl-s1">xargs</span> <span class="pl-s1">pylint</span> <span class="pl-c1">-</span><span class="pl-s1">j0</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">output</span><span class="pl-c1">-</span><span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s1">parseable</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">reports</span><span class="pl-c1">=</span><span class="pl-s1">n</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">msg</span><span class="pl-c1">-</span><span class="pl-s1">template</span><span class="pl-c1">=</span><span class="pl-s">'{path}:{module}:{line}: [{msg_id}({symbol}), {obj}] {msg}'</span> <span class="pl-c1">|</span> <span class="pl-s1">tee</span> ..<span class="pl-c1">/</span><span class="pl-s1">lint</span><span class="pl-c1">/</span><span class="pl-s1">pylint</span>.<span class="pl-s1">log</span></pre></div>
<p dir="auto">As you can see, this will init a "local" airflow with SQLlite database. Recently we found that our builds that previously passed, fail with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="DB: sqlite:////home/circleci/airflow/airflow.db
[2021-04-06 10:59:56,801] {db.py:674} INFO - Creating tables
/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'DagRun.serialized_dag' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'SerializedDagModel.dag_runs' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
  File &quot;/home/circleci/airflow-build/virtualenv/bin/airflow&quot;, line 8, in &lt;module&gt;
    sys.exit(main())
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/__main__.py&quot;, line 40, in main
    args.func(args)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/cli/cli_parser.py&quot;, line 48, in command
    return func(*args, **kwargs)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/cli/commands/db_command.py&quot;, line 31, in initdb
    db.initdb()
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/utils/db.py&quot;, line 549, in initdb
    upgradedb()
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/utils/db.py&quot;, line 684, in upgradedb
    command.upgrade(config, 'heads')
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/command.py&quot;, line 298, in upgrade
    script.run_env()
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/base.py&quot;, line 489, in run_env
    util.load_python_file(self.dir, &quot;env.py&quot;)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/pyfiles.py&quot;, line 98, in load_python_file
    module = load_module_py(module_id, path)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/compat.py&quot;, line 184, in load_module_py
    spec.loader.exec_module(module)
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/migrations/env.py&quot;, line 108, in &lt;module&gt;
    run_migrations_online()
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/migrations/env.py&quot;, line 102, in run_migrations_online
    context.run_migrations()
  File &quot;&lt;string&gt;&quot;, line 8, in run_migrations
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/runtime/environment.py&quot;, line 846, in run_migrations
    self.get_context().run_migrations(**kw)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/runtime/migration.py&quot;, line 511, in run_migrations
    for step in self._migrations_fn(heads, self):
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/command.py&quot;, line 287, in upgrade
    return script._upgrade_revs(revision, rev)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/base.py&quot;, line 364, in _upgrade_revs
    revs = list(revs)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 777, in _iterate_revisions
    uppers = util.dedupe_tuple(self.get_revisions(upper))
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 321, in get_revisions
    resolved_id, branch_label = self._resolve_revision_number(id_)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 501, in _resolve_revision_number
    self._revision_map
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/langhelpers.py&quot;, line 230, in __get__
    obj.__dict__[self.__name__] = result = self.fget(obj)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/revision.py&quot;, line 123, in _revision_map
    for revision in self._generator():
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/base.py&quot;, line 112, in _load_revisions
    script = Script._from_filename(self, vers, file_)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/base.py&quot;, line 906, in _from_filename
    module = util.load_python_file(dir_, filename)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/pyfiles.py&quot;, line 98, in load_python_file
    module = load_module_py(module_id, path)
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/compat.py&quot;, line 184, in load_module_py
    spec.loader.exec_module(module)
  File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 728, in exec_module
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 219, in _call_with_frames_removed
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py&quot;, line 29, in &lt;module&gt;
    from airflow.www.app import create_app
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/www/app.py&quot;, line 38, in &lt;module&gt;
    from airflow.www.extensions.init_views import (
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/www/extensions/init_views.py&quot;, line 29, in &lt;module&gt;
    from airflow.www.views import lazy_add_provider_discovered_options_to_connection_form
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/www/views.py&quot;, line 96, in &lt;module&gt;
    from airflow.www import auth, utils as wwwutils
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/www/utils.py&quot;, line 27, in &lt;module&gt;
    from flask_appbuilder.models.sqla.interface import SQLAInterface
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py&quot;, line 16, in &lt;module&gt;
    from sqlalchemy_utils.types.uuid import UUIDType
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py&quot;, line 1, in &lt;module&gt;
    from .aggregates import aggregated  # noqa
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py&quot;, line 372, in &lt;module&gt;
    from .functions.orm import get_column_key
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py&quot;, line 1, in &lt;module&gt;
    from .database import (  # noqa
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py&quot;, line 11, in &lt;module&gt;
    from .orm import quote
  File &quot;/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py&quot;, line 14, in &lt;module&gt;
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy/orm/query.py)"><pre class="notranslate"><code class="notranslate">DB: sqlite:////home/circleci/airflow/airflow.db
[2021-04-06 10:59:56,801] {db.py:674} INFO - Creating tables
/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'DagRun.serialized_dag' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy/orm/relationships.py:3463 SAWarning: relationship 'SerializedDagModel.dag_runs' will copy column serialized_dag.dag_id to column dag_run.dag_id, which conflicts with relationship(s): 'TaskInstance.dag_run' (copies task_instance.dag_id to dag_run.dag_id), 'DagRun.task_instances' (copies task_instance.dag_id to dag_run.dag_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards.   The 'overlaps' parameter may be used to remove this warning. (Background on this error at: http://sqlalche.me/e/14/qzyx)
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
  File "/home/circleci/airflow-build/virtualenv/bin/airflow", line 8, in &lt;module&gt;
    sys.exit(main())
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/__main__.py", line 40, in main
    args.func(args)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/cli/cli_parser.py", line 48, in command
    return func(*args, **kwargs)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/cli/commands/db_command.py", line 31, in initdb
    db.initdb()
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/utils/db.py", line 549, in initdb
    upgradedb()
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/utils/db.py", line 684, in upgradedb
    command.upgrade(config, 'heads')
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/command.py", line 298, in upgrade
    script.run_env()
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/base.py", line 489, in run_env
    util.load_python_file(self.dir, "env.py")
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
    module = load_module_py(module_id, path)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/compat.py", line 184, in load_module_py
    spec.loader.exec_module(module)
  File "&lt;frozen importlib._bootstrap_external&gt;", line 728, in exec_module
  File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/migrations/env.py", line 108, in &lt;module&gt;
    run_migrations_online()
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/migrations/env.py", line 102, in run_migrations_online
    context.run_migrations()
  File "&lt;string&gt;", line 8, in run_migrations
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/runtime/environment.py", line 846, in run_migrations
    self.get_context().run_migrations(**kw)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/runtime/migration.py", line 511, in run_migrations
    for step in self._migrations_fn(heads, self):
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/command.py", line 287, in upgrade
    return script._upgrade_revs(revision, rev)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/base.py", line 364, in _upgrade_revs
    revs = list(revs)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/revision.py", line 777, in _iterate_revisions
    uppers = util.dedupe_tuple(self.get_revisions(upper))
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/revision.py", line 321, in get_revisions
    resolved_id, branch_label = self._resolve_revision_number(id_)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/revision.py", line 501, in _resolve_revision_number
    self._revision_map
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/langhelpers.py", line 230, in __get__
    obj.__dict__[self.__name__] = result = self.fget(obj)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/revision.py", line 123, in _revision_map
    for revision in self._generator():
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/base.py", line 112, in _load_revisions
    script = Script._from_filename(self, vers, file_)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/script/base.py", line 906, in _from_filename
    module = util.load_python_file(dir_, filename)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
    module = load_module_py(module_id, path)
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/alembic/util/compat.py", line 184, in load_module_py
    spec.loader.exec_module(module)
  File "&lt;frozen importlib._bootstrap_external&gt;", line 728, in exec_module
  File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/migrations/versions/2c6edca13270_resource_based_permissions.py", line 29, in &lt;module&gt;
    from airflow.www.app import create_app
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/www/app.py", line 38, in &lt;module&gt;
    from airflow.www.extensions.init_views import (
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/www/extensions/init_views.py", line 29, in &lt;module&gt;
    from airflow.www.views import lazy_add_provider_discovered_options_to_connection_form
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/www/views.py", line 96, in &lt;module&gt;
    from airflow.www import auth, utils as wwwutils
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/airflow/www/utils.py", line 27, in &lt;module&gt;
    from flask_appbuilder.models.sqla.interface import SQLAInterface
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/flask_appbuilder/models/sqla/interface.py", line 16, in &lt;module&gt;
    from sqlalchemy_utils.types.uuid import UUIDType
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/__init__.py", line 1, in &lt;module&gt;
    from .aggregates import aggregated  # noqa
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/aggregates.py", line 372, in &lt;module&gt;
    from .functions.orm import get_column_key
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/functions/__init__.py", line 1, in &lt;module&gt;
    from .database import (  # noqa
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/functions/database.py", line 11, in &lt;module&gt;
    from .orm import quote
  File "/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy_utils/functions/orm.py", line 14, in &lt;module&gt;
    from sqlalchemy.orm.query import _ColumnEntity
ImportError: cannot import name '_ColumnEntity' from 'sqlalchemy.orm.query' (/home/circleci/airflow-build/virtualenv/lib/python3.7/site-packages/sqlalchemy/orm/query.py)
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>: Builds pass with only airflow dependencies specified in <code class="notranslate">requirements.txt</code>. Quick googling points here <a href="https://stackoverflow.com/questions/66644975/importerror-cannot-import-name-columnentity-from-sqlalchemy-orm-query" rel="nofollow">https://stackoverflow.com/questions/66644975/importerror-cannot-import-name-columnentity-from-sqlalchemy-orm-query</a></p>
<p dir="auto"><strong>How to reproduce it</strong>: Init a virtual env with <code class="notranslate">requirements.txt</code> contents from above</p>
<p dir="auto"><strong>Anything else we need to know</strong>: This is fixed by adding <code class="notranslate">sqlalchemy &lt; 1.4.0</code> to the <code class="notranslate">requirements.txt</code>. However, I feel this is more of a quick hack rather than a proper fix. I would expect <code class="notranslate">apache-airflow</code> to correctly reference its dependencies, so no amendments to imported versions are required</p>
<p dir="auto"><strong>Apache Airflow version</strong>: 1.10.12</p>
<p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>: Local PC</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Ubuntu 20.04</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): 5.4.0-56-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="90217418" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/62" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/62/hovercard" href="https://github.com/apache/airflow/pull/62">#62</a>-Ubuntu SMP</li>
<li><strong>Install tools</strong>: docker-compose using <a href="https://github.com/puckel/docker-airflow">https://github.com/puckel/docker-airflow</a></li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:</p>
<p dir="auto">Webserver will not start due to airflow error: ImportError: cannot import name 'resolve_types' from 'attr' (/usr/local/lib/python3.7/site-packages/attr/<strong>init</strong>.py)</p>
<p dir="auto"><strong>What you expected to happen</strong>:</p>
<p dir="auto">Webserver start to test dags locally</p>
<p dir="auto"><strong>How to reproduce it</strong>:</p>
<p dir="auto">Use the docker-compose container above <a href="https://github.com/puckel/docker-airflow.git">https://github.com/puckel/docker-airflow.git</a><br>
Ubuntu 20.04<br>
Run docker-compose up</p>
<p dir="auto">Error occurs every single time.</p>
<p dir="auto">Things already tried:</p>
<p dir="auto">Modified dockerfile to include constraints for Python 3.7 container: --constraint "<a href="https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt" rel="nofollow">https://raw.githubusercontent.com/apache/airflow/constraints-1.10.12/constraints-3.7.txt</a>"</p>
<p dir="auto">Added cattrs==1.0.0</p>
<p dir="auto">Downgraded pip==20.2.4</p>
<p dir="auto">Added attrs</p>
<p dir="auto">None of the above suggestions are working. Anyone able to reproduce this and help solve?</p>