From: Tim Peters Date: Sat, 18 Feb 2006 04:00:23 +0000 (+0000) Subject: Changed the new deprecation warning to show the X-Git-Tag: v2.5a0~619 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24f7cad6ca3140bf0dada04261cb372be658832e;p=thirdparty%2FPython%2Fcpython.git Changed the new deprecation warning to show the code _importing_ gopherlib instead of gopherlib's call to warnings.warn. --- diff --git a/Lib/gopherlib.py b/Lib/gopherlib.py index 226eda6e9826..d789161e60a2 100644 --- a/Lib/gopherlib.py +++ b/Lib/gopherlib.py @@ -3,7 +3,8 @@ __all__ = ["send_selector","send_query"] import warnings -warnings.warn("the gopherlib module is deprecated", DeprecationWarning) +warnings.warn("the gopherlib module is deprecated", DeprecationWarning, + stacklevel=2) # Default selector, host and port DEF_SELECTOR = '1/'