diff --git a/changelog/10721.doc.rst b/changelog/10721.doc.rst new file mode 100644 index 00000000000..3d8fbfcbdba --- /dev/null +++ b/changelog/10721.doc.rst @@ -0,0 +1,13 @@ +replace +```[project.entry_points] +pytest11 = [ + "myproject = myproject.pluginmodule", +]``` +with +``` +[project.entry-points.pytest11] +myproject = "myproject.pluginmodule"``` + +also,remove +```[tool.setuptools] +packages = ["myproject"]``` diff --git a/doc/en/how-to/writing_plugins.rst b/doc/en/how-to/writing_plugins.rst index f15b69c2317..4eee1b2e120 100644 --- a/doc/en/how-to/writing_plugins.rst +++ b/doc/en/how-to/writing_plugins.rst @@ -167,13 +167,8 @@ it in your ``pyproject.toml`` file. "Framework :: Pytest", ] - [tool.setuptools] - packages = ["myproject"] - - [project.entry_points] - pytest11 = [ - "myproject = myproject.pluginmodule", - ] + [project.entry-points.pytest11] + myproject = "myproject.pluginmodule" If a package is installed this way, ``pytest`` will load ``myproject.pluginmodule`` as a plugin which can define