Copyright (C) 2001 Python Software Foundation

Here is a history of user visible changes to this software.

2.5 (21-Mar-2003)

    A few other minor bug fixes.

2.5b1 (11-Mar-2003)

    - Message.get_payload() now recognizes various uuencoded
      Content-Transfer-Encodings (e.g. x-uuencode).

      When passing decode=True to Message.get_payload() and a
      low-level decoding error occurs, the payload is returned as-is
      instead of raising an exception.

    - Header.__init__() and Header.append() now accept an optional
      argument `errors' which is passed through to the unicode() and
      ustr.encode() calls.  You can use this to prevent conversion
      errors by e.g. passing 'replace' or 'ignore'.

      RFC 2822 specifies that long headers should be split at the
      "highest level syntactic break" possible.  This can only really
      be determined by the application, and the current API doesn't
      support arbitrary break points.  As a compromise,
      Header.encode() grew a `splitchars' argument which provides some
      control over splitting at higher level syntactic breaks.

      Header.decode_header() now transforms binascii.Errors into
      email.Errors.HeaderParseErrors when bogus base64 data appears in
      the header.

      The header splitting and folding algorithms were completely
      reimplemented, especially when dealing with ASCII headers.

      We now preserve spaces between encoded and non-encode parts in
      RFC 2047 headers when converting the header to Unicode.  While
      the RFC is technically ambiguous on this point, this is the
      behavior most people expect.

    - email.Iterators.body_line_iterator() now takes an optional
      decode argument, which is passed through to Message.get_payload().

    - The MIMEText constructor used to append a newline to the _text
      argument if it didn't already end in a newline.  Now it doesn't.
      This could theoretically break code so it should be considered
      experimental for 2.5 beta 1.  But it's the right fix, so we'll
      keep it unless there are howls of derision.

    - The quopriMIME.header_encode() maxlinelen argument now accepts
      None, which inhibits line breaking.

    - Support for Korean charsets was added to Charset.py.  Also the
      Charset class grew a __repr__() method.

    - Various and sundry bug fixes, improved RFC conformance, and
      improved lax parsing.

2.4.3 (14-Oct-2002)
2.4.2 (10-Oct-2002)
2.4.1 (07-Oct-2002)

    Last minute patches for the Python 2.2.2 backport.  This includes
    case insensitivity of character set names, patches for Windows,
    and some fixes for non-splitting of unspecified 8bit header data.

2.4 (01-Oct-2002)

    - Updated all the documentation.

    - Clarification to the semantics of Header.__init__() and
      Header.append() when it gets byte strings and Unicode strings as
      its first argument.  When a byte string is used, the charset
      must be the encoding of the string, such that unicode(s,charset)
      succeeds.  When a Unicode string is used, the charset is a hint,
      and the first of the following to succeed is used: us-ascii, the
      charset hint, utf-8.

    - A new header encoding flag has been added to the Charset
      module.  SHORTEST (which cannot be used for body encodings)
      returns the string either quoted-printable or base64 encoding,
      whichever is shortest in terms of characters.  This is a good
      heuristic for providing the most human readable value possible.
      The utf-8 charset uses SHORTEST encoding by default now.

    - Message.get_content_charset() is a new method that returns the
      charset parameter on the Content-Type header, unquoted and RFC
      2231 decoded if necessary.

    - "import email" no longer imports some sub-modules by side-effect.

    - Fixed some problems related to RFC 2231 encoding of boundary and
      charset parameters on Content-Type headers.  Document that
      get_param() and get_params() may return values that are strings
      or 3-tuples.

    - The signature of the non-public function _structure() has
      changed.

2.3.1 (13-Sep-2002)

    - Minor update to the distutils package.  A file was missing in
      the email-2.3.tar.gz file.

2.3 (10-Sep-2002)

    - Added support for RFC 2231 encoding.  Patch by Oleg Broytmann
      (previous patch was for RFC 2231 decoding only).

    - New method Message.replace_header() which replaces the first
      occurrence of a header with a new value, preserving header order
      and header name case.  Patch by Skip Montanaro.

    - RFC 2045, section 5.2 states that if the Content-Type: header is
      invalid, it defaults to text/plain.  Implement simple checks for
      this in get_content_type(), get_content_maintype(), and
      get_content_subtype().  These will no longer raise ValueErrors.

    - In non-strict parsing, if no start boundary can be found for a
      multipart message, the entire body of the message is set as the
      payload.  Strict parsing such a message will still raise a
      BoundaryError.

2.2 (23-Jul-2002)

    - Better support for default content types has been added.
      Specifically:

      o The following methods have been silently deprecated.  At some
        future release they may be unsilently deprecated:
        Message.get_type(), Message.get_main_type(),
        Message.get_subtype().

      o The following methods have been added as a consistent way of
        getting a message's content type: Message.get_content_type(),
        Message.get_content_maintype(), Message.get_content_subtype().

        Note that none of these methods take a `failobj' argument
        because messages always have a default content type.  Usually
        this type is text/plain, but for messages inside a
        multipart/digest container, it's message/rfc822.

        Also note that .get_content_maintype() and
        .get_content_subtype() can raise ValueError exceptions if the
        default content type doesn't include exactly one slash.

    - The Parser constructor's `strict' flag is exposed to
      email.message_from_file() and email.message_from_string().
      Also, non-strict parsing is now the default, since that seems to
      be the most useful behavior.

    - email.Header.Header.append() now allows the charset argument to
      be a string, naming a character set.  It will convert these to a
      Charset instance automatically.

    - The test procedure has changed.  See the README for details.
      Also, a new torture test has been added.

    - The non-public function email.Iterators._structure() can now
      take an output file object (which must be suitable for print>>).

2.1 (09-Jul-2002)

    - Support for RFC 2231 by Oleg Broytmann was added.

    - Fixed some representational, parsing, and generation bugs with
      multipart/digest and message/rfc822 messages.  Now we guarantee
      that the structure of such messages is something like:

          multipart/digest
              message/rfc822
                  text/plain (or whatever the subpart's type is)
              message/rfc822
                  text/plain (ditto)

      The encapsulating message/rfc822 object is a multipart of
      exactly length 1.

      To preserve idempotency, the concept of a "default type" is
      added to Message objects.  For most messages the default type is
      text/plain, except for messages at the first level inside a
      multipart/digest which are message/rfc822.  This default type is
      not described in the Content-Type: header of the container.

      Message objects thus have new methods get_default_type() and
      set_default_type(), the latter of which takes a string argument
      that must be either 'text/plain' or 'message/rfc822'.

      (Some changes were also made to the non-public interface for the
      Generator class.)

    - The Header class now knows how to split long non-RFC 2047
      encoded headers (i.e. us-ascii charset) in the RFC 2822
      recommended way.  Splits are attempted at the "highest-level
      syntactic breaks" which we define as on parameter semicolons,
      followed by folding whitespace.  No errors are raised if long
      headers still exceed the maximum RFC 2822 header length of 998
      characters after splitting.

    - Other Header class API changes:
        o All __init__() arguments have default values now.  Also, a
          new argument continuation_ws has been added (defaults to a
          single ASCII space).
        o Rich comparison __eq__ and __ne__ operators are defined
        o __unicode__() for Python 2.2 by Mikhail Zabaluev
        o guess_maxlinelen() method has been removed
        o encode_chunks() is no longer public

    - The email.Header module has grown a function make_header() which
      takes the output of decode_header() and returns a Header
      instance.

    - A non-public function email.Iterators._structure() has been
      added for debugging purposes.

    - MIMEMultipart.__init__() doesn't attach the subparts of the
      tuple is empty (i.e. there are no subparts).  Fixed a bug
      related to passing in explicit boundary.

    - Anthony Baxter's patches for non-strict parsing have been added
      to the Parser class.  There are currently no test cases for
      non-strict parsing yet.  Other Parser class API changes:
        o Parser.__init__() grew a strict argument, defaulting to
          true for backwards compatibility.
        o parse() and parsestr() both grew a headersonly argument
          which tells them to stop parsing once the header block is
          parsed.  The file pointer is left at the start of the body.

    - For RFC 2231 support, added the following functions to the
      email.Utils module: decode_rfc2231(), encode_rfc2231(),
      decode_params().

2.0.5 (02-Jun-2002)

    - Two new class/modules MIMEMultipart and MIMENonMultipart have
      been added.  The former is useful as a concrete class for
      creating multipart/* parts.  The latter is mostly useful as a
      base class for other MIME non-multipart subparts.  For example,
      the MIMEAudio, MIMEImage, and MIMEText clases now derive from
      MIMENonMultipart.  Note also that MIMENonMultipart.attach()
      raises a MultipartConversionError.

    - The message structure for message/rfc822 subparts has been
      changed to be more consistent.  Now message/rfc822 payloads are
      defined as a list containing exactly one element, the
      sub-Message object.

    - The callable interface to the Generator class is now silently
      deprecated in favor of the Generator.flatten() method.
      __call__() can be 2-3 times slower than the equivalent normal
      method.

2.0.4 (21-May-2002)

    - Fixed a bug in email.Utils.getaddresses().

2.0.3 (19-May-2002)

    - Fixed some limitations that caused the Parser to not work with
      CRLF style line-endings.  The parser should now be able to parse
      any email message with consistent line endings of \r, \n, \r\n.

    - Fixed a bug related to the semantics of the Header class
      constructor.  If neither maxlinelen or header_name is given, the
      maximum line length is 76 by default.  If maxlinelen is given,
      it is always honored.  If maxlinelen is not given, but
      header_name is given, then a suitable default line length is
      calculated.

    - Implemented a simpler testing framework.  Now you just need to
      run "python test.py" in the source directory.

    - Merged with the standard Python cvs tree, with compatibility
      modules for working in Python 2.1 and Python 2.2.

2.0.2 (26-Apr-2002)

    - Fix a Python 2.1.3 incompatibility in Iterators.py,
      body_line_iterator().

2.0.1 (10-Apr-2002)

    - Minor bug fixes in the test suite.

    - One minor API change: in Header.append(), the charset is
      optional, and used to default to the empty Charset().  It now
      defaults to the charset given in the Header constructor.

2.0 (08-Apr-2002)

    - Message.add_payload() is now deprecated.  Instead use
      Message.attach() and Message.set_payload().  The former always
      ensures that the message's payload is a list object, while the
      latter is used only for scalar payloads (i.e. a string or a
      single Message object in the case of message/rfc822 types).

    - email.Utils.formataddr(): New function which is the inverse of
      .parseaddr(); i.e. it glues a realname and an email address
      together.  This replaces email.Utils.dump_address_pair() which
      is deprecated.

    - class Charset now has a __str__() method, and implements rich
      comparison operators for comparison to lower case charset
      names.

    - encode_7or8bit(): If there is no payload, set the
      Content-Transfer-Encoding: value to 7bit.

    - Fixes for bugs in generating multipart messages that had exactly
      zero or one subparts.

1.2 (18-Mar-2002)

    - In the MIMEText class's constructor, the _encoder argument is
      deprecated.  You will get a DeprecationWarning if you try to use
      it.  This is because there is a fundamental conflict between
      _encoder and the fact that _charset is passed to the underlying
      set_payload() method.  _encoder really makes no sense any more.

    - When Message.set_type() is used to set the Content-Type: header,
      the MIME-Version: header is always set (overriding any existing
      MIME-Version: header).

    - More liberal acceptance of parameter formatting, e.g. this is
      now accepted: Content-Type: multipart/mixed; boundary = "FOO"
      I.e. spaces around the = sign.

    - Bug fix in Generator related to splitting long lines in a
      multiline header.

    - In class Charset, __str__() method added, as were __eq__() and
      __ne__().

    - Charset.get_body_encoding() may now return a function as well as
      a string character set name.  The function takes a single
      argument, which is a Message instance, and may change the
      Content-Transfer-Encoding: header (or do any other manipulations
      on the message).

    - Charset.from_splittable() added argument to_output which is used
      to specify whether the input_codec or the output_codec is used
      for the conversion (by default, the output codec is used).

1.1 (unreleased)

    - No changes since 0.97.  Only the version number has changed.

0.97 (unreleased)

    - Message.set_charset() can now take a string naming a character
      set in addition to a Charset instance.  In the former case, a
      Charset is instantiated by passing the string to its
      constructor.

    - The MIMEText constructor now passes the _charset argument to the
      underlying set_charset() method.  This makes things consistent
      at the cost of a minor semantic change: the resulting instance
      will have a Content-Transfer-Encoding: header where previously
      it did not.

    - A fix for a crash when quopriMIME.encode() tried to encode a
      multiline string containing a blank line.

    - New module Header.py which provides a higher level interface for
      encoded email headers, such as Subject:, From:, and To:.  This
      module provides an abstraction for composing such headers out of
      charset encoded parts, and for decoding such headers.  It
      properly splits lines on character boundaries even for multibyte
      character sets.

    - New RFC compliant base64 and quoted-printable modules, called
      base64MIME.py and quopriMIME.py.  These are intended to replace
      the Python standard base64.py and quopri.py modules, but are
      geared toward their use conformant to the various MIME email
      standards.

    - The Message class is much more character set aware and RFC
      compliant:

        + set_payload() now takes a new optional charset argument
        + New methods set_charset(), get_charset(), set_param(),
          del_param(), set_type()
        + Header parameter quoting is more RFC compliant
        + get_param() and get_params() now take a new optional unquote
          argument

    - The Charset module now knows about utf-8, gb2132, and big5
      codecs, the latter two of which are available independently of
      Python (see the comments in this module for downloading Chinese,
      Japanese, and Korean codecs).

      New Charset methods get_body_encoding(), get_output_charset(),
      encoded_header_len(), header_encode(), and body_encode().

    - The Generator now handles encoding the body, if the message
      object has a character set.

    - The Utils module has new functions fix_eols() and make_msgid().
      It also includes a workaround for bugs in parseaddr() when used
      with Python versions before 2.2.

    - A fix for a Parser bug when parsing multipart/* parts that
      contain only a single subpart.

0.96 (19-Nov-2001)

    - A fix for email.Utils.formatdate() for "uneven" timezones like
      Australia/Adelaide and America/St_Johns.

0.95 (09-Nov-2001)

    - A new implementation of email.Utils.formatdate() which makes it
      more RFC 2822 compliant.

0.94 (25-Oct-2001)

    - A fix for SF bug #472560, extra newlines returned by get_param()
      when the separating semi-colon shows up on a continuation line
      (legal, but weird).

0.93 (17-Oct-2001)

    - Fix for SF bug #471918, generator splitting long headers
      produces dupliaction.  Bug report and fix contributed by Matthew
      Cowles.

    - If a line could not be split on semicolons in order to produce
      shorter lines, an attempt is made to split the header on folding
      white space.  One deficiency still: it won't try to split on
      both semis and folding whitespace.  Oh well.

0.92 (14-Oct-2001)

    - Iterators.typed_subpart_iterator() should use a 'text/plain'
      failobj in its get_main_type() call.

    - Added class Parser.HeaderParser which just parses headers and
      leaves the message as a string payload; it does not recursively
      parse the body.

0.91 (09-Oct-2001)

    - Added the MIMEAudio class/module for audio/* MIME types.
      Contributed by Anthony Baxter.

    - Fixed a bug in Message.get_all() where failobj was never
      returned if no matching fields were found.

0.90 (01-Oct-2001)

    - mimelib has been integrated with Python 2.2.  A compatibility
      package called email 0.90 is being made available here.  It is
      significantly different in API from the mimelib package.  See
      the README for details.  mimelib as a separate package is no
      longer being supported.

0.6 (17-Sep-2001)

    - Last minute bug fixes.

0.5 (17-Sep-2001)

    - New methods in the top-level mimelib package namespace:
        + messageFromString() to create an object tree from a string.
        + messageFromFile() to create an object tree from an open file.

    - New methods in the address.py module:
        + encode() for encoding to RFC 2047 headers
        + decode() for decoding from RFC 2047 headers

    - New methods in the Message class:
        + asString() to get a flat text representation of the object
          tree.
        + __str__() same as asString() but includes the Unix-From
          envelope header in the output.
        + __contains__() for use with the `in' operator.
        + attach() is a synonym for add_payload()
        + getcharsets()
        + getfilename()
        + getboundary()
        + setboundary()
        + getdecodedpayload()
        + getpayloadastext()
        + getbodyastext()

    - Message.preamble and Message.epilogue default to None (they used
      to not exist by default).

    - Changes to the Generator class:
        + New optional argument `maxheaderlen' for __init__() controls
          the maximum length in characters of any header line.
        + write() isn't the entry point for doing the text generation
          any more.  This lets us make this method compatible with
          file-like objects.  Use __call__() semantics instead.
        + Calling a Generator instance creates the plain text
          message.  This is the same as the old write() interface
          except that the optional `unixfrom' argument now defaults to
          0.
        + There is a new, undocumented semi-private interface for
          extending the MIME types Generator can handle.  UTSL.

    - New Encoders.py module contains some useful encoders for Image
      and Text instances.

    - Text.__init__() has a new _encoder optional argument, which has
      the same semantics as _encoder for Image.__init__().

    - StringableMixin.py module has been removed, and its
      functionality merged back into the Message class.

    - MessageParseError doesn't contain line numbers any more.

    - Lots of bug fixes; lots more unit tests.

0.4 (09-Jul-2001)

    - New module/class called RFC822 which represents message/rfc822
      MIME types.  This takes a single Message instance.

    - Message.getmaintype() and Message.getsubtype() will now return
      failobj when the Content-Type: header doesn't have enough
      information.

0.3 (20-Apr-2001)

    - In the Image class, the _encoding argument has been changed to
      _encoder.  Also ImageTypeError is removed; if Image.__init__()
      can't guess the image's minor type, a TypeError is raised
      instead.

    - Message.getparam() and Message.getparams() have grown a new
      optional argument `header'.

    - MsgReader class has grown a new method readlines() for
      compatibility with Python 2.1's xreadline module.

    - The ReprMixin module and class have been renamed to
      StringableMixin

    - New exception MultipartConversionError can be raised by
      Message.add_payload()

    - Bug fixes

    - mimelib has been moved to SourceForge.  See
      http://mimelib.sourceforge.net

0.2 (14-Feb-2001)

    - Generator constructor has a new optional argument `mangle_from_'
      which is a flag.  If true, the generated flat text has From_
      lines mangled in the body of messages by prepending a `>' in
      front of the line.  This assures that such lines are not
      mistaken for Unix mailbox separators.

    - Added a new class ReprMixin for adding convenience methods
      get_text() and __str__() to Message subclasses.

    - RFC 1341 (MIME) calls the blob between the closing boundary and
      the end of the message, the `epilogue'.  Change `postamble' to
      `epilogue' in Message and Generator classes.

    - Much better conformance to RFC 1341 in the Generator.

    - Added __all__ support for "from mimelib import *"

    - Added LICENSE file, currently BSD-ish.  The copyright will
      eventually be transferred to the Python Software Foundation when
      it is activated.

    - Bug fixes.

0.1 (24-Jan-2001)

    Initial beta release.



Local Variables:
mode: indented-text
indent-tabs-mode: nil
End:
