On Python 3, this parameter never did anything due to the following:
https://github.com/getlogbook/logbook/blame/a357032722193f17f4825b67660442eab8fd3527/logbook/handlers.py#L567
where rv is always a str and therefore the if block which encodes strings is never entered.
It's not surprising this wasn't encountered because it's usually used with stdout/stderr which are text streams, or with files opened in text mode via FileHandler.
Clearly tests are missing for binary streams, and care should be taken to check none of the downstream file handlers would be affected.
On Python 3, this parameter never did anything due to the following:
https://github.com/getlogbook/logbook/blame/a357032722193f17f4825b67660442eab8fd3527/logbook/handlers.py#L567
where
rvis always astrand therefore theifblock which encodes strings is never entered.It's not surprising this wasn't encountered because it's usually used with stdout/stderr which are text streams, or with files opened in text mode via
FileHandler.Clearly tests are missing for binary streams, and care should be taken to check none of the downstream file handlers would be affected.