Issue 1277: mailbox.Maildir: factory not used (original) (raw)

Issue1277

Created on 2007-10-14 16:02 by bwurst, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-mailbox.patch bwurst,2007-10-15 18:08
Messages (4)
msg56418 - (view) Author: Bernd Wurst (bwurst) Date: 2007-10-14 16:02
The "factory"-argument to the constructorof mailbox.Maildir is not used as it should be. First, it's default is set to rfc822.Message instead of MaildirMessage and then, inside the module's code, MaildirMessage is hard-coded as a message constructor. If I need a derived class with custom attributes, I cannot use it.
msg56450 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-10-15 17:28
Patch please?
msg56458 - (view) Author: Bernd Wurst (bwurst) Date: 2007-10-15 18:08
Attached. I am not a python hacker (by now). :) I wonder why the Message-declarations must be before their usage _inside_ the Maildir-class but it seems like. So the changeset is rather huge but the code changes are somewhat minimal. Just because the Message-classes must be at the beginning. Perhaps they should be outsourced. :) I don't really have experience with that module, so I don't know if that patch has side-effects on older programs using this module. But as compatibility has been broken down (a bit) with the current version, it should not really matter. :)
msg60223 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2008-01-19 20:15
I think the required patch is much simpler; only get_message() needs to be updated. I've committed this change to trunk as rev60095, and to release25-maint as rev. 60096.
History
Date User Action Args
2022-04-11 14:56:27 admin set github: 45618
2008-01-19 20:15:02 akuchling set status: open -> closedresolution: fixedmessages: +
2008-01-10 00:14:36 christian.heimes set priority: normalkeywords: + patchversions: + Python 2.6
2008-01-09 21:28:20 akuchling set assignee: akuchlingnosy: + akuchling
2007-10-15 18:08:01 bwurst set files: + python-mailbox.patchmessages: +
2007-10-15 17:28:07 gvanrossum set nosy: + gvanrossummessages: +
2007-10-14 16:02:43 bwurst create