This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shai
Recipients barry, r.david.murray, shai
Date 2017-11-04.22:55:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509836129.85.0.213398074469.issue31946@psf.upfronthosting.co.za>
In-reply-to
Content
In mailbox.py in the stdlib, the functions MH.add and MH.__setitem__ take a message object and dump it to a file in the MH folder, which is good and well. However, they only call self._dump_sequences() if the message was already an MHMessage.

Since in the MH format, status details (whether the message was read, replied or flagged) are saved in these sequences, this effectively loses this information.

This means that, if "folder" is an MH folder and "message" is a message of any class other than MHMessage, 

   folder.add(message)

loses the information, while

   folder.add(MHMEssage(message))

retains it. This seems surprising and suboptimal.
History
Date User Action Args
2017-11-04 22:55:29shaisetrecipients: + shai, barry, r.david.murray
2017-11-04 22:55:29shaisetmessageid: <1509836129.85.0.213398074469.issue31946@psf.upfronthosting.co.za>
2017-11-04 22:55:29shailinkissue31946 messages
2017-11-04 22:55:29shaicreate