[issue36015] streamhandler canont represent streams with an integer as name
Vinay Sajip
report at bugs.python.org
Mon Feb 18 06:15:56 EST 2019
Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:
I'm not sure this is a problem with logging. The code immediately preceding the failure is:
name = getattr(self.stream, 'name', '')
if name:
name += ' '
So, the failure occurs because the stream has a name attribute which is not a string. Even if sys.stderr itself is an unbuffered file, why is its 'name' attribute not a string? I don't imagine the name would be actually used for I/O, and having it set to an integer is a surprise.
I propose to close this (and the associated PR) unless a good reason is given why we have to support non-string names here.
----------
resolution: -> not a bug
status: open -> pending
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36015>
_______________________________________
More information about the Python-bugs-list
mailing list