File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ packages.
14
14
Use of ``pkg_resources `` is deprecated in favor of
15
15
:mod: `importlib.resources `, :mod: `importlib.metadata `
16
16
and their backports (:pypi: `importlib_resources `, :pypi: `importlib_metadata `).
17
+ Some useful APIs are also provided by :pypi: `packaging ` (e.g. requirements
18
+ and version parsing).
17
19
Users should refrain from new usage of ``pkg_resources `` and
18
20
should work to port to importlib-based solutions.
19
21
Original file line number Diff line number Diff line change 13
13
.zip files and with custom PEP 302 loaders that support the ``get_data()``
14
14
method.
15
15
16
- This module is deprecated. Users are directed to
17
- `importlib.resources <https://docs.python.org/3/library/importlib.resources.html>`_
18
- and
19
- `importlib.metadata <https://docs.python.org/3/library/importlib.metadata.html>`_
20
- instead.
16
+ This module is deprecated. Users are directed to :mod:`importlib.resources`,
17
+ :mod:`importlib.metadata` and :pypi:`packaging` instead.
21
18
"""
22
19
23
20
import sys
118
115
_namespace_packages = None
119
116
120
117
121
- warnings .warn ("pkg_resources is deprecated as an API" , DeprecationWarning )
118
+ warnings .warn (
119
+ "pkg_resources is deprecated as an API. "
120
+ "See https://setuptools.pypa.io/en/latest/pkg_resources.html" ,
121
+ DeprecationWarning
122
+ )
122
123
123
124
124
125
_PEP440_FALLBACK = re .compile (r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)" , re .I )
You can’t perform that action at this time.
0 commit comments