| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="lib.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="lib.html" title='Python Library Reference' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='index' href='genindex.html' title='Index' /> |
| 10 | <link rel='last' href='about.html' title='About this document...' /> |
| 11 | <link rel='help' href='about.html' title='About this document...' /> |
| 12 | <link rel="next" href="node596.html" /> |
| 13 | <link rel="prev" href="module-email.Iterators.html" /> |
| 14 | <link rel="parent" href="module-email.html" /> |
| 15 | <link rel="next" href="node596.html" /> |
| 16 | <meta name='aesop' content='information' /> |
| 17 | <title>12.2.11 Package History</title> |
| 18 | </head> |
| 19 | <body> |
| 20 | <DIV CLASS="navigation"> |
| 21 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 22 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 23 | <tr> |
| 24 | <td class='online-navigation'><a rel="prev" title="12.2.10 Iterators" |
| 25 | href="module-email.Iterators.html"><img src='../icons/previous.png' |
| 26 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 27 | <td class='online-navigation'><a rel="parent" title="12.2 email " |
| 28 | href="module-email.html"><img src='../icons/up.png' |
| 29 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 30 | <td class='online-navigation'><a rel="next" title="12.2.12 Differences from mimelib" |
| 31 | href="node596.html"><img src='../icons/next.png' |
| 32 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 33 | <td align="center" width="100%">Python Library Reference</td> |
| 34 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 35 | href="contents.html"><img src='../icons/contents.png' |
| 36 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 37 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 38 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 39 | <td class='online-navigation'><a rel="index" title="Index" |
| 40 | href="genindex.html"><img src='../icons/index.png' |
| 41 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 42 | </tr></table> |
| 43 | <div class='online-navigation'> |
| 44 | <b class="navlabel">Previous:</b> |
| 45 | <a class="sectref" rel="prev" href="module-email.Iterators.html">12.2.10 Iterators</A> |
| 46 | <b class="navlabel">Up:</b> |
| 47 | <a class="sectref" rel="parent" href="module-email.html">12.2 email </A> |
| 48 | <b class="navlabel">Next:</b> |
| 49 | <a class="sectref" rel="next" href="node596.html">12.2.12 Differences from mimelib</A> |
| 50 | </div> |
| 51 | <hr /></div> |
| 52 | </DIV> |
| 53 | <!--End of Navigation Panel--> |
| 54 | |
| 55 | <H2><A NAME="SECTION00142110000000000000000"> |
| 56 | 12.2.11 Package History</A> |
| 57 | </H2> |
| 58 | |
| 59 | <P> |
| 60 | Version 1 of the <tt class="module">email</tt> package was bundled with Python |
| 61 | releases up to Python 2.2.1. Version 2 was developed for the Python |
| 62 | 2.3 release, and backported to Python 2.2.2. It was also available as |
| 63 | a separate distutils-based package, and is compatible back to Python 2.1. |
| 64 | |
| 65 | <P> |
| 66 | <tt class="module">email</tt> version 3.0 was released with Python 2.4 and as a separate |
| 67 | distutils-based package. It is compatible back to Python 2.3. |
| 68 | |
| 69 | <P> |
| 70 | Here are the differences between <tt class="module">email</tt> version 3 and version 2: |
| 71 | |
| 72 | <P> |
| 73 | |
| 74 | <UL> |
| 75 | <LI>The <tt class="class">FeedParser</tt> class was introduced, and the <tt class="class">Parser</tt> |
| 76 | class was implemented in terms of the <tt class="class">FeedParser</tt>. All parsing |
| 77 | there for is non-strict, and parsing will make a best effort never to |
| 78 | raise an exception. Problems found while parsing messages are stored in |
| 79 | the message's <var>defect</var> attribute. |
| 80 | |
| 81 | <P> |
| 82 | </LI> |
| 83 | <LI>All aspects of the API which raised <tt class="exception">DeprecationWarning</tt>s in |
| 84 | version 2 have been removed. These include the <var>_encoder</var> argument |
| 85 | to the <tt class="class">MIMEText</tt> constructor, the <tt class="method">Message.add_payload()</tt> |
| 86 | method, the <tt class="function">Utils.dump_address_pair()</tt> function, and the |
| 87 | functions <tt class="function">Utils.decode()</tt> and <tt class="function">Utils.encode()</tt>. |
| 88 | |
| 89 | <P> |
| 90 | </LI> |
| 91 | <LI>New <tt class="exception">DeprecationWarning</tt>s have been added to: |
| 92 | <tt class="method">Generator.__call__()</tt>, <tt class="method">Message.get_type()</tt>, |
| 93 | <tt class="method">Message.get_main_type()</tt>, <tt class="method">Message.get_subtype()</tt>, and |
| 94 | the <var>strict</var> argument to the <tt class="class">Parser</tt> class. These are |
| 95 | expected to be removed in email 3.1. |
| 96 | |
| 97 | <P> |
| 98 | </LI> |
| 99 | <LI>Support for Pythons earlier than 2.3 has been removed. |
| 100 | </LI> |
| 101 | </UL> |
| 102 | |
| 103 | <P> |
| 104 | Here are the differences between <tt class="module">email</tt> version 2 and version 1: |
| 105 | |
| 106 | <P> |
| 107 | |
| 108 | <UL> |
| 109 | <LI>The <tt class="module">email.Header</tt> and <tt class="module">email.Charset</tt> modules |
| 110 | have been added. |
| 111 | |
| 112 | <P> |
| 113 | </LI> |
| 114 | <LI>The pickle format for <tt class="class">Message</tt> instances has changed. |
| 115 | Since this was never (and still isn't) formally defined, this |
| 116 | isn't considered a backward incompatibility. However if your |
| 117 | application pickles and unpickles <tt class="class">Message</tt> instances, be |
| 118 | aware that in <tt class="module">email</tt> version 2, <tt class="class">Message</tt> |
| 119 | instances now have private variables <var>_charset</var> and |
| 120 | <var>_default_type</var>. |
| 121 | |
| 122 | <P> |
| 123 | </LI> |
| 124 | <LI>Several methods in the <tt class="class">Message</tt> class have been |
| 125 | deprecated, or their signatures changed. Also, many new methods |
| 126 | have been added. See the documentation for the <tt class="class">Message</tt> |
| 127 | class for details. The changes should be completely backward |
| 128 | compatible. |
| 129 | |
| 130 | <P> |
| 131 | </LI> |
| 132 | <LI>The object structure has changed in the face of |
| 133 | <span class="mimetype">message/rfc822</span> content types. In <tt class="module">email</tt> |
| 134 | version 1, such a type would be represented by a scalar payload, |
| 135 | i.e. the container message's <tt class="method">is_multipart()</tt> returned |
| 136 | false, <tt class="method">get_payload()</tt> was not a list object, but a single |
| 137 | <tt class="class">Message</tt> instance. |
| 138 | |
| 139 | <P> |
| 140 | This structure was inconsistent with the rest of the package, so |
| 141 | the object representation for <span class="mimetype">message/rfc822</span> content |
| 142 | types was changed. In <tt class="module">email</tt> version 2, the container |
| 143 | <em>does</em> return <code>True</code> from <tt class="method">is_multipart()</tt>, and |
| 144 | <tt class="method">get_payload()</tt> returns a list containing a single |
| 145 | <tt class="class">Message</tt> item. |
| 146 | |
| 147 | <P> |
| 148 | Note that this is one place that backward compatibility could |
| 149 | not be completely maintained. However, if you're already |
| 150 | testing the return type of <tt class="method">get_payload()</tt>, you should be |
| 151 | fine. You just need to make sure your code doesn't do a |
| 152 | <tt class="method">set_payload()</tt> with a <tt class="class">Message</tt> instance on a |
| 153 | container with a content type of <span class="mimetype">message/rfc822</span>. |
| 154 | |
| 155 | <P> |
| 156 | </LI> |
| 157 | <LI>The <tt class="class">Parser</tt> constructor's <var>strict</var> argument was |
| 158 | added, and its <tt class="method">parse()</tt> and <tt class="method">parsestr()</tt> methods |
| 159 | grew a <var>headersonly</var> argument. The <var>strict</var> flag was |
| 160 | also added to functions <tt class="function">email.message_from_file()</tt> |
| 161 | and <tt class="function">email.message_from_string()</tt>. |
| 162 | |
| 163 | <P> |
| 164 | </LI> |
| 165 | <LI><tt class="method">Generator.__call__()</tt> is deprecated; use |
| 166 | <tt class="method">Generator.flatten()</tt> instead. The <tt class="class">Generator</tt> |
| 167 | class has also grown the <tt class="method">clone()</tt> method. |
| 168 | |
| 169 | <P> |
| 170 | </LI> |
| 171 | <LI>The <tt class="class">DecodedGenerator</tt> class in the |
| 172 | <tt class="module">email.Generator</tt> module was added. |
| 173 | |
| 174 | <P> |
| 175 | </LI> |
| 176 | <LI>The intermediate base classes <tt class="class">MIMENonMultipart</tt> and |
| 177 | <tt class="class">MIMEMultipart</tt> have been added, and interposed in the |
| 178 | class hierarchy for most of the other MIME-related derived |
| 179 | classes. |
| 180 | |
| 181 | <P> |
| 182 | </LI> |
| 183 | <LI>The <var>_encoder</var> argument to the <tt class="class">MIMEText</tt> constructor |
| 184 | has been deprecated. Encoding now happens implicitly based |
| 185 | on the <var>_charset</var> argument. |
| 186 | |
| 187 | <P> |
| 188 | </LI> |
| 189 | <LI>The following functions in the <tt class="module">email.Utils</tt> module have |
| 190 | been deprecated: <tt class="function">dump_address_pairs()</tt>, |
| 191 | <tt class="function">decode()</tt>, and <tt class="function">encode()</tt>. The following |
| 192 | functions have been added to the module: |
| 193 | <tt class="function">make_msgid()</tt>, <tt class="function">decode_rfc2231()</tt>, |
| 194 | <tt class="function">encode_rfc2231()</tt>, and <tt class="function">decode_params()</tt>. |
| 195 | |
| 196 | <P> |
| 197 | </LI> |
| 198 | <LI>The non-public function <tt class="function">email.Iterators._structure()</tt> |
| 199 | was added. |
| 200 | </LI> |
| 201 | </UL> |
| 202 | |
| 203 | <P> |
| 204 | |
| 205 | <DIV CLASS="navigation"> |
| 206 | <div class='online-navigation'> |
| 207 | <p></p><hr /> |
| 208 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 209 | <tr> |
| 210 | <td class='online-navigation'><a rel="prev" title="12.2.10 Iterators" |
| 211 | href="module-email.Iterators.html"><img src='../icons/previous.png' |
| 212 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 213 | <td class='online-navigation'><a rel="parent" title="12.2 email " |
| 214 | href="module-email.html"><img src='../icons/up.png' |
| 215 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 216 | <td class='online-navigation'><a rel="next" title="12.2.12 Differences from mimelib" |
| 217 | href="node596.html"><img src='../icons/next.png' |
| 218 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 219 | <td align="center" width="100%">Python Library Reference</td> |
| 220 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 221 | href="contents.html"><img src='../icons/contents.png' |
| 222 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 223 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 224 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 225 | <td class='online-navigation'><a rel="index" title="Index" |
| 226 | href="genindex.html"><img src='../icons/index.png' |
| 227 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 228 | </tr></table> |
| 229 | <div class='online-navigation'> |
| 230 | <b class="navlabel">Previous:</b> |
| 231 | <a class="sectref" rel="prev" href="module-email.Iterators.html">12.2.10 Iterators</A> |
| 232 | <b class="navlabel">Up:</b> |
| 233 | <a class="sectref" rel="parent" href="module-email.html">12.2 email </A> |
| 234 | <b class="navlabel">Next:</b> |
| 235 | <a class="sectref" rel="next" href="node596.html">12.2.12 Differences from mimelib</A> |
| 236 | </div> |
| 237 | </div> |
| 238 | <hr /> |
| 239 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 240 | </DIV> |
| 241 | <!--End of Navigation Panel--> |
| 242 | <ADDRESS> |
| 243 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 244 | </ADDRESS> |
| 245 | </BODY> |
| 246 | </HTML> |