=============
BODY and BODYSTRUCTURE parsing fixes (58) [API CHANGE]
-------------------------------------------------------
The response values for BODY and BODYSTRUCTURE responses may include a
sequence of tuples which are not separated by whitespace. These should
be treated as a single item (a list of multiple arbitrarily nested
tuples) but IMAPClient was treating them as separate items. IMAPClient
now returns these tuples in a list to allow for consistent parsing.
A BODYSTRUCTURE response for a multipart email with 2 parts would have
previously looked something like this::
(('text', 'html', ('charset', 'us-ascii'), None, None, 'quoted-printable', 55, 3),
('text', 'plain', ('charset', 'us-ascii'), None, None, '7bit', 26, 1),
'mixed', ('boundary', '===============1534046211=='))
The response is now returned like this::
([
('text', 'html', ('charset', 'us-ascii'), None, None, 'quoted-printable', 55, 3),
('text', 'plain', ('charset', 'us-ascii'), None, None, '7bit', 26, 1)
],
'mixed', ('boundary', '===============1534046211=='))
The behaviour for single part messages is unchanged. In this case the
first element of the tuple is a string specifying the major content
type of the message (eg "text").
An is_multipart boolean property now exists on BODY and BODYSTRUCTURE
responses to allow the caller to easily determine whether the response
is for a multipart message.
Code that expects the previous response handling behaviour needs to be
updated.
Live tests converted to use unittest2 (4)
------------------------------------------
livetest.py now uses the unittest2 package to run the tests. This
provides much more flexibility that the custom approach that was used
before. Dependencies between tests are gone - each test uses a fresh
IMAP connection and is preceeded by the same setup.
unittest2.main() is used to provide a number of useful command line
options and the ability to run a subset of tests.
IMAP account parameters are now read using a configuration file
instead of command line arguments. See livetest-sample.ini for an
example.
Added NAMESPACE support (63) [API CHANGE]
------------------------------------------
namespace() method added and get_folder_delimiter() has been
deprecated.
Added support for FETCH modifiers (62) [NEW]
---------------------------------------------
The fetch method now takes optional modifiers as the last
argument. These are required for extensions such as RFC 4551
(conditional store). Thanks to Thomas Jost for the patch.
===============