From 8b19b78ba50835423a5385a64c31a0e950548147 Mon Sep 17 00:00:00 2001 From: HTErik <89977373+hterik@users.noreply.github.com> Date: Fri, 17 May 2024 15:18:54 +0200 Subject: [PATCH] Update plugins.rst examples to use pyproject.toml over setup.py (#39665) * Update plugins.rst examples to use pyproject.toml over setup.py pyproject.toml is the standard project description moving forward. Airflow has itself adopted this recently. Examples should follow this to ease using the latest standard for plugin authors. https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#is-pyproject-toml-mandatory * Add toml and pyproject into spelling_wordlist.txt --------- Co-authored-by: Andrey Anshin --- .../authoring-and-scheduling/plugins.rst | 11 ++++------- docs/spelling_wordlist.txt | 2 ++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/apache-airflow/authoring-and-scheduling/plugins.rst b/docs/apache-airflow/authoring-and-scheduling/plugins.rst index 289245eff4ee9..fcdd79028de6a 100644 --- a/docs/apache-airflow/authoring-and-scheduling/plugins.rst +++ b/docs/apache-airflow/authoring-and-scheduling/plugins.rst @@ -309,15 +309,12 @@ will automatically load the registered plugins from the entrypoint list. name = "my_namespace" flask_blueprints = [bp] -.. code-block:: python +Then inside pyproject.toml: - from setuptools import setup +.. code-block:: toml - setup( - name="my-package", - # ... - entry_points={"airflow.plugins": ["my_plugin = my_package.my_plugin:MyAirflowPlugin"]}, - ) + [project.entry-points."airflow.plugins"] + my_plugin = "my_package.my_plugin:MyAirflowPlugin" Automatic reloading webserver ----------------------------- diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 1c35408c09d50..06400ac0c3bd4 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -1279,6 +1279,7 @@ pymysql pyodbc pypa PyPI +pyproject pypsrp pyspark pytest @@ -1655,6 +1656,7 @@ todo tokenization tokopedia tolerations +toml toolchain Tooltip tooltip