Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about unsupported Python 3.10 #19060

Merged
merged 4 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
mik-laj marked this conversation as resolved.
Show resolved Hide resolved

## 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>`__
mik-laj marked this conversation as resolved.
Show resolved Hide resolved

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