Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a88953

Browse files
committed
Closes #13235: Changed PendingDeprecationWarning to DeprecationWarning.
1 parent dd18d3a commit 0a88953

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/logging/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def __init__(self, name, level, pathname, lineno,
251251
# during formatting, we test to see if the arg is present using
252252
# 'if self.args:'. If the event being logged is e.g. 'Value is %d'
253253
# and if the passed arg fails 'if self.args:' then no formatting
254-
# is done. For example, logger.warn('Value is %d', 0) would log
254+
# is done. For example, logger.warning('Value is %d', 0) would log
255255
# 'Value is %d' instead of 'Value is 0'.
256256
# For the use case of passing a dictionary, this should not be a
257257
# problem.
@@ -1245,7 +1245,7 @@ def warning(self, msg, *args, **kwargs):
12451245

12461246
def warn(self, msg, *args, **kwargs):
12471247
warnings.warn("The 'warn' method is deprecated, "
1248-
"use 'warning' instead", PendingDeprecationWarning, 2)
1248+
"use 'warning' instead", DeprecationWarning, 2)
12491249
self.warning(msg, *args, **kwargs)
12501250

12511251
def error(self, msg, *args, **kwargs):
@@ -1561,7 +1561,7 @@ def warning(self, msg, *args, **kwargs):
15611561

15621562
def warn(self, msg, *args, **kwargs):
15631563
warnings.warn("The 'warn' method is deprecated, "
1564-
"use 'warning' instead", PendingDeprecationWarning, 2)
1564+
"use 'warning' instead", DeprecationWarning, 2)
15651565
self.warning(msg, *args, **kwargs)
15661566

15671567
def error(self, msg, *args, **kwargs):
@@ -1774,7 +1774,7 @@ def warning(msg, *args, **kwargs):
17741774

17751775
def warn(msg, *args, **kwargs):
17761776
warnings.warn("The 'warn' function is deprecated, "
1777-
"use 'warning' instead", PendingDeprecationWarning, 2)
1777+
"use 'warning' instead", DeprecationWarning, 2)
17781778
warning(msg, *args, **kwargs)
17791779

17801780
def info(msg, *args, **kwargs):

0 commit comments

Comments
 (0)