]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Documentation updates
authorMenno Smits <menno@pali>
Wed, 22 Apr 2009 00:04:52 +0000 (01:04 +0100)
committerMenno Smits <menno@pali>
Wed, 22 Apr 2009 00:04:52 +0000 (01:04 +0100)
NEWS [new file with mode: 0644]
README
TODO
imapclient/imapclient.py

diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..0f6f35c
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,15 @@
+#XXX standard format?
+#XXX should this be NEWS?
+
+folder name quoting bugs
+
+transparent internationalised folder name handling
+
+timezone handling fixed
+
+more tests
+
+includes mock.py
+
+
+
diff --git a/README b/README
index 6f875f573fa6e4606c5522ccb4167747b00f07ad..ee39334a334eb3c62e378e0275bbf7263670784e 100644 (file)
--- a/README
+++ b/README
@@ -8,6 +8,11 @@ Features:
     - IMAP server responses are fully parsed and readily useable. 
     - IMAP unique message IDs (UIDs) are handled transparently. There is no
       need to call different methods to use UIDs.
+    - Escaping for internationalized mailbox names is transparently handled.
+      Unicode mailbox names may be passed as input where-ever a folder name is
+      accepted.
+    - Time zones are transparently handled including when the server and client
+      are in different zones.
     - Convenience methods are provided for commonly used functionality.
     - Exceptions are raised when errors occur.
 
@@ -66,8 +71,8 @@ It must be used with an account that has an INBOX folder and write access to
 the account. The folders and contents of the account don't matter.
 
 WARNING: The operations performed by livetest.py are destructive. Emails and
-folders in the test account WILL BE CHANGED AND DELETED. Please only run
-against a dummy account that you don't care about.
+folders in the test account WILL BE DELETED. Please only run against a dummy
+account that you don't care about.
 
 Run livetest.py with the --help option to see usage.
 
diff --git a/TODO b/TODO
index d8f0da4c689c023966c8b799d925e5152f9ca1ae..99ae36016102f15f2eabaff1a56c441dba3a02fb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,11 +1,9 @@
-- email JP Calderone re use of his code
-
 - update docs & web site:
     - transparent folder escaping
-    - changelog
-        - compat breakage for for folder escaping and timezone handling
+    - update NEWS
 
 ---- release 0.5 ----
+- email JP Calderone re use of his code <exarkun at divmod com>
 
 - a bunch of stuff doesn't work with gmail's IMAP (see livetest.py)
 - automate releases with bzr
index 140157bab8088be310886280aa357225680c4a23..055ec79c7b1fbf1d438fdda20b1c6550abc3befd 100644 (file)
@@ -54,6 +54,14 @@ class IMAPClient(object):
     message flags (eg. [DELETED, 'foo', 'Bar']) or a single message flag (eg.
     'Foo'). See the constants at the top of this file for commonly used flags.
 
+    Any method that takes a folder name will accept a standard string or a
+    unicode string. Unicode strings will be transparently encoded using
+    modified UTF-7 as specified by RFC-2060. Such folder names will be returned
+    as unicode strings by methods that return folder names.
+
+    Transparent folder name encoding can be enabled or disabled with the
+    folder_encode attribute. It defaults to True.
+
     The IMAP related exceptions that will be raised by this class are:
         IMAPClient.Error
         IMAPClient.AbortError
@@ -156,7 +164,10 @@ class IMAPClient(object):
         @param directory: The base directory to look for folders from.
         @param pattern: A pattern to match against folder names. Only folder
             names matching this pattern will be returned. Wildcards accepted.
-        @return: A list of folder names.
+        @return: A list of folder names. Each folder name will be either a
+            string or a unicode string (if the folder on the server required
+            decoding). If the folder_encode attribute is False, no decoding
+            will be performed and only ordinary strings will be returned.
         '''
         typ, data = self._imap.list(directory, pattern)
         self._checkok('list', typ, data)
@@ -185,7 +196,7 @@ class IMAPClient(object):
         @param directory: The base directory to look for folders from.
         @param pattern: A pattern to match against folder names. Only folder
             names matching this pattern will be returned. Wildcards accepted.
-        @return: A list of folder names.
+        @return: A list of folder names. As per the return of list_folders().
         '''
         typ, data = self._imap.lsub(directory, pattern)
         self._checkok('lsub', typ, data)
@@ -418,6 +429,8 @@ class IMAPClient(object):
         @param parts: A sequence of data items to retrieve.
         @return: A dictionary indexed by message number. Each item is itself a
             dictionary containing the requested message parts.
+            INTERNALDATE parts will be returned as datetime objects converted
+            to the local machine's time zone.
         '''
         if not messages:
             return {}
@@ -443,7 +456,9 @@ class IMAPClient(object):
         @param flags: Sequnce of message flags to set. If not specified no
             flags will be set.
         @param msg_time: Optional date and time to set for the message. The
-            server will set a time if it isn't specified.
+            server will set a time if it isn't specified. If msg_time contains
+            timezone information (tzinfo), this will be honoured. Otherwise the
+            local machine's time zone sent to the server.
         @type msg_time: datetime.datetime
         @return: The append response returned by the server.
         @rtype: str