Skip to content

Commit

Permalink
Warn about unsupported Python 3.10 (apache#19060)
Browse files Browse the repository at this point in the history
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
  • Loading branch information
2 people authored and sharon2719 committed Oct 27, 2021
1 parent 4290095 commit 4b9caeb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ MariaDB is not tested/recommended.
**Note**: SQLite is used in Airflow tests. Do not use it in production. We recommend
using the latest stable version of SQLite for local development.

**Note**: Python v3.10 is not supported yet. For details, see [#19059](https://github.com/apache/airflow/issues/19059).

## Getting started

Visit the official Airflow website documentation (latest **stable** release) for help with
Expand Down
3 changes: 2 additions & 1 deletion airflow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

__version__ = version.version

__all__ = ['__version__', 'login', 'DAG', 'PY36', 'PY37', 'PY38', 'PY39']
__all__ = ['__version__', 'login', 'DAG', 'PY36', 'PY37', 'PY38', 'PY39', 'PY310']

# Make `airflow` an namespace package, supporting installing
# airflow.providers.* in different locations (i.e. one in site, and one in user
Expand All @@ -51,6 +51,7 @@
PY37 = sys.version_info >= (3, 7)
PY38 = sys.version_info >= (3, 8)
PY39 = sys.version_info >= (3, 9)
PY310 = sys.version_info >= (3, 10)


def __getattr__(name):
Expand Down
10 changes: 9 additions & 1 deletion airflow/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,28 @@
# under the License.

"""Main executable module"""

import os
import warnings

import argcomplete

from airflow import PY310
from airflow.cli import cli_parser
from airflow.configuration import conf
from airflow.utils.docs import get_docs_url


def main():
"""Main executable function"""
if conf.get("core", "security") == 'kerberos':
os.environ['KRB5CCNAME'] = conf.get('kerberos', 'ccache')
os.environ['KRB5_KTNAME'] = conf.get('kerberos', 'keytab')
if PY310:
docs_url = get_docs_url('installation/prerequisites.html')
warnings.warn(
"Python v3.10 is not official supported on this version of Airflow. Please be careful. "
f"For details, see: {docs_url}"
)

parser = cli_parser.get_parser()
argcomplete.autocomplete(parser)
Expand Down
2 changes: 2 additions & 0 deletions docs/apache-airflow/installation/prerequisites.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ running multiple schedulers -- please see: :doc:`/concepts/scheduler`. MariaDB i
**Note:** SQLite is used in Airflow tests. Do not use it in production. We recommend
using the latest stable version of SQLite for local development.

**Note**: Python v3.10 is not supported yet. For details, see `#19059 <https://github.com/apache/airflow/issues/19059>`__.

Starting with Airflow 2.1.2, Airflow is tested with Python 3.6, 3.7, 3.8, and 3.9.

The minimum memory required we recommend Airflow to run with is 4GB, but the actual requirements depends
Expand Down

0 comments on commit 4b9caeb

Please sign in to comment.