New submission from bpoaugust:
The default mailbox factory is mailbox.mboxMessage so I expect the following
two statements to work the same:
messages = mailbox.mbox("test.mbox")
messages = mailbox.mbox("test.mbox", mailbox.mboxMessage)
However they do not.
The attached file generates the output:
<class 'mailbox.mboxMessage'>
Test
sender@invalid Thu Nov 17 00:49:30 2016
None
<class 'mailbox.mboxMessage'>
Test
MAILER-DAEMON Thu Sep 21 01:31:15 2017
None
Note that the original from has been lost in the second parse.
----------
components: email
files: mb.py
messages: 302667
nosy: barry, bpoaugust, r.david.murray
priority: normal
severity: normal
status: open
title: mailbox does not treat external factories the same
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47159/mb.py
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue31538>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com