From janssen at parc.com Sat Nov 11 04:51:32 2006 From: janssen at parc.com (Bill Janssen) Date: Fri, 10 Nov 2006 19:51:32 PST Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? Message-ID: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> Hi, Barry. I'm working with a system that has to work on Python 2.3, 2.4, and 2.5 (and eventually 2.6). It parses email messages and does various things with them. However, it seems that Python 2.3, 2.4, and 2.5 all have mutually incompatible email packages, mainly due to re-packaging and renaming. Am I understanding this correctly? If so, it seems that the only solution is to ship one of the standalone email packages with my system, instead of relying on Python's built-in module. So which one to ship? It has to work with each of the base Python distributions. I'm guessing email 2.5. Any ideas welcome. Bill From janssen at parc.com Sat Nov 11 05:04:55 2006 From: janssen at parc.com (Bill Janssen) Date: Fri, 10 Nov 2006 20:04:55 PST Subject: [Email-SIG] MHTML support in Python email? Message-ID: <06Nov10.200505pst."58648"@synergy1.parc.xerox.com> Folks, I'd like to be able to properly use MHTML (RFC 2557). The major impediment is resolving a URL against a mail message (the URL should map to some part of a multipart/related section of the message). To this end, it would be useful to add a method to the message object, which when invoked would perform the URL resolution procedure described in section 8.2 of the RFC. Has anyone already added this? Bill From jason at mastaler.com Sat Nov 11 05:42:22 2006 From: jason at mastaler.com (Jason R. Mastaler) Date: Fri, 10 Nov 2006 21:42:22 -0700 Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> Message-ID: <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> Bill Janssen writes: > Hi, Barry. > > I'm working with a system that has to work on Python 2.3, 2.4, and > 2.5 (and eventually 2.6). It parses email messages and does various > things with them. However, it seems that Python 2.3, 2.4, and 2.5 > all have mutually incompatible email packages, mainly due to > re-packaging and renaming. Am I understanding this correctly? > > If so, it seems that the only solution is to ship one of the > standalone email packages with my system, instead of relying on > Python's built-in module. So which one to ship? It has to work with > each of the base Python distributions. I'm guessing email 2.5. I'm not Barry, but I'll offer my $0.02 having already done exactly what you're looking to do. TMDA supports Python 2.3, 2.4, and 2.5, and bundles a copy of the email package. We are bundling email v4.0.1, which is the latest and greatest, and is compatible with all three of these major Python branches. From barry at python.org Sat Nov 11 17:20:37 2006 From: barry at python.org (Barry Warsaw) Date: Sat, 11 Nov 2006 11:20:37 -0500 Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> Message-ID: <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 10, 2006, at 11:42 PM, Jason R. Mastaler wrote: > TMDA supports Python 2.3, 2.4, and 2.5, and bundles a copy of the > email package. We are bundling email v4.0.1, which is the latest and > greatest, and is compatible with all three of these major Python > branches. Jason's right, I've made the guarantee that email 4.0.x will work with Python's back to 2.3. I also don't plan on maintaining earlier versions of the email package, except for security issues (and of course that doesn't stop anyone else from doing so!). I'd recommend 4.0.1. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRVX4VnEjvBPtnXfVAQJO0wP/RphYCWm0Tgh3SVaciJScoiVxAteuglqr We2ofYVGurZzpxPBioQwmAXFYxtbiLMwJcADOtUMRhLCLAegI1yi4T1UiwRcOU38 F6p+N6ZZohzhTFQi9bEllRuWlwkPmo6ni3+rm/L40hqaJrhy8xfHGWgaQnGpJxyM vEpDyWTVGX4= =ShbA -----END PGP SIGNATURE----- From janssen at parc.com Sun Nov 12 23:20:32 2006 From: janssen at parc.com (Bill Janssen) Date: Sun, 12 Nov 2006 14:20:32 PST Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> Message-ID: <06Nov12.142041pst."58648"@synergy1.parc.xerox.com> Great, thanks very much. It wasn't obvious to me looking at the on-line 2.5 documentation that email 4.x would work with Python 2.3. Bill From janssen at parc.com Sun Nov 12 23:59:16 2006 From: janssen at parc.com (Bill Janssen) Date: Sun, 12 Nov 2006 14:59:16 PST Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> Message-ID: <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> Hmmm. When I install email 4.0.1 ("python setup.py install") into my Python 2.3.5 release, then "import email", I still get email version 2.5.5. Do I have to mung the standard library in some way? Bill From barry at python.org Mon Nov 13 00:46:29 2006 From: barry at python.org (Barry Warsaw) Date: Sun, 12 Nov 2006 18:46:29 -0500 Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <06Nov12.142041pst."58648"@synergy1.parc.xerox.com> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.142041pst."58648"@synergy1.parc.xerox.com> Message-ID: <8913D331-AC7A-4159-887D-30B7EE29731A@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 12, 2006, at 5:20 PM, Bill Janssen wrote: > Great, thanks very much. It wasn't obvious to me looking at the > on-line 2.5 documentation that email 4.x would work with Python 2.3. Keep an eye on the email sig page: http://www.python.org/community/sigs/current/email-sig/ Unfortunately, I don't have the ability to update those pages any more, and 2.5.8 was released with Python 2.3.6. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRVeyXnEjvBPtnXfVAQKtowQAsLQWYLQ8IADk2ZFBrQHCqN0ZE1WqvjKm J71EBoSaSUlJeKpdsUhPp37uM+fDj6b1jUgNQKW1+8SckIUjumpqI+zXfkzXegJD p0URt4xyXiHjeJsQkUiBkYLmiqRIEvMnEbp3Ru74vG3h5YGLMFEYPf76jviR8Jdq 6lqnD/nDDwk= =eQ6J -----END PGP SIGNATURE----- From barry at python.org Mon Nov 13 00:47:44 2006 From: barry at python.org (Barry Warsaw) Date: Sun, 12 Nov 2006 18:47:44 -0500 Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> Message-ID: <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 12, 2006, at 5:59 PM, Bill Janssen wrote: > Hmmm. When I install email 4.0.1 ("python setup.py install") into my > Python 2.3.5 release, then "import email", I still get email version > 2.5.5. Do I have to mung the standard library in some way? I think that's just a function of the way Python works; its stdlib shows up on sys.path before site-packages, so you do have to set PYTHONPATH or sys.path in order to get things to work the way you want them to. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRVeyoXEjvBPtnXfVAQLZkQP9FuY13Emud9B+3GrNgp4RHxwSWeZYmrer SHurVkm1GZh82p2Ef+07rbwmUxhM5U1Khux3CO97uHmoYHZC3b/IVYd2UfNVJqM1 SR7S2WGoXPLHvZZQHsqdQWLsgPUwVAm9+MO4tqNtRehI1OYtyYbrmpe9PC7sBa68 9DXm5/vDPWk= =//1n -----END PGP SIGNATURE----- From janssen at parc.com Mon Nov 13 02:04:22 2006 From: janssen at parc.com (Bill Janssen) Date: Sun, 12 Nov 2006 17:04:22 PST Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> Message-ID: <06Nov12.170426pst."58648"@synergy1.parc.xerox.com> > > Hmmm. When I install email 4.0.1 ("python setup.py install") into my > > Python 2.3.5 release, then "import email", I still get email version > > 2.5.5. Do I have to mung the standard library in some way? > > I think that's just a function of the way Python works; its stdlib > shows up on sys.path before site-packages, so you do have to set > PYTHONPATH or sys.path in order to get things to work the way you > want them to. > > - -Barry That's not good. It means I have to do wierd and wonderful -- but mostly fragile -- sys.path hacking before trying to import email. Now I'm back to wishing that the 3.x and 4.x email packages had a support system for backwards-compatible APIs. Bill From barry at python.org Mon Nov 13 03:18:41 2006 From: barry at python.org (Barry Warsaw) Date: Sun, 12 Nov 2006 21:18:41 -0500 Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <06Nov12.170426pst."58648"@synergy1.parc.xerox.com> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> <06Nov12.170426pst."58648"@synergy1.parc.xerox.com> Message-ID: <6ADD2B1B-E149-43FE-9DE0-6F650F0ACA56@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 12, 2006, at 8:04 PM, Bill Janssen wrote: > That's not good. It means I have to do wierd and wonderful -- but > mostly fragile -- sys.path hacking before trying to import email. Now > I'm back to wishing that the 3.x and 4.x email packages had a support > system for backwards-compatible APIs. It's one reason why Mailman for example installs email x.y in its own pythonlib directory, and sets its sys.path to check there first. However, this is a more general problem with Python, so I really think it needs to be solved there. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRVfWBnEjvBPtnXfVAQIGUAQAtRZHq2LfmjdHZRRd8BWPI2PjsdrIlinF bJfxCezY+nbw+pwK8Z15M8DSiThaO7ICic79jwoOvFQXjREF56flbTU1h09vyet/ /+rPdVAdMqJPSTYlKDyQqQraPtpC67vz9r2a+b9twSHLwk5uqt/Tu7PHdRyAykWW ssS9s0pzAgU= =8Oj+ -----END PGP SIGNATURE----- From jason at mastaler.com Mon Nov 13 04:18:54 2006 From: jason at mastaler.com (Jason R. Mastaler) Date: Sun, 12 Nov 2006 20:18:54 -0700 Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> <06Nov12.170426pst."58648"@synergy1.parc.xerox.com> <6ADD2B1B-E149-43FE-9DE0-6F650F0ACA56@python.org> Message-ID: <87y7qgm3tt.fsf@deacon-blues.mid.mastaler.com> Barry Warsaw writes: > It's one reason why Mailman for example installs email x.y in its > own pythonlib directory, and sets its sys.path to check there first. TMDA does the exact same. From janssen at parc.com Mon Nov 13 18:07:26 2006 From: janssen at parc.com (Bill Janssen) Date: Mon, 13 Nov 2006 09:07:26 PST Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <6ADD2B1B-E149-43FE-9DE0-6F650F0ACA56@python.org> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> <06Nov12.170426pst."58648"@synergy1.parc.xerox.com> <6ADD2B1B-E149-43FE-9DE0-6F650F0ACA56@python.org> Message-ID: <06Nov13.090732pst."58648"@synergy1.parc.xerox.com> > > That's not good. It means I have to do wierd and wonderful -- but > > mostly fragile -- sys.path hacking before trying to import email. Now > > I'm back to wishing that the 3.x and 4.x email packages had a support > > system for backwards-compatible APIs. > > It's one reason why Mailman for example installs email x.y in its own > pythonlib directory, and sets its sys.path to check there first. > > However, this is a more general problem with Python, so I really > think it needs to be solved there. To some extent, it's already solved (thanks to Martin). If the installer for email installed an "email.pth" file in the installation directory (which, absent any configuration switches, is the regular "site-packages" directory) which contained import sys; sys.path.insert(0, ) where is the installation directory, that directory would be scanned before the regular library version. If you did this, for the general case where there are no configuration switches, you'd want to install email in an empty subdirectory of site-packages, I'd think. Bill From barry at python.org Tue Nov 14 15:01:44 2006 From: barry at python.org (Barry Warsaw) Date: Tue, 14 Nov 2006 09:01:44 -0500 Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <06Nov13.090732pst."58648"@synergy1.parc.xerox.com> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> <06Nov12.170426pst."58648"@synergy1.parc.xerox.com> <6ADD2B1B-E149-43FE-9DE0-6F650F0ACA56@python.org> <06Nov13.090732pst."58648"@synergy1.parc.xerox.com> Message-ID: <34C9E5D3-20CD-4F4B-AB55-22817FCB41F6@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 13, 2006, at 12:07 PM, Bill Janssen wrote: > To some extent, it's already solved (thanks to Martin). If the > installer for email installed an "email.pth" file in the installation > directory (which, absent any configuration switches, is the regular > "site-packages" directory) which contained > > import sys; sys.path.insert(0, ) > > where is the installation directory, that directory would be > scanned before the regular library version. If you did this, for the > general case where there are no configuration switches, you'd want to > install email in an empty subdirectory of site-packages, I'd think. Bill, would you be willing to work out a patch against email 4.0? - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRVnMTXEjvBPtnXfVAQKcswQApE4JRZkABprfEeSAAJy+gfjQwy1qNGTp cNDZ00B6BYUdQsnu4RVB+RxRT3dtgqlTz03c7IoR9G+j1CV3Rba2OC31G6qHzLSX q2B6aBpbl7xBIxFMcoHpwY1CdcKCqR+B8KuyXEh5A3Vm03PMfOtnwlCApzOCKirL LhW56XfPV5U= =Lk6l -----END PGP SIGNATURE----- From janssen at parc.com Tue Nov 14 18:43:48 2006 From: janssen at parc.com (Bill Janssen) Date: Tue, 14 Nov 2006 09:43:48 PST Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <34C9E5D3-20CD-4F4B-AB55-22817FCB41F6@python.org> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> <06Nov12.170426pst."58648"@synergy1.parc.xerox.com> <6ADD2B1B-E149-43FE-9DE0-6F650F0ACA56@python.org> <06Nov13.090732pst."58648"@synergy1.parc.xerox.com> <34C9E5D3-20CD-4F4B-AB55-22817FCB41F6@python.org> Message-ID: <06Nov14.094354pst."58648"@synergy1.parc.xerox.com> I saw that coming :-). Sure, I'll give it a try, but don't hold your breath. So who's working on the MHTML support? Bill > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Nov 13, 2006, at 12:07 PM, Bill Janssen wrote: > > > To some extent, it's already solved (thanks to Martin). If the > > installer for email installed an "email.pth" file in the installation > > directory (which, absent any configuration switches, is the regular > > "site-packages" directory) which contained > > > > import sys; sys.path.insert(0, ) > > > > where is the installation directory, that directory would be > > scanned before the regular library version. If you did this, for the > > general case where there are no configuration switches, you'd want to > > install email in an empty subdirectory of site-packages, I'd think. > > Bill, would you be willing to work out a patch against email 4.0? > > - -Barry From barry at python.org Tue Nov 14 19:04:18 2006 From: barry at python.org (Barry Warsaw) Date: Tue, 14 Nov 2006 13:04:18 -0500 Subject: [Email-SIG] which email package for Python 2.3 / 2.4 / 2.5? In-Reply-To: <06Nov14.094354pst."58648"@synergy1.parc.xerox.com> References: <06Nov10.195140pst."58648"@synergy1.parc.xerox.com> <87u016oaq9.fsf@deacon-blues.mid.mastaler.com> <7A7A89DD-7A2A-43DC-9EFB-FD9F923DABF0@python.org> <06Nov12.145916pst."58648"@synergy1.parc.xerox.com> <705315AA-8B67-48D0-A297-ABA67388C76C@python.org> <06Nov12.170426pst."58648"@synergy1.parc.xerox.com> <6ADD2B1B-E149-43FE-9DE0-6F650F0ACA56@python.org> <06Nov13.090732pst."58648"@synergy1.parc.xerox.com> <34C9E5D3-20CD-4F4B-AB55-22817FCB41F6@python.org> <06Nov14.094354pst."58648"@synergy1.parc.xerox.com> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 14, 2006, at 12:43 PM, Bill Janssen wrote: > I saw that coming :-). Sure, I'll give it a try, but don't hold your > breath. So who's working on the MHTML support? Some guy with the initials "B" and "J" I've heard. :) Seriously, next time I have cycles to work on email it'll probably be to resolve as many open issues as possible, rather than add new features. - -Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iQCVAwUBRVoFJ3EjvBPtnXfVAQLu2wP+OXZS5b26k3BAW7ZBc6GkMGaDvC0HWjm3 E7D/6eKJm2OlMTh46Qn7ItFHTQsBQ2l18drMfNq4rOfI6Nj/+E+YyjmA/xSkbuyR 8LuYgtwJHPoehT+SSWmKq+17lKiwigNU/eZcn3FycgjSNOQnXk0w07STVQMK2UZH rKhK0Hmvh7A= =MeZu -----END PGP SIGNATURE-----