From 3f766715a4f4fe1e4e1a3795f14dbeab2ffc7d5e Mon Sep 17 00:00:00 2001 From: Garvit Shubham Date: Sat, 11 Feb 2023 23:05:12 +0530 Subject: [PATCH] [Writing plugins] updating doc(#10721) --- changelog/10721.doc.rst | 13 +++++++++++++ doc/en/how-to/writing_plugins.rst | 9 ++------- 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 changelog/10721.doc.rst diff --git a/changelog/10721.doc.rst b/changelog/10721.doc.rst new file mode 100644 index 000000000..3d8fbfcbd --- /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 f15b69c23..4eee1b2e1 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