[Python-checkins] bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042) (GH-10050)
Vinay Sajip
webhook-mailer at python.org
Tue Oct 23 06:07:12 EDT 2018
https://github.com/python/cpython/commit/d730719b094cb006711b1cd546927b863c173b31
commit: d730719b094cb006711b1cd546927b863c173b31
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: 2018-10-23T11:07:06+01:00
summary:
bpo-35046: do only one system call per line (logging.StreamHandler) (GH-10042) (GH-10050)
(cherry picked from commit b7d62050e7d5fc208ae7673613da4f1f2bc565c4)
files:
M Lib/logging/__init__.py
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index 3ad2cc38f61e..2761509d9951 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -1033,8 +1033,8 @@ def emit(self, record):
try:
msg = self.format(record)
stream = self.stream
- stream.write(msg)
- stream.write(self.terminator)
+ # issue 35046: merged two stream.writes into one.
+ stream.write(msg + self.terminator)
self.flush()
except Exception:
self.handleError(record)
More information about the Python-checkins
mailing list