homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josnyder
Recipients josnyder
Date 2018年10月22日.18:51:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za>
In-reply-to
Content
logging.StreamHandler contains the following code:
 stream.write(msg)
 stream.write(self.terminator)
 stream.flush()
When sys.stderr (or whatever other stream) is unbuffered, this results in two system calls and allows log records from different processes to concatenate on the same line in the output stream (followed by multiple newlines). This issue is new in Python 3.7, as stdout and stderr became "truly unbuffered" (cf. #30404).
As a simple solution, I believe the following would fix the issue and also be backward compatible:
 stream.write(msg + self.terminator)
 stream.flush()
History
Date User Action Args
2018年10月22日 18:51:21josnydersetrecipients: + josnyder
2018年10月22日 18:51:21josnydersetmessageid: <1540234281.84.0.788709270274.issue35046@psf.upfronthosting.co.za>
2018年10月22日 18:51:21josnyderlinkissue35046 messages
2018年10月22日 18:51:21josnydercreate

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