summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-07-12 12:35:05 +0100
committerGitHub <noreply@github.com>2022-07-12 12:35:05 +0100
commit8b675a1cf5bde92381761666dbb59b527a611bb5 (patch)
tree9f35646b3fab9d1a7eb7e66f7da7c6733ce443da
parent4d00d5091e0817f6e539c48f4afc2e69b8ac2591 (diff)
parentd953055801c8d618c70cea81e3e35684122c66a7 (diff)
downloadpython-setuptools-git-8b675a1cf5bde92381761666dbb59b527a611bb5.tar.gz
config: add stacklevel=2 to make DeprecationWarning code clear (#3440)
Deprecation: Add stacklevel=2 to make calling code clear
-rw-r--r--setuptools/config/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/config/__init__.py b/setuptools/config/__init__.py
index 35458d8e..1a5153ad 100644
--- a/setuptools/config/__init__.py
+++ b/setuptools/config/__init__.py
@@ -25,7 +25,7 @@ def _deprecation_notice(fn: Fn) -> Fn:
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)