From d953055801c8d618c70cea81e3e35684122c66a7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 12 Jul 2022 13:39:31 +0300 Subject: [PATCH] Add stacklevel=2 to make calling code clear --- setuptools/config/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setuptools/config/__init__.py b/setuptools/config/__init__.py index 35458d8e70..1a5153ad4f 100644 --- a/setuptools/config/__init__.py +++ b/setuptools/config/__init__.py @@ -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)