For a while now, I've been wanting to migrate the email package to PEP 8 modules names. With Python 2.5 we have an opportunity to do this, while bumping the email package version number to 3.1. We'd have to do this in a backward compatible way of course, for at least one Python release.
Most new names would map pretty obviously, just by lowercasing them. For example email.Charset would become email.charset and email.FeedParser would become email.feedparser. I'd like to do something differently for the MIME* modules. For those, I'm thinking about creating an email.mime subpackage and populating that with the package names, sans the 'MIME' prefix. So email.MIMEMultipart would become email.mime.multipart and email.NonMultipart would become email.mime.nonmultipart. As per PEP 8, none of the class names inside those modules would need to change. So first the question is whether anyone else would like to see this. If the answer to that is "yes", then the next question is, what's the best way to accomplish this while retaining the existing API for backward compatibility? We can't just include both the legacy and lowercase Python files in the same directory, because on case-insensitive file systems they'd actually /be/ the same files. I'm not sure if we can play sufficient import hook hacks to make it work, and I'm uncomfortable with just importing everything in the __init__.py and playing mapping games in sys.modules. So if you'd like to see this happen, do you have suggestions for efficiently doing the mapping? -Barry
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Email-SIG mailing list [email protected] Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com
