Re: Some parsing/generation issues of email in Python 3
Hans-Peter Jansen <[email protected]> Thu, 09 Jun 2016 18:37:54 +0200
| Newsgroups | gmane.comp.python.mime.devel |
|---|---|
| Message-ID | <2292062.iZc7AriIEe@xrated> |
On Mittwoch, 8. Juni 2016 10:37:41 R. David Murray wrote: > > Right, in my previous note I was talking about people not using the > new policies. The compat32 code is probably being used by a lot of > people and seems to be working well, including having fixed some header > parsing and folding bugs relative to the python2 version of the code. FYI, all my reported issues just _vanish_, when using the compat32 policy. This apparently makes a _huge_ difference. Probably, using SMTP policy was just a unfortunate choice. I'm back to regenerating all mails with the compat32 policy now (after adding a SMTP logging module for critical conditions ;) ). Let's see, how this goes. While at it, David, you seem to think about improving email. Apart from all considerations related to streaming/memory consumption/assembly, IMHO the weakest spot of the email package is header handling: the magic formula str(email.header.make_header(email.header.decode_header(msg['subject']))) for getting to the "real" subject string is, cough, improvable. Sure, this is complicated by the all the other modules, that are using email.header as well. I can only remotely imagine, how hard this is going to be in order to get this out of the SNAFU state.. Anyway.. Getting-back-some-confidence-in-email-ly yours, Pete