Changed the new deprecation warning to show the
authorTim Peters <tim.peters@gmail.com>
Sat, 18 Feb 2006 04:00:23 +0000 (04:00 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 18 Feb 2006 04:00:23 +0000 (04:00 +0000)
code _importing_ gopherlib instead of gopherlib's
call to warnings.warn.

Lib/gopherlib.py

index 226eda6e9826303e0865ba9156e9b97559dc4726..d789161e60a2cc0f470aaeca8e0af288034cdd97 100644 (file)
@@ -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/'