From 9150c0695ffbf7f76809f2811c27aaeb7177e087 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 2 Mar 2010 10:58:09 +0100 Subject: [PATCH] [fix] specify PendingDeprecationWarning, not default UserWarning bzr revid: xmo@tinyerp.com-20100302095809-v2tdjb22ogok3y73 --- bin/netsvc.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/netsvc.py b/bin/netsvc.py index 4e3608fa7cf..9f4cd0c8e39 100644 --- a/bin/netsvc.py +++ b/bin/netsvc.py @@ -211,12 +211,14 @@ def init_logger(): class Logger(object): def __init__(self): warnings.warn("The netsvc.Logger API shouldn't be used anymore, please " - "use the standard `logging.getLogger` API instead") + "use the standard `logging.getLogger` API instead", + PendingDeprecationWarning, stacklevel=2) super(Logger, self).__init__() def notifyChannel(self, name, level, msg): warnings.warn("notifyChannel API shouldn't be used anymore, please use " - "the standard `logging` module instead") + "the standard `logging` module instead", + PendingDeprecationWarning, stacklevel=2) from service.web_services import common log = logging.getLogger(tools.ustr(name))