Kaydet (Commit) d61e397b authored tarafından Giampaolo Rodolà's avatar Giampaolo Rodolà

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
........
üst 8d2dc851
...@@ -407,8 +407,9 @@ class dispatcher: ...@@ -407,8 +407,9 @@ class dispatcher:
raise AttributeError("%s instance has no attribute '%s'" raise AttributeError("%s instance has no attribute '%s'"
%(self.__class__.__name__, attr)) %(self.__class__.__name__, attr))
else: else:
warnings.warn("cheap inheritance is deprecated", DeprecationWarning, msg = "%(me)s.%(attr)s is deprecated; use %(me)s.socket.%(attr)s " \
stacklevel=2) "instead" % {'me' : self.__class__.__name__, 'attr' : attr}
warnings.warn(msg, DeprecationWarning, stacklevel=2)
return retattr return retattr
# log and log_info may be overridden to provide more sophisticated # log and log_info may be overridden to provide more sophisticated
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment