Aurélien Bompard has proposed merging lp:~abompard/mailman/bug-1130696 into lp:mailman. Requested reviews: Mailman Coders (mailman-coders) For more details, see: https://code.launchpad.net/~abompard/mailman/bug-1130696/+merge/243226 Handle the MIMEMultipart created by the DigestRunner properly, fixes bug #1130696. -- Your team Mailman Coders is requested to review the proposed merge of lp:~abompard/mailman/bug-1130696 into lp:mailman.
This doesn't quite feel like it's getting to the root cause. Why don't we get a mailman.email.message.Message object here? -- https://code.launchpad.net/~abompard/mailman/bug-1130696/+merge/243226 Your team Mailman Coders is requested to review the proposed merge of lp:~abompard/mailman/bug-1130696 into lp:mailman.
Because the digest runner is creating a MIMEMultipart instance on line 175 of src/mailman/runners/digest.py. Should we change that instead? -- https://code.launchpad.net/~abompard/mailman/bug-1130696/+merge/243226 Your team Mailman Coders is requested to review the proposed merge of lp:~abompard/mailman/bug-1130696 into lp:mailman.
Because the digest runner is creating a MIMEMultipart instance on line 175 of src/mailman/runners/digest.py. Should we change that instead?
Good catch. Yes, I think we should change that. What I think I'd like to see is a test that creates a mime digest, and uses that to trigger the attribute errors, rather than creating a MIMEMultipart inside the tests themselves. Does that makes sense? Then the fix would be to change MIMEDigester._make_message() to create the proper subclass. The question then is what that method should return. My first thought is a class that inherits both from MIMEMultipart and mailman.email.message.Message. What do you think? -- https://code.launchpad.net/~abompard/mailman/bug-1130696/+merge/243226 Your team Mailman Coders is requested to review the proposed merge of lp:~abompard/mailman/bug-1130696 into lp:mailman.
Alright, I just changed that, and I tried generating a very simple subclass of MIMEMultipart and our Message instance. All tests seem to pass, but I'm not very familiar with the tricks of multiple inheritance / mixins. I'm pushing the branch right now. -- https://code.launchpad.net/~abompard/mailman/bug-1130696/+merge/243226 Your team Mailman Coders is requested to review the proposed merge of lp:~abompard/mailman/bug-1130696 into lp:mailman.
participants (2)
-
Aurélien Bompard
-
Barry Warsaw