@@ -100,18 +100,21 @@ \subsection{Differences from \module{email} v1 (up to Python 2.2.1)}
100100\begin {itemize }
101101\item The \module {email.Header} and \module {email.Charset} modules
102102 have been added.
103+
103104\item The pickle format for \class {Message} instances has changed.
104105 Since this was never (and still isn't) formally defined, this
105106 isn't considered a backward incompatibility. However if your
106107 application pickles and unpickles \class {Message} instances, be
107108 aware that in \module {email} version 2, \class {Message}
108109 instances now have private variables \var {_charset} and
109110 \var {_default_type}.
111+
110112\item Several methods in the \class {Message} class have been
111113 deprecated, or their signatures changed. Also, many new methods
112114 have been added. See the documentation for the \class {Message}
113115 class for details. The changes should be completely backward
114116 compatible.
117+
115118\item The object structure has changed in the face of
116119 \mimetype {message/rfc822} content types. In \module {email}
117120 version 1, such a type would be represented by a scalar payload,
@@ -132,29 +135,36 @@ \subsection{Differences from \module{email} v1 (up to Python 2.2.1)}
132135 fine. You just need to make sure your code doesn't do a
133136 \method {set_payload()} with a \class {Message} instance on a
134137 container with a content type of \mimetype {message/rfc822}.
138+
135139\item The \class {Parser} constructor's \var {strict} argument was
136140 added, and its \method {parse()} and \method {parsestr()} methods
137141 grew a \var {headersonly} argument. The \var {strict} flag was
138142 also added to functions \function {email.message_from_file()}
139143 and \function {email.message_from_string()}.
144+
140145\item \method {Generator.__call__()} is deprecated; use
141146 \method {Generator.flatten()} instead. The \class {Generator}
142147 class has also grown the \method {clone()} method.
148+
143149\item The \class {DecodedGenerator} class in the
144150 \module {email.Generator} module was added.
151+
145152\item The intermediate base classes \class {MIMENonMultipart} and
146153 \class {MIMEMultipart} have been added, and interposed in the
147154 class hierarchy for most of the other MIME-related derived
148155 classes.
156+
149157\item The \var {_encoder} argument to the \class {MIMEText} constructor
150158 has been deprecated. Encoding now happens implicitly based
151159 on the \var {_charset} argument.
160+
152161\item The following functions in the \module {email.Utils} module have
153162 been deprecated: \function {dump_address_pairs()},
154163 \function {decode()}, and \function {encode()}. The following
155164 functions have been added to the module:
156165 \function {make_msgid()}, \function {decode_rfc2231()},
157166 \function {encode_rfc2231()}, and \function {decode_params()}.
167+
158168\item The non-public function \function {email.Iterators._structure()}
159169 was added.
160170\end {itemize }
@@ -184,47 +194,65 @@ \subsection{Differences from \module{mimelib}}
184194\begin {itemize }
185195\item \function {messageFromString()} has been renamed to
186196 \function {message_from_string()}.
197+
187198\item \function {messageFromFile()} has been renamed to
188199 \function {message_from_file()}.
200+
189201\end {itemize }
190202
191203The \class {Message} class has the following differences:
192204
193205\begin {itemize }
194206\item The method \method {asString()} was renamed to \method {as_string()}.
207+
195208\item The method \method {ismultipart()} was renamed to
196209 \method {is_multipart()}.
210+
197211\item The \method {get_payload()} method has grown a \var {decode}
198212 optional argument.
213+
199214\item The method \method {getall()} was renamed to \method {get_all()}.
215+
200216\item The method \method {addheader()} was renamed to \method {add_header()}.
217+
201218\item The method \method {gettype()} was renamed to \method {get_type()}.
219+
202220\item The method\method {getmaintype()} was renamed to
203221 \method {get_main_type()}.
222+
204223\item The method \method {getsubtype()} was renamed to
205224 \method {get_subtype()}.
225+
206226\item The method \method {getparams()} was renamed to
207227 \method {get_params()}.
208228 Also, whereas \method {getparams()} returned a list of strings,
209229 \method {get_params()} returns a list of 2-tuples, effectively
210230 the key/value pairs of the parameters, split on the \character {=}
211231 sign.
232+
212233\item The method \method {getparam()} was renamed to \method {get_param()}.
234+
213235\item The method \method {getcharsets()} was renamed to
214236 \method {get_charsets()}.
237+
215238\item The method \method {getfilename()} was renamed to
216239 \method {get_filename()}.
240+
217241\item The method \method {getboundary()} was renamed to
218242 \method {get_boundary()}.
243+
219244\item The method \method {setboundary()} was renamed to
220245 \method {set_boundary()}.
246+
221247\item The method \method {getdecodedpayload()} was removed. To get
222248 similar functionality, pass the value 1 to the \var {decode} flag
223249 of the {get_payload()} method.
250+
224251\item The method \method {getpayloadastext()} was removed. Similar
225252 functionality
226253 is supported by the \class {DecodedGenerator} class in the
227254 \refmodule {email.Generator} module.
255+
228256\item The method \method {getbodyastext()} was removed. You can get
229257 similar functionality by creating an iterator with
230258 \function {typed_subpart_iterator()} in the
@@ -251,12 +279,15 @@ \subsection{Differences from \module{mimelib}}
251279\item The \class {MIMEBase} class constructor arguments \var {_major}
252280 and \var {_minor} have changed to \var {_maintype} and
253281 \var {_subtype} respectively.
282+
254283\item The \code {Image} class/module has been renamed to
255284 \code {MIMEImage}. The \var {_minor} argument has been renamed to
256285 \var {_subtype}.
286+
257287\item The \code {Text} class/module has been renamed to
258288 \code {MIMEText}. The \var {_minor} argument has been renamed to
259289 \var {_subtype}.
290+
260291\item The \code {MessageRFC822} class/module has been renamed to
261292 \code {MIMEMessage}. Note that an earlier version of
262293 \module {mimelib} called this class/module \code {RFC822}, but
0 commit comments