File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1+ Add a link to deprecation warning in ``pkg_resources `` and improve
2+ ``stacklevel `` for better visibility.
Original file line number Diff line number Diff line change 118118_namespace_packages = None
119119
120120
121- warnings .warn ("pkg_resources is deprecated as an API" , DeprecationWarning )
121+ warnings .warn ("pkg_resources is deprecated as an API. "
122+ "See https://setuptools.pypa.io/en/latest/pkg_resources.html" ,
123+ DeprecationWarning , stacklevel = 2 )
122124
123125
124126_PEP440_FALLBACK = re .compile (r"^v?(?P<safe>(?:[0-9]+!)?[0-9]+(?:\.[0-9]+)*)" , re .I )
@@ -1659,10 +1661,9 @@ def _validate_resource_path(path):
16591661
16601662 # for compatibility, warn; in future
16611663 # raise ValueError(msg)
1662- warnings . warn (
1664+ issue_warning (
16631665 msg [:- 1 ] + " and will raise exceptions in a future release." ,
16641666 DeprecationWarning ,
1665- stacklevel = 4 ,
16661667 )
16671668
16681669 def _get (self , path ):
You can’t perform that action at this time.
0 commit comments