File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,20 @@ because another installed package depends on it with a wider version
45
45
requirement than specified by your extra).
46
46
47
47
48
- Using ``pkg_resources ``
49
- -----------------------
48
+ Using ``pkg_resources `` (deprecated)
49
+ ------------------------------------
50
50
51
- The now-deprecated :ref: `pkg_resources <ResourceManager API >` package (part of
52
- the ``setuptools `` distribution) provides a ``require `` function that you can
53
- use to check if a given optional dependency of your package is installed or
54
- not:
51
+ .. attention ::
55
52
56
- .. :: TODO ask setuptools to add labels for pkg_resources & require, then link
57
- properly
53
+ ``pkg_resources `` is **deprecated ** and the PyPA **strongly discourages **
54
+ its use.
55
+ This method is included in this guide for completeness's sake and only until
56
+ functionality with a similar level of comfort exists in
57
+ ``importlib.metadata `` or ``packaging ``.
58
58
59
+ The now-deprecated `pkg_resources <pkg_resources _>`_ package (part of the
60
+ ``setuptools `` distribution) provides a ``require `` function that you can use
61
+ to check if a given optional dependency of your package is installed or not:
59
62
60
63
.. code-block :: python
61
64
@@ -209,6 +212,8 @@ TODO mention that you might want to provide a way for users to check
209
212
210
213
------------------
211
214
215
+ .. _pkg_resources : https://setuptools.pypa.io/en/latest/pkg_resources.html
216
+
212
217
.. _packaging-problems-317 : https://github.com/pypa/packaging-problems/issues/317
213
218
214
219
.. _packaging-problems-664 : https://github.com/pypa/packaging-problems/issues/664
You can’t perform that action at this time.
0 commit comments