Skip to content

Minimum Python requirement should be at least 3.5.3 on PyPi due to dependencies #8162

Closed
@belidzs

Description

Apache Airflow version: 1.10.9

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

Environment: python 3.5.2

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release): Ubuntu 16.04.6 LTS
  • Kernel (e.g. uname -a): Linux ubuntu-1604-staging.lan 4.4.0-176-generic Add docstrings to DAG class methods #206-Ubuntu SMP Fri Feb 28 05:02:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: pip 8.1.1
  • Others:

What happened:

I have installed apache-airflow[postgres] using the distribution-provided pip installer into a virtualenv which was successful. However, after running airflow or airflow initdb I get the following exception:

Traceback (most recent call last):
  File "/home/belidzs/venv/bin/airflow", line 25, in <module>
    from airflow.configuration import conf
  File "/home/belidzs/venv/lib/python3.5/site-packages/airflow/__init__.py", line 42, in <module>
    from airflow.models import DAG
  File "/home/belidzs/venv/lib/python3.5/site-packages/airflow/models/__init__.py", line 21, in <module>
    from airflow.models.baseoperator import BaseOperator, BaseOperatorLink  # noqa: F401
  File "/home/belidzs/venv/lib/python3.5/site-packages/airflow/models/baseoperator.py", line 30, in <module>
    from typing import Any, Callable, ClassVar, Dict, FrozenSet, Iterable, List, Optional, Set, Type, Union
ImportError: cannot import name 'ClassVar'

The exception is caused by depending on typing.ClassVar which was only introduced in python 3.5.3

Currently the package definition on pypi doesn't set a requirement of >=3.5.3 which it should.

What you expected to happen:

  • pip should inform me that my environment is not appropriate to install the package and decline installation
  • airflow documentation should include a section of the minimal requirements

How to reproduce it:
Install airflow with pip install apache-airflow on Python 3.5.2 then run airflow

Anything else we need to know:

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions