On Mon, Nov 28, 2005 at 09:46:22PM +0100, Lionel Elie Mamane wrote: > > http://ftp.intevation.de/users/bernhard/mailman/mailman-2.1.4-avoid-headerfolding-python21.diff
I am just comparing it to 77_header_folding_in_attachments.dpatch. > I took a look at the patch. In the class "Generator" you define, you > completely ignore the argument mangle_from to __init__. If it is not > used, I would expect it not to be taken as an argument of __init__ at > all. I accepted it as part of the promissed interface. Note that you, in replacing maxheaderlen, will not fullfill the promise of Generator __init_ interface anymore. It should not be of practical relevance in this case, though. Note also that clone() now also does something different in a subtile way in your patch and depends on a Python version >2.2.2. My patch worked for versions 2.1.x, too. No problem for Debian of course. > Or, on the contrary, to be used and passed to the > email.Generator.Generator.__init__ call. It is probably best to pass > it to email.Generator.Generator.__init__, and set it to "False" in all > instances where one writes to a one-message file or to a string > (nearly everywhere) and to "True" when one writes to a mailbox (in > Mailman/Mailbox.py). I agree that it would be better to only have the mangeling in the case of writing an mbox file. How to reach that goal is a matter of coding style, my change was a bit easier to track for me back then I guess. > Current OpenPGP implementations do > 'From '-mangling themselves anyway before clearsigning. I dunno > whether S/MIME implementations do, too. I do not know for sure either. I would assume that any reasonable OpenPGP or S/MIME implementation would not mangle the from before signing. Otherwise it would be a "modification" of the message and the email would contain something that the user did not write. It is a minor modification, but still it is a modification. And maildir system can save a "From " in the body without problems and SMTP also has no problem. > Same story for the max_header_len argument; shouldn't we rather put > the default value to 0 and pass the argument to > email.Generator.Generator.__init__? This would avoid overwriting > _write_headers. A matter of style. The change in the new patch now has a children_maxheaderlen in third position of the __init__ arguments, which is different to what the Generator class gave in the documentation. Again: No practical consequences. In my patch it was quite easy to see that no folding will happen anymore. Bottom line: no real differences, except minor stylistic ones. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]