This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v2-9-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit bff9da8a8107c73192206ab7b42762253855cb04
Author: HTErik <[email protected]>
AuthorDate: Fri May 17 15:18:54 2024 +0200

    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 <[email protected]>
    (cherry picked from commit 8b19b78ba50835423a5385a64c31a0e950548147)
---
 docs/apache-airflow/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 289245eff4..fcdd79028d 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 ebff77ea37..1e73b76d37 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -1274,6 +1274,7 @@ pymysql
 pyodbc
 pypa
 PyPI
+pyproject
 pypsrp
 pyspark
 pytest
@@ -1641,6 +1642,7 @@ todo
 tokenization
 tokopedia
 tolerations
+toml
 toolchain
 Tooltip
 tooltip

Reply via email to