Skip to content

Fix description of entry points mechanism#888

Merged
webknjaz merged 4 commits intopypa:mainfrom
ashwinvis:fix/entrypoints-mech
May 6, 2021
Merged

Fix description of entry points mechanism#888
webknjaz merged 4 commits intopypa:mainfrom
ashwinvis:fix/entrypoints-mech

Conversation

@ashwinvis
Copy link
Copy Markdown
Contributor

@ashwinvis ashwinvis commented May 6, 2021

  • Show how a module would be loaded. A dictionary of modules will not be loaded, unless created by the user. The example code was corrected.
  • Update links to external documentation
  • Hint that specifying entry points is not limited to setuptools. For example flit and poetry support it too.

Following up on #870 and #879

- Show how a module would be loaded. A dictionary of modules will not be
  loaded, unless created by the user
- Update links to external documentation
- Hint that specifying entry points is not limited setuptools. For
  example flit
  (https://flit.readthedocs.io/en/latest/pyproject_toml.html#entry-points-sections)
  and poetry (https://python-poetry.org/docs/pyproject/#plugins) support
  it too.
Comment thread source/guides/creating-and-discovering-plugins.rst Outdated
Comment thread source/guides/creating-and-discovering-plugins.rst Outdated
Comment thread source/guides/creating-and-discovering-plugins.rst Outdated
Comment thread source/conf.py Outdated
@webknjaz webknjaz enabled auto-merge May 6, 2021 16:53
@webknjaz webknjaz merged commit f6a1cfe into pypa:main May 6, 2021
@ashwinvis
Copy link
Copy Markdown
Contributor Author

Oh no.... you merged it too soon @webknjaz 😅 !

I wanted to add this change:

From d16106c05e1e10f2821da5bdead7dbd5c691aba6 Mon Sep 17 00:00:00 2001
From: Ashwin Vishnu <y4d71nsar@relay.firefox.com>
Date: Thu, 6 May 2021 18:56:29 +0200
Subject: [PATCH] Clarify EntryPoints vs EntryPoint

---
 source/guides/creating-and-discovering-plugins.rst | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/source/guides/creating-and-discovering-plugins.rst b/source/guides/creating-and-discovering-plugins.rst
index 8fe1e41..ebdf876 100644
--- a/source/guides/creating-and-discovering-plugins.rst
+++ b/source/guides/creating-and-discovering-plugins.rst
@@ -151,7 +151,9 @@ Then you can discover and load all of the registered entry points by using
     discovered_plugins = entry_points(group='myapp.plugins')
 
 
-In this example, ``discovered_plugins`` would be a collection of type :class:`importlib.metadata.EntryPoints`:
+In this example, ``discovered_plugins`` would be an
+:class:`importlib.metadata.EntryPoints` object, which is a sequence of all
+``EntryPoint`` objects belonging to the selected group.
 
 .. code-block:: python
 
-- 
2.31.1

@webknjaz webknjaz added the type: enhancement A self-contained enhancement or new feature label May 6, 2021
@webknjaz
Copy link
Copy Markdown
Member

webknjaz commented May 6, 2021

@ashwinvis oh, you can send that in a follow-up PR. Also, if you want to mark a PR as not ready for review, just make it a Draft PR (normally you should be able to switch between draft and normal PR state at any point), or at least mark it as a WIP in the title — this will be a signal for the maintainers to postpone reviewing/merging it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A self-contained enhancement or new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants