[Python-checkins] GH-65046: Fix docs about logging in `asyncio` (#97559)

gvanrossum webhook-mailer at python.org
Mon Sep 26 18:27:25 EDT 2022


https://github.com/python/cpython/commit/d68c37c0d08542a346a13b150a204208bb0408f5
commit: d68c37c0d08542a346a13b150a204208bb0408f5
branch: main
author: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>
committer: gvanrossum <gvanrossum at gmail.com>
date: 2022-09-26T15:27:15-07:00
summary:

GH-65046: Fix docs about logging in `asyncio` (#97559)

Explain that logging should not use network I/O.

files:
M Doc/library/asyncio-dev.rst

diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
index 77f1128de50c..9676a352f4b2 100644
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -148,6 +148,10 @@ adjusted::
    logging.getLogger("asyncio").setLevel(logging.WARNING)
 
 
+Network logging can block the event loop. It is recommended to use
+a separate thread for handling logs or use non-blocking IO.
+
+
 .. _asyncio-coroutine-not-scheduled:
 
 Detect never-awaited coroutines



More information about the Python-checkins mailing list