[Python-checkins] test_logging: Fix BytesWarning in SysLogHandlerTest (GH-93920)

miss-islington webhook-mailer at python.org
Fri Jun 17 05:53:44 EDT 2022


https://github.com/python/cpython/commit/123e3be33b095ecf92d2c19a6ac521065c1ba8af
commit: 123e3be33b095ecf92d2c19a6ac521065c1ba8af
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-06-17T02:53:35-07:00
summary:

test_logging: Fix BytesWarning in SysLogHandlerTest (GH-93920)

(cherry picked from commit 538f28921f67e36617272faa662375d305d9284c)

Co-authored-by: Victor Stinner <vstinner at python.org>

files:
M Lib/test/test_logging.py

diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index fd562322a7637..9eda0706ac6fd 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -1919,7 +1919,7 @@ def setUp(self):
             self.sl_hdlr = hcls((server.server_address[0], server.port))
         else:
             self.sl_hdlr = hcls(server.server_address)
-        self.log_output = ''
+        self.log_output = b''
         self.root_logger.removeHandler(self.root_logger.handlers[0])
         self.root_logger.addHandler(self.sl_hdlr)
         self.handled = threading.Event()



More information about the Python-checkins mailing list