[Python-checkins] r80880 - python/trunk/Lib/asyncore.py
giampaolo.rodola
python-checkins at python.org
Thu May 6 21:56:34 CEST 2010
Author: giampaolo.rodola
Date: Thu May 6 21:56:34 2010
New Revision: 80880
Log:
provides a clearer warning message when cheap inheritance with the underlying socket object is used
Modified:
python/trunk/Lib/asyncore.py
Modified: python/trunk/Lib/asyncore.py
==============================================================================
--- python/trunk/Lib/asyncore.py (original)
+++ python/trunk/Lib/asyncore.py Thu May 6 21:56:34 2010
@@ -407,8 +407,9 @@
raise AttributeError("%s instance has no attribute '%s'"
%(self.__class__.__name__, attr))
else:
- warnings.warn("cheap inheritance is deprecated", DeprecationWarning,
- stacklevel=2)
+ msg = "%(me)s.%(attr)s is deprecated. Use %(me)s.socket.%(attr)s " \
+ "instead." % {'me': self.__class__.__name__, 'attr':attr}
+ warnings.warn(msg, DeprecationWarning, stacklevel=2)
return retattr
# log and log_info may be overridden to provide more sophisticated
More information about the Python-checkins
mailing list