Skip to content

Commit c14aed3

Browse files
Warn about unsupported Python 3.10 (#19060)
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
1 parent 55eb525 commit c14aed3

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ MariaDB is not tested/recommended.
9898
**Note**: SQLite is used in Airflow tests. Do not use it in production. We recommend
9999
using the latest stable version of SQLite for local development.
100100

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

103105
Visit the official Airflow website documentation (latest **stable** release) for help with

airflow/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
__version__ = version.version
3838

39-
__all__ = ['__version__', 'login', 'DAG', 'PY36', 'PY37', 'PY38', 'PY39']
39+
__all__ = ['__version__', 'login', 'DAG', 'PY36', 'PY37', 'PY38', 'PY39', 'PY310']
4040

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

5556

5657
def __getattr__(name):

airflow/__main__.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,28 @@
1919
# under the License.
2020

2121
"""Main executable module"""
22-
2322
import os
23+
import warnings
2424

2525
import argcomplete
2626

27+
from airflow import PY310
2728
from airflow.cli import cli_parser
2829
from airflow.configuration import conf
30+
from airflow.utils.docs import get_docs_url
2931

3032

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

3745
parser = cli_parser.get_parser()
3846
argcomplete.autocomplete(parser)

docs/apache-airflow/installation/prerequisites.rst

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ running multiple schedulers -- please see: :doc:`/concepts/scheduler`. MariaDB i
3737
**Note:** SQLite is used in Airflow tests. Do not use it in production. We recommend
3838
using the latest stable version of SQLite for local development.
3939

40+
**Note**: Python v3.10 is not supported yet. For details, see `#19059 <https://github.com/apache/airflow/issues/19059>`__.
41+
4042
Starting with Airflow 2.1.2, Airflow is tested with Python 3.6, 3.7, 3.8, and 3.9.
4143

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

0 commit comments

Comments
 (0)