From 18029d80bde1743da6900600633f0fa54d7c1044 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 1 May 2019 11:12:35 -0400 Subject: MNT: set stacklevel in the getfullargspec deprecation warning to 2 (GH-13029) This is consistent with the rest of the `warnings.warn` usage in the inspect.py module and aids identifying code that needs to be fixed. This warning came in via d5d2b4546939b98244708e5bb0cfccd55b99d244 --- Lib/inspect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/inspect.py b/Lib/inspect.py index fffca22..c460309 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -1112,7 +1112,7 @@ def getfullargspec(func): """ warnings.warn("Use inspect.signature() instead of inspect.getfullargspec()", - DeprecationWarning) + DeprecationWarning, stacklevel=2) try: # Re: `skip_bound_arg=False` # -- cgit v0.12