changeset: 98079:3c39413d277f branch: 2.7 user: Terry Jan Reedy date: Sun Sep 20 02:33:57 2015 -0400 files: Lib/idlelib/idlever.py description: Issue #24199: Add stacklevel to deprecation warning call. diff -r 7e718bbf5152 -r 3c39413d277f Lib/idlelib/idlever.py --- a/Lib/idlelib/idlever.py Sun Sep 20 08:38:40 2015 +0300 +++ b/Lib/idlelib/idlever.py Sun Sep 20 02:33:57 2015 -0400 @@ -7,6 +7,6 @@ """ # 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(' ')]