From: Terry Jan Reedy Date: Sun, 20 Sep 2015 06:34:03 +0000 (-0400) Subject: Issue #24199: Add stacklevel to deprecation warning call. X-Git-Tag: v3.5.1rc1~323^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c37c49fd5617ffc7cfc37acee2e2737e1c357ca3;p=thirdparty%2FPython%2Fcpython.git Issue #24199: Add stacklevel to deprecation warning call. --- diff --git a/Lib/idlelib/idlever.py b/Lib/idlelib/idlever.py index 13c68b896949..3e9f69a3e372 100644 --- a/Lib/idlelib/idlever.py +++ b/Lib/idlelib/idlever.py @@ -7,6 +7,6 @@ and will be removed in 3.6 or later. Use """ # Kept for now only for possible existing extension use import warnings as w -w.warn(__doc__, DeprecationWarning) +w.warn(__doc__, DeprecationWarning, stacklevel=2) from sys import version IDLE_VERSION = version[:version.index(' ')]