[Python-checkins] bpo-35781: Changed references to deprecated 'warn' method in logging documentation in favour of 'warning' (GH-11654)

Vinay Sajip webhook-mailer at python.org
Wed Jan 23 02:27:18 EST 2019


https://github.com/python/cpython/commit/cda73a5af2ff064ca82140342b3158851d43868f
commit: cda73a5af2ff064ca82140342b3158851d43868f
branch: master
author: yuji38kwmt <yuji38kwmt at yahoo.co.jp>
committer: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: 2019年01月23日T07:27:13Z
summary:
bpo-35781: Changed references to deprecated 'warn' method in logging documentation in favour of 'warning' (GH-11654)
files:
M Doc/howto/logging-cookbook.rst
M Doc/howto/logging.rst
diff --git a/Doc/howto/logging-cookbook.rst b/Doc/howto/logging-cookbook.rst
index faf2ed15a066..4956aa0dd957 100644
--- a/Doc/howto/logging-cookbook.rst
+++ b/Doc/howto/logging-cookbook.rst
@@ -186,7 +186,7 @@ previous simple module-based configuration example::
 # 'application' code
 logger.debug('debug message')
 logger.info('info message')
- logger.warn('warn message')
+ logger.warning('warn message')
 logger.error('error message')
 logger.critical('critical message')
 
@@ -295,7 +295,7 @@ Here is an example of a module using the logging configuration server::
 while True:
 logger.debug('debug message')
 logger.info('info message')
- logger.warn('warn message')
+ logger.warning('warn message')
 logger.error('error message')
 logger.critical('critical message')
 time.sleep(5)
diff --git a/Doc/howto/logging.rst b/Doc/howto/logging.rst
index c90df4301fa6..7a68ca89199c 100644
--- a/Doc/howto/logging.rst
+++ b/Doc/howto/logging.rst
@@ -610,7 +610,7 @@ logger, a console handler, and a simple formatter using Python code::
 # 'application' code
 logger.debug('debug message')
 logger.info('info message')
- logger.warn('warn message')
+ logger.warning('warn message')
 logger.error('error message')
 logger.critical('critical message')
 
@@ -640,7 +640,7 @@ the names of the objects::
 # 'application' code
 logger.debug('debug message')
 logger.info('info message')
- logger.warn('warn message')
+ logger.warning('warn message')
 logger.error('error message')
 logger.critical('critical message')
 


More information about the Python-checkins mailing list

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