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.

classification
Title: mailbox: Maildir.get_folder does not inherit factory
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, taka2ru
Priority: normal Keywords:

Created on 2006-11-21 03:33 by taka2ru, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg30640 - (view) Author: Tetsuya Takatsuru (taka2ru) Date: 2006-11-21 03:33
mailbox.Maildir.get_folder does not inherit _factory.

>>> import mailbox
>>> 
>>> mbox = mailbox.Maildir('/home/xxx/Maildir', mailbox.MaildirMessage)
>>> 
>>> subfolder = mbox.get_folder(mbox.list_folders()[0])
>>> 
>>> for key, mail in subfolder.iteritems():
>>>     print mail.__class__
>>>     break

from this example, i got the following output:
rfc822.Message

'mailbox.MaildirMessage' should be gotten instead.
msg30641 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2006-12-14 20:18
Thanks for your report.  This bug has already been reported as #1569790, and has been fixed in both the trunk and 25-maint branches.  Please see that bug for a patch that fixes the problem.
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44259
2006-11-21 03:33:32taka2rucreate