From 5df768c7fd02468b2cd8fe08395dcde1db41de28 Mon Sep 17 00:00:00 2001 From: Atiqur Rahman Date: Fri, 31 Jul 2026 19:38:09 +0600 Subject: [PATCH 1/2] doc: add pyproject.toml entry-point example to plugin documentation (fixes #10721) --- doc/en/how-to/writing_plugins.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/en/how-to/writing_plugins.rst b/doc/en/how-to/writing_plugins.rst index 17823098d0c..55df2e270f5 100644 --- a/doc/en/how-to/writing_plugins.rst +++ b/doc/en/how-to/writing_plugins.rst @@ -215,7 +215,14 @@ as plugins. As an example consider the following package:: pytest_foo/plugin.py pytest_foo/helper.py -With the following typical ``setup.py`` extract: +With the following typical ``pyproject.toml`` extract: + +.. code-block:: toml + + [project.entry-points.pytest11] + foo = "pytest_foo.plugin" + +Or with a legacy ``setup.py`` extract: .. code-block:: python From b9da513155f50f878a004fc0cc34eaad82d1aabc Mon Sep 17 00:00:00 2001 From: Atiqur Rahman Date: Fri, 31 Jul 2026 20:29:37 +0600 Subject: [PATCH 2/2] changelog: add entry fragment for #10721 --- changelog/10721.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/10721.doc.rst diff --git a/changelog/10721.doc.rst b/changelog/10721.doc.rst new file mode 100644 index 00000000000..8b8fecf1546 --- /dev/null +++ b/changelog/10721.doc.rst @@ -0,0 +1 @@ +Document PEP 621 ``pyproject.toml`` entry point format for ``pytest11`` plugins in plugin writing guide.