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

taragolis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 8b19b78ba5 Update plugins.rst examples to use pyproject.toml over 
setup.py (#39665)
8b19b78ba5 is described below

commit 8b19b78ba50835423a5385a64c31a0e950548147
Author: HTErik <89977373+hte...@users.noreply.github.com>
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 <andrey.ans...@taragol.is>
---
 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 1c35408c09..06400ac0c3 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

Reply via email to