[Python-checkins] r42458 - python/trunk/Lib/gopherlib.py

tim.peters python-checkins at python.org
Sat Feb 18 05:00:24 CET 2006


Author: tim.peters
Date: Sat Feb 18 05:00:23 2006
New Revision: 42458

Modified:
   python/trunk/Lib/gopherlib.py
Log:
Changed the new deprecation warning to show the
code _importing_ gopherlib instead of gopherlib's
call to warnings.warn.


Modified: python/trunk/Lib/gopherlib.py
==============================================================================
--- python/trunk/Lib/gopherlib.py	(original)
+++ python/trunk/Lib/gopherlib.py	Sat Feb 18 05:00:23 2006
@@ -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/'


More information about the Python-checkins mailing list