Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / html / python / lib / node595.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python Documentation Index' />
<link rel="first" href="lib.html" title='Python Library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="next" href="node596.html" />
<link rel="prev" href="module-email.Iterators.html" />
<link rel="parent" href="module-email.html" />
<link rel="next" href="node596.html" />
<meta name='aesop' content='information' />
<title>12.2.11 Package History</title>
</head>
<body>
<DIV CLASS="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="12.2.10 Iterators"
href="module-email.Iterators.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="12.2 email "
href="module-email.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="12.2.12 Differences from mimelib"
href="node596.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-email.Iterators.html">12.2.10 Iterators</A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-email.html">12.2 email </A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node596.html">12.2.12 Differences from mimelib</A>
</div>
<hr /></div>
</DIV>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00142110000000000000000">
12.2.11 Package History</A>
</H2>
<P>
Version 1 of the <tt class="module">email</tt> 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, and is compatible back to Python 2.1.
<P>
<tt class="module">email</tt> version 3.0 was released with Python 2.4 and as a separate
distutils-based package. It is compatible back to Python 2.3.
<P>
Here are the differences between <tt class="module">email</tt> version 3 and version 2:
<P>
<UL>
<LI>The <tt class="class">FeedParser</tt> class was introduced, and the <tt class="class">Parser</tt>
class was implemented in terms of the <tt class="class">FeedParser</tt>. All parsing
there for is non-strict, and parsing will make a best effort never to
raise an exception. Problems found while parsing messages are stored in
the message's <var>defect</var> attribute.
<P>
</LI>
<LI>All aspects of the API which raised <tt class="exception">DeprecationWarning</tt>s in
version 2 have been removed. These include the <var>_encoder</var> argument
to the <tt class="class">MIMEText</tt> constructor, the <tt class="method">Message.add_payload()</tt>
method, the <tt class="function">Utils.dump_address_pair()</tt> function, and the
functions <tt class="function">Utils.decode()</tt> and <tt class="function">Utils.encode()</tt>.
<P>
</LI>
<LI>New <tt class="exception">DeprecationWarning</tt>s have been added to:
<tt class="method">Generator.__call__()</tt>, <tt class="method">Message.get_type()</tt>,
<tt class="method">Message.get_main_type()</tt>, <tt class="method">Message.get_subtype()</tt>, and
the <var>strict</var> argument to the <tt class="class">Parser</tt> class. These are
expected to be removed in email 3.1.
<P>
</LI>
<LI>Support for Pythons earlier than 2.3 has been removed.
</LI>
</UL>
<P>
Here are the differences between <tt class="module">email</tt> version 2 and version 1:
<P>
<UL>
<LI>The <tt class="module">email.Header</tt> and <tt class="module">email.Charset</tt> modules
have been added.
<P>
</LI>
<LI>The pickle format for <tt class="class">Message</tt> instances has changed.
Since this was never (and still isn't) formally defined, this
isn't considered a backward incompatibility. However if your
application pickles and unpickles <tt class="class">Message</tt> instances, be
aware that in <tt class="module">email</tt> version 2, <tt class="class">Message</tt>
instances now have private variables <var>_charset</var> and
<var>_default_type</var>.
<P>
</LI>
<LI>Several methods in the <tt class="class">Message</tt> class have been
deprecated, or their signatures changed. Also, many new methods
have been added. See the documentation for the <tt class="class">Message</tt>
class for details. The changes should be completely backward
compatible.
<P>
</LI>
<LI>The object structure has changed in the face of
<span class="mimetype">message/rfc822</span> content types. In <tt class="module">email</tt>
version 1, such a type would be represented by a scalar payload,
i.e. the container message's <tt class="method">is_multipart()</tt> returned
false, <tt class="method">get_payload()</tt> was not a list object, but a single
<tt class="class">Message</tt> instance.
<P>
This structure was inconsistent with the rest of the package, so
the object representation for <span class="mimetype">message/rfc822</span> content
types was changed. In <tt class="module">email</tt> version 2, the container
<em>does</em> return <code>True</code> from <tt class="method">is_multipart()</tt>, and
<tt class="method">get_payload()</tt> returns a list containing a single
<tt class="class">Message</tt> item.
<P>
Note that this is one place that backward compatibility could
not be completely maintained. However, if you're already
testing the return type of <tt class="method">get_payload()</tt>, you should be
fine. You just need to make sure your code doesn't do a
<tt class="method">set_payload()</tt> with a <tt class="class">Message</tt> instance on a
container with a content type of <span class="mimetype">message/rfc822</span>.
<P>
</LI>
<LI>The <tt class="class">Parser</tt> constructor's <var>strict</var> argument was
added, and its <tt class="method">parse()</tt> and <tt class="method">parsestr()</tt> methods
grew a <var>headersonly</var> argument. The <var>strict</var> flag was
also added to functions <tt class="function">email.message_from_file()</tt>
and <tt class="function">email.message_from_string()</tt>.
<P>
</LI>
<LI><tt class="method">Generator.__call__()</tt> is deprecated; use
<tt class="method">Generator.flatten()</tt> instead. The <tt class="class">Generator</tt>
class has also grown the <tt class="method">clone()</tt> method.
<P>
</LI>
<LI>The <tt class="class">DecodedGenerator</tt> class in the
<tt class="module">email.Generator</tt> module was added.
<P>
</LI>
<LI>The intermediate base classes <tt class="class">MIMENonMultipart</tt> and
<tt class="class">MIMEMultipart</tt> have been added, and interposed in the
class hierarchy for most of the other MIME-related derived
classes.
<P>
</LI>
<LI>The <var>_encoder</var> argument to the <tt class="class">MIMEText</tt> constructor
has been deprecated. Encoding now happens implicitly based
on the <var>_charset</var> argument.
<P>
</LI>
<LI>The following functions in the <tt class="module">email.Utils</tt> module have
been deprecated: <tt class="function">dump_address_pairs()</tt>,
<tt class="function">decode()</tt>, and <tt class="function">encode()</tt>. The following
functions have been added to the module:
<tt class="function">make_msgid()</tt>, <tt class="function">decode_rfc2231()</tt>,
<tt class="function">encode_rfc2231()</tt>, and <tt class="function">decode_params()</tt>.
<P>
</LI>
<LI>The non-public function <tt class="function">email.Iterators._structure()</tt>
was added.
</LI>
</UL>
<P>
<DIV CLASS="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="12.2.10 Iterators"
href="module-email.Iterators.html"><img src='../icons/previous.png'
border='0' height='32' alt='Previous Page' width='32' /></A></td>
<td class='online-navigation'><a rel="parent" title="12.2 email "
href="module-email.html"><img src='../icons/up.png'
border='0' height='32' alt='Up One Level' width='32' /></A></td>
<td class='online-navigation'><a rel="next" title="12.2.12 Differences from mimelib"
href="node596.html"><img src='../icons/next.png'
border='0' height='32' alt='Next Page' width='32' /></A></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
href="contents.html"><img src='../icons/contents.png'
border='0' height='32' alt='Contents' width='32' /></A></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
border='0' height='32' alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
href="genindex.html"><img src='../icons/index.png'
border='0' height='32' alt='Index' width='32' /></A></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="module-email.Iterators.html">12.2.10 Iterators</A>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="module-email.html">12.2 email </A>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node596.html">12.2.12 Differences from mimelib</A>
</div>
</div>
<hr />
<span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span>
</DIV>
<!--End of Navigation Panel-->
<ADDRESS>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</ADDRESS>
</BODY>
</HTML>