File tree 2 files changed +6
-3
lines changed 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 118
118
_namespace_packages = None
119
119
120
120
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 )
122
124
123
125
124
126
_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):
1659
1661
1660
1662
# for compatibility, warn; in future
1661
1663
# raise ValueError(msg)
1662
- warnings . warn (
1664
+ issue_warning (
1663
1665
msg [:- 1 ] + " and will raise exceptions in a future release." ,
1664
1666
DeprecationWarning ,
1665
- stacklevel = 4 ,
1666
1667
)
1667
1668
1668
1669
def _get (self , path ):
You can’t perform that action at this time.
0 commit comments