[Python-checkins] bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139)

vsajip webhook-mailer at python.org
Sun Mar 27 14:22:13 EDT 2022


https://github.com/python/cpython/commit/c12ba6b2ff7908c8970b978f149d51ecd3fb195c
commit: c12ba6b2ff7908c8970b978f149d51ecd3fb195c
branch: main
author: Jouke Witteveen <j.witteveen at gmail.com>
committer: vsajip <vinay_sajip at yahoo.co.uk>
date: 2022年03月27日T19:22:05+01:00
summary:
bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139)
files:
M Lib/logging/__init__.py
M Lib/test/test_logging.py
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index e8054fb1f72ac..d6315b047334e 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1568,7 +1568,7 @@ def findCaller(self, stack_info=False, stacklevel=1):
 while stacklevel > 0:
 next_f = f.f_back
 if next_f is None:
- ##TODO: We've got options here
+ ## We've got options here.
 ## If we want to use the last (deepest) frame:
 break
 ## If we want to mimic the warnings module:
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 00e354147a27c..f6f5977df2a1e 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -5075,9 +5075,6 @@ def outer():
 self.assertEqual(records[-1].funcName, 'outer')
 self.assertGreater(records[-1].lineno, lineno)
 lineno = records[-1].lineno
- trigger = self.logger.warn
- outer()
- self.assertEqual(records[-1].funcName, 'outer')
 root_logger = logging.getLogger()
 root_logger.addHandler(self.recording)
 trigger = logging.warning


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /