changeset: 73051:4a90d1ed115d user: Vinay Sajip date: Sat Oct 22 13:34:48 2011 +0100 files: Lib/logging/__init__.py description: Closes #13235: Changed PendingDeprecationWarning to DeprecationWarning. diff -r 84a70229c05e -r 4a90d1ed115d Lib/logging/__init__.py --- a/Lib/logging/__init__.py Sat Oct 22 11:08:10 2011 +0200 +++ b/Lib/logging/__init__.py Sat Oct 22 13:34:48 2011 +0100 @@ -251,7 +251,7 @@ # during formatting, we test to see if the arg is present using # 'if self.args:'. If the event being logged is e.g. 'Value is %d' # and if the passed arg fails 'if self.args:' then no formatting - # is done. For example, logger.warn('Value is %d', 0) would log + # is done. For example, logger.warning('Value is %d', 0) would log # 'Value is %d' instead of 'Value is 0'. # For the use case of passing a dictionary, this should not be a # problem. @@ -1245,7 +1245,7 @@ def warn(self, msg, *args, **kwargs): warnings.warn("The 'warn' method is deprecated, " - "use 'warning' instead", PendingDeprecationWarning, 2) + "use 'warning' instead", DeprecationWarning, 2) self.warning(msg, *args, **kwargs) def error(self, msg, *args, **kwargs): @@ -1561,7 +1561,7 @@ def warn(self, msg, *args, **kwargs): warnings.warn("The 'warn' method is deprecated, " - "use 'warning' instead", PendingDeprecationWarning, 2) + "use 'warning' instead", DeprecationWarning, 2) self.warning(msg, *args, **kwargs) def error(self, msg, *args, **kwargs): @@ -1774,7 +1774,7 @@ def warn(msg, *args, **kwargs): warnings.warn("The 'warn' function is deprecated, " - "use 'warning' instead", PendingDeprecationWarning, 2) + "use 'warning' instead", DeprecationWarning, 2) warning(msg, *args, **kwargs) def info(msg, *args, **kwargs):