Skip to content

Commit

Permalink
Update plugins.rst examples to use pyproject.toml over setup.py (apac…
Browse files Browse the repository at this point in the history
…he#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.Anshin@taragol.is>
  • Loading branch information
2 people authored and romsharon98 committed Jul 26, 2024
1 parent 5df991e commit 45df809
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 4 additions & 7 deletions docs/apache-airflow/authoring-and-scheduling/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------------------
Expand Down
2 changes: 2 additions & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1279,6 +1279,7 @@ pymysql
pyodbc
pypa
PyPI
pyproject
pypsrp
pyspark
pytest
Expand Down Expand Up @@ -1655,6 +1656,7 @@ todo
tokenization
tokopedia
tolerations
toml
toolchain
Tooltip
tooltip
Expand Down

0 comments on commit 45df809

Please sign in to comment.