Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-5430

airflow initdb is broken on py2 and py3.5 due to transitive dependency

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.10.5
    • Fix Version/s: 1.10.6
    • Component/s: cli, core, database, dependencies
    • Labels:
      None

      Description

      marshmallow-sqlalchemy broke py2 and py3.5 compatibility in their 0.19.0 release.

       

      Flask-AppBuilder's transitive dependency on marshmallow-sqlalchemy breaks all new installs of Airflow 1.10.0 and higher on py2 and py3.5 with one of the following syntax errors when running airflow initdb:

       

      Traceback (most recent call last):
      File "/workdir/python_modules/dagster-airflow/.tox/py35/bin/airflow", line 22, in <module>
      from airflow.bin.cli import CLIFactory
      File "/workdir/python_modules/dagster-airflow/.tox/py35/lib/python3.5/site-packages/airflow/bin/cli.py", line 68, in <module>
      from airflow.www_rbac.app import cached_app as cached_app_rbac
      File "/workdir/python_modules/dagster-airflow/.tox/py35/lib/python3.5/site-packages/airflow/www_rbac/app.py", line 26, in <module>
      from flask_appbuilder import AppBuilder, SQLA
      File "/workdir/python_modules/dagster-airflow/.tox/py35/lib/python3.5/site-packages/flask_appbuilder/_init_.py", line 5, in <module>
      from .base import AppBuilder
      File "/workdir/python_modules/dagster-airflow/.tox/py35/lib/python3.5/site-packages/flask_appbuilder/base.py", line 5, in <module>
      from .api.manager import OpenApiManager
      File "/workdir/python_modules/dagster-airflow/.tox/py35/lib/python3.5/site-packages/flask_appbuilder/api/_init_.py", line 11, in <module>
      from marshmallow_sqlalchemy.fields import Related, RelatedList
      File "/workdir/python_modules/dagster-airflow/.tox/py35/lib/python3.5/site-packages/marshmallow_sqlalchemy/_init_.py", line 1, in <module>
      from .schema import TableSchemaOpts, ModelSchemaOpts, TableSchema, ModelSchema
      File "/workdir/python_modules/dagster-airflow/.tox/py35/lib/python3.5/site-packages/marshmallow_sqlalchemy/schema.py", line 3, in <module>
      from .convert import ModelConverter
      File "/workdir/python_modules/dagster-airflow/.tox/py35/lib/python3.5/site-packages/marshmallow_sqlalchemy/convert.py", line 80
      ):
      ^
      SyntaxError: invalid syntax

       

      Traceback (most recent call last):
      File "/workdir/python_modules/dagster-airflow/.tox/py27/bin/airflow", line 22, in <module>
      from airflow.bin.cli import CLIFactory
      File "/workdir/python_modules/dagster-airflow/.tox/py27/lib/python2.7/site-packages/airflow/bin/cli.py", line 68, in <module>
      from airflow.www_rbac.app import cached_app as cached_app_rbac
      File "/workdir/python_modules/dagster-airflow/.tox/py27/lib/python2.7/site-packages/airflow/www_rbac/app.py", line 26, in <module>
      from flask_appbuilder import AppBuilder, SQLA
      File "/workdir/python_modules/dagster-airflow/.tox/py27/lib/python2.7/site-packages/flask_appbuilder/_init_.py", line 5, in <module>
      from .base import AppBuilder
      File "/workdir/python_modules/dagster-airflow/.tox/py27/lib/python2.7/site-packages/flask_appbuilder/base.py", line 5, in <module>
      from .api.manager import OpenApiManager
      File "/workdir/python_modules/dagster-airflow/.tox/py27/lib/python2.7/site-packages/flask_appbuilder/api/_init_.py", line 11, in <module>
      from marshmallow_sqlalchemy.fields import Related, RelatedList
      File "/workdir/python_modules/dagster-airflow/.tox/py27/lib/python2.7/site-packages/marshmallow_sqlalchemy/_init_.py", line 1, in <module>
      from .schema import TableSchemaOpts, ModelSchemaOpts, TableSchema, ModelSchema
      File "/workdir/python_modules/dagster-airflow/.tox/py27/lib/python2.7/site-packages/marshmallow_sqlalchemy/schema.py", line 101
      class TableSchema(ma.Schema, metaclass=TableSchemaMeta):
      ^
      SyntaxError: invalid syntax

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mgasner Max Gasner
                Reporter:
                mgasner Max Gasner
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: