From: Thomas A Caswell Date: Wed, 1 May 2019 15:12:35 +0000 (-0400) Subject: MNT: set stacklevel in the getfullargspec deprecation warning to 2 (GH-13029) X-Git-Tag: v3.8.0a4~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18029d80bde1743da6900600633f0fa54d7c1044;p=python 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 --- diff --git a/Lib/inspect.py b/Lib/inspect.py index fffca22357..c460309bb5 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` #