Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 17.5k
Add Python 3.13 support for Airflow.#46891
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Diff view
Diff view
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -35,7 +35,12 @@ name = "apache-airflow-core" | ||
| description = "Core packages for Apache Airflow, schedule and API server" | ||
| readme = { file = "README.md", content-type = "text/markdown" } | ||
| license-files.globs = ["LICENSE", "3rd-party-licenses/*.txt", "NOTICE"] | ||
| requires-python = ">=3.10,!=3.13" | ||
| # We know that it will take a while before we can support Python 3.14 because of all our dependencies | ||
| # It takes about 4-7 months after Python release before we can support it, so we limit it to <3.14 | ||
| # proactively. This way we also have a chance to test it with Python 3.14 and bump the upper binding | ||
| # and manually mark providers that do not support it yet with !-3.14 - until they support it - which will | ||
| # also exclude resolving uv workspace dependencies for those providers. | ||
| requires-python = ">=3.10,<3.14" | ||
| authors = [ | ||
| { name = "Apache Software Foundation", email = "dev@airflow.apache.org" }, | ||
| ] | ||
| @@ -80,14 +85,15 @@ dependencies = [ | ||
| # 0.115.10 fastapi was a bad release that broke our API's and static checks. | ||
| # Related fastapi issue here: https://github.com/fastapi/fastapi/discussions/13431 | ||
| "fastapi[standard]>=0.115.0,!=0.115.10", | ||
| "starlette>=0.45.0", | ||
| "httpx>=0.25.0", | ||
| 'importlib_metadata>=6.5;python_version<"3.12"', | ||
| 'importlib_metadata>=7.0;python_version>="3.12"', | ||
| "itsdangerous>=2.0", | ||
| "jinja2>=3.1.5", | ||
| "jsonschema>=4.19.1", | ||
| "lazy-object-proxy>=1.2.0", | ||
| 'libcst >=1.1.0', | ||
| 'libcst >=1.8.2', | ||
| "linkify-it-py>=2.0.0", | ||
| "lockfile>=0.12.2", | ||
| "methodtools>=0.4.7", | ||
| @@ -102,11 +108,10 @@ dependencies = [ | ||
| # dependency and should be resolved as early as possible. | ||
| # This may be removed when future versions of pip are able | ||
| # to handle this dependency resolution automatically. | ||
| "opentelemetry-proto<9999", | ||
| "opentelemetry-proto<9999,>=1.27.0", | ||
| "packaging>=25.0", | ||
| "pathspec>=0.9.0", | ||
| 'pendulum>=2.1.2,<4.0;python_version<"3.12"', | ||
| 'pendulum>=3.0.0,<4.0;python_version>="3.12"', | ||
| 'pendulum>=3.1.0', | ||
| "pluggy>=1.5.0", | ||
| "psutil>=5.8.0", | ||
| "pydantic>=2.11.0", | ||
| @@ -133,9 +138,7 @@ dependencies = [ | ||
| "tabulate>=0.9.0", | ||
| "tenacity>=8.3.0", | ||
| "termcolor>=3.0.0", | ||
| # temporarily exclude 4.14.0 due to its broken compat with cadwyn | ||
| # See https://github.com/zmievsa/cadwyn/issues/283 | ||
| "typing-extensions!=4.14.0", | ||
| "typing-extensions>=4.14.1", | ||
potiuk marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| # Universal Pathlib 0.2.4 adds extra validation for Paths and our integration with local file paths | ||
| # Does not work with it Tracked in https://github.com/fsspec/universal_pathlib/issues/276 | ||
| "universal-pathlib>=0.2.2,!=0.2.4", | ||
| @@ -153,14 +156,14 @@ dependencies = [ | ||
| [project.optional-dependencies] | ||
| "async" = [ | ||
| "eventlet>=0.37.0", | ||
| "gevent>=24.2.1", | ||
| "greenlet>=0.4.9", | ||
| "gevent>=25.4.1", | ||
| "greenlet>=3.1.0", | ||
| ] | ||
| "graphviz" = [ | ||
| # The graphviz package creates friction when installing on MacOS as it needs graphviz system package to | ||
| # be installed, and it's really only used for very obscure features of Airflow, so we can skip it on MacOS | ||
| # Instead, if someone attempts to use it on MacOS, they will get explanatory error on how to install it | ||
| "graphviz>=0.12; sys_platform != 'darwin'", | ||
| "graphviz>=0.20; sys_platform != 'darwin'", | ||
| ] | ||
| "kerberos" = [ | ||
| "pykerberos>=1.1.13", | ||
| @@ -172,9 +175,8 @@ dependencies = [ | ||
| ] | ||
| "sentry" = [ | ||
| "blinker>=1.1", | ||
| # Sentry SDK 1.33 is broken when greenlets are installed and fails to import | ||
| # See https://github.com/getsentry/sentry-python/issues/2473 | ||
| "sentry-sdk>=1.32.0,!=1.33.0", | ||
| # Apparently sentry needs flask to be installed to work properly | ||
| "sentry-sdk[flask]>=2.30.0", | ||
| ] | ||
| "statsd" = [ | ||
| "statsd>=3.3.0", | ||
| @@ -199,7 +201,6 @@ Mastodon = "https://fosstodon.org/@airflow" | ||
| Bluesky = "https://bsky.app/profile/apache-airflow.bsky.social" | ||
| YouTube = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/" | ||
| [tool.hatch.version] | ||
| path = "src/airflow/__init__.py" | ||
| @@ -249,7 +250,7 @@ dev = [ | ||
| "apache-airflow-providers-amazon", | ||
| "apache-airflow-providers-celery", | ||
| "apache-airflow-providers-cncf-kubernetes", | ||
| "apache-airflow-providers-fab", | ||
| "apache-airflow-providers-fab>=2.2.0; python_version < '3.13'", | ||
| "apache-airflow-providers-git", | ||
| "apache-airflow-providers-ftp", | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -18,6 +18,7 @@ | ||
| import logging | ||
| import os | ||
| import sys | ||
| import warnings | ||
| from pathlib import Path | ||
| @@ -35,6 +36,8 @@ | ||
| log = logging.getLogger(__name__) | ||
| PY313 = sys.version_info >= (3, 13) | ||
| def init_views(app: FastAPI) -> None: | ||
| """Init views by registering the different routers.""" | ||
| @@ -124,6 +127,13 @@ def init_flask_plugins(app: FastAPI) -> None: | ||
| try: | ||
| from airflow.providers.fab.www.app import create_app | ||
| except ImportError: | ||
| if PY313: | ||
| log.info( | ||
potiuk marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| "Some Airflow 2 plugins have been detected in your environment. Currently FAB provider " | ||
| "does not support Python 3.13, so you cannot use Airflow 2 plugins with Airflow 3 until " | ||
| "FAB provider will be Python 3.13 compatible." | ||
| ) | ||
| return | ||
potiuk marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| raise AirflowException( | ||
| "Some Airflow 2 plugins have been detected in your environment. " | ||
| "To run them with Airflow 3, you must install the FAB provider in your Airflow environment." | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.