Torsten Becker <torsten.bec...@gmail.com> added the comment: I incorporated that change as well. My rationale behind the previous version was to be consistent with how Lib/email/header.py handled this, unfortunately I did not look around in the other classes and didn't think about that kind of compatibility.
When formataddr() is called with a object which is not a string and which does not have a header_encode it will raise the following exception now: > AttributeError: 'CharsetMock' object has no attribute 'header_encode' Thank you for your patience, sorry that it took probably more of your time by taking 4 iterations for this patch than if you had just implemented it yourself. ---------- Added file: http://bugs.python.org/file21436/issue-1690608-v4.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