In both Python 3.2.3 and 3.3 the doctest subject is encoded as
'=?utf-8?q?unicode_part?= -ascii part'
In Python 3.3, this is now correctly decoded (I think) to retain the
space. It seems to me that the encoded version should actually be:
'=?utf-8?q?unicode_part?=-ascii part'
but I don't care enough to track that down ;).
>>> subject.append('-ascii part', 'ascii')
>>> message['Subject'] = subject.encode()
>>> _get_message_subject(message=message)
- 'unicode part-ascii part'
+ 'unicode part -ascii part'
>>> del message['Subject']
>>> message['Subject'] = 'clean subject'
>>> _get_message_subject(message=message)