diff options
-rw-r--r-- | Lib/asyncore.py | 5 |
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 |