Skip to content

Commit

Permalink
config: add stacklevel=2 to make DeprecationWarning code clear (#3440)
Browse files Browse the repository at this point in the history
Deprecation: Add stacklevel=2 to make calling code clear
  • Loading branch information
abravalheri authored Jul 12, 2022
2 parents 4d00d50 + d953055 commit 8b675a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setuptools/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _wrapper(*args, **kwargs):
to access a backward compatible API, but this module is provisional
and might be removed in the future.
"""
warnings.warn(dedent(msg), SetuptoolsDeprecationWarning)
warnings.warn(dedent(msg), SetuptoolsDeprecationWarning, stacklevel=2)
return fn(*args, **kwargs)

return cast(Fn, _wrapper)
Expand Down

0 comments on commit 8b675a1

Please sign in to comment.