summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorGiampaolo RodolĂ  <g.rodola@gmail.com>2010-05-06 20:02:37 (GMT)
committerGiampaolo RodolĂ  <g.rodola@gmail.com>2010-05-06 20:02:37 (GMT)
commitd61e397b12aab80889e2b0981a0cb27dac0acc86 (patch)
tree58dce66425ed2626c00294922e7d907bf7366edb /Lib/asyncore.py
parent8d2dc851547846a82eee7fa4f057ab7e097324f1 (diff)
downloadcpython-d61e397b12aab80889e2b0981a0cb27dac0acc86.zip
cpython-d61e397b12aab80889e2b0981a0cb27dac0acc86.tar.gz
cpython-d61e397b12aab80889e2b0981a0cb27dac0acc86.tar.bz2
Merged revisions 80880 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r80880 | giampaolo.rodola | 2010-05-06 21:56:34 +0200 (gio, 06 mag 2010) | 1 line provides a clearer warning message when cheap inheritance with the underlying socket object is used ........
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 3dad594..ac0b755 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -407,8 +407,9 @@ class dispatcher:
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