Steffen Daode Nurpmeso <sdao...@googlemail.com> added the comment:

This patch fixes the problem.
It was introduced in e727cf35.

David Murray, i've looked into test_email.py to add tests
for this, and i found TestIdempotent().
What i would do is try to split that thing up so that it covers
str() as well as bytes(), rewriting ._msgobj() to use a xy
parser instance so that the file-argument-is-not-closed test
could be embedded in there as a side-effect.

This is however your area, so please let me know if i may
touch this or if you have local modifications to this one
which will make my snail-slow work on it pointless.
Thanks.

----------
keywords: +patch
nosy: +brett.cannon
title: email.parser.BytesParser() uses TextIOWrapper -> 
email.parser.BytesParser().parse() closes file argument
Added file: http://bugs.python.org/file21647/11701.1.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11701>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to