Version 1 of the email package was bundled with Python releases up to Python 2.2.1. Version 2 was developed for the Python 2.3 release, and backported to Python 2.2.2. It was also available as a separate distutils based package. email version 2 is almost entirely backward compatible with version 1, with the following differences:
This structure was inconsistent with the rest of the package, so
the object representation for message/rfc822 content
types was changed. In email version 2, the container
does return True
from is_multipart(), and
get_payload() returns a list containing a single
Message item.
Note that this is one place that backward compatibility could not be completely maintained. However, if you're already testing the return type of get_payload(), you should be fine. You just need to make sure your code doesn't do a set_payload() with a Message instance on a container with a content type of message/rfc822.
See About this document... for information on suggesting changes.