yuja added a comment. Maybe BytesGenerator can be used instead? https://docs.python.org/3/library/email.generator.html#email.generator.BytesGenerator REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3951 To: durin42, #hg-reviewers Cc: yuja, mercurial-devel