Torsten Becker <torsten.bec...@gmail.com> added the comment:

> However, there should be a test for that, and I'm curious to know what 
> happens if you use such an address in an address field in the unmodified 
> email package.
I added a test to check if the exceptions get thrown when a address is invalid.

I also added a small test to check how a resulting message should look, it 
looks good to me but I am not a specialist with email.  Do you have any other 
ideas how to check if it does not have a negative impact to other parts of the 
module?


> Instead of directly calling bencode, you should use the charset module and 
> its header_encode method.  Note that you need to turn the charset into a 
> Charset instance first.  The advantage of doing this is that it will choose 
> the "best" encoding to use based on the charset and the contents of the 
> string.

The code also uses email.charset.Charset now.

----------
Added file: http://bugs.python.org/file21431/issue-1690608-v2.patch

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

Reply via email to