[Python-checkins] cpython (2.7): Issue #24199: Add stacklevel to deprecation warning call.

terry.reedy python-checkins at python.org
Sun Sep 20 08:35:07 CEST 2015


https://hg.python.org/cpython/rev/3c39413d277f
changeset:   98079:3c39413d277f
branch:      2.7
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Sun Sep 20 02:33:57 2015 -0400
summary:
  Issue #24199: Add stacklevel to deprecation warning call.

files:
  Lib/idlelib/idlever.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/idlelib/idlever.py b/Lib/idlelib/idlever.py
--- a/Lib/idlelib/idlever.py
+++ b/Lib/idlelib/idlever.py
@@ -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(' ')]

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list