diff options
Diffstat (limited to 'docs/pkg_resources.rst')
-rw-r--r-- | docs/pkg_resources.rst | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/pkg_resources.rst b/docs/pkg_resources.rst index 364e2183..994bea6f 100644 --- a/docs/pkg_resources.rst +++ b/docs/pkg_resources.rst @@ -10,6 +10,13 @@ eggs, support for merging packages that have separately-distributed modules or subpackages, and APIs for managing Python's current "working set" of active packages. +Use of ``pkg_resources`` is discouraged in favor of +`importlib.resources <https://docs.python.org/3/library/importlib.html#module-importlib.resources>`_, +`importlib.metadata <https://docs.python.org/3/library/importlib.metadata.html>`_, +and their backports (`resources <https://pypi.org/project/importlib_resources>`_, +`metadata <https://pypi.org/project/importlib_metadata>`_). +Please consider using those libraries instead of pkg_resources. + .. contents:: **Table of Contents** @@ -703,7 +710,7 @@ entry point group and look for entry points named "pre_process" and To advertise an entry point, a project needs to use ``setuptools`` and provide an ``entry_points`` argument to ``setup()`` in its setup script, so that the entry points will be included in the distribution's metadata. For more -details, see the [``setuptools`` documentation](https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins). +details, see :ref:`Advertising Behavior<dynamic discovery of services and plugins>`. Each project distribution can advertise at most one entry point of a given name within the same entry point group. For example, a distutils extension @@ -1939,4 +1946,3 @@ History 0.3a1 * Initial release. - |