diff options
author | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-06-12 16:02:35 +0530 |
---|---|---|
committer | Saniya Maheshwari <saniya.mah@gmail.com> | 2022-06-12 16:06:53 +0530 |
commit | c2df0f6a53100c8fbb2f31830809560caec921c8 (patch) | |
tree | c735fb31a9c2cf5dcd3df65652b3d269368e47e9 /docs/userguide | |
parent | 8ff959675e9ea519febb61de477f047302170d94 (diff) | |
download | python-setuptools-git-c2df0f6a53100c8fbb2f31830809560caec921c8.tar.gz |
Fix up subsections of the "Entry Points for Plugins" section
- Convert the `importlib.metadata` subsection into a Tip.
- Remove the 'Summary' subsection header.
Diffstat (limited to 'docs/userguide')
-rw-r--r-- | docs/userguide/entry_point.rst | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst index 28ae3dfe..b7dd7aa9 100644 --- a/docs/userguide/entry_point.rst +++ b/docs/userguide/entry_point.rst @@ -481,23 +481,18 @@ where entry points can only refer to functions. The syntax used for specifying t entry points remains the same as for console/GUI scripts, and is discussed in the `last section <#entry-points-syntax>`_. -importlib.metadata ------------------- +.. tip:: + The recommended approach for loading and importing entry points is the + :mod:`importlib.metadata` module, + which is a part of the standard library since Python 3.8. For older versions of + Python, its backport :pypi:`importlib_metadata` should be used. While using the + backport, the only change that has to be made is to replace ``importlib.metadata`` + with ``importlib_metadata``, i.e. -The recommended approach for loading and importing entry points is the -:mod:`importlib.metadata` module, -which is a part of the standard library since Python 3.8. For older versions of -Python, its backport :pypi:`importlib_metadata` should be used. While using the -backport, the only change that has to be made is to replace ``importlib.metadata`` -with ``importlib_metadata``, i.e. - -.. code-block:: python - - from importlib_metadata import entry_points - ... + .. code-block:: python -Summary -------- + from importlib_metadata import entry_points + ... In summary, entry points allow a package to open its functionalities for customization via plugins. |