This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IMAP library lacks documentation about expected parameter types
Type: enhancement Stage:
Components: Documentation, email Versions: Python 3.4, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: barry, docs@python, mcepl, pmoleri, r.david.murray
Priority: normal Keywords:

Created on 2015-04-22 15:19 by pmoleri, last changed 2022-04-11 14:58 by admin.

Messages (3)
msg241812 - (view) Author: Pablo (pmoleri) Date: 2015-04-22 15:19
I used the IMAP library and I feel it lacks a lot of documentation regarding types and encoding.

Example:
IMAP4.list([directory[, pattern]]):
It doesn't state if it expects the directory argument to be an string (unicode) or a imap_utf7 encoded string or bytes.
It also expects names with spaces to be between double quotation marks and it doesn't state that it returns a bytes raw output.

This is valid for every function that receives a directory or mailbox argument. Also for most return values.

Documentation aside, I think it would be a nice improvement in the implementation to add an imap_utf7 convertion function, and check every directory or mailbox argument to see if it has characters outside the imap_utf7 charset and attempts to convert them automatically.
msg241814 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-04-22 16:34
Documentation patches are welcome.  imaplib has not seen much attention for quite some time (though there is currently someone interested in working on it, so that may change).

Please open a separate issue for the utf7 enhancement proposal.
msg315560 - (view) Author: Matej Cepl (mcepl) * Date: 2018-04-21 09:14
UTF-7 is tackled in https://bugs.python.org/issue5305
History
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68215
2018-04-21 09:14:32mceplsetnosy: + mcepl
messages: + msg315560
2015-04-22 16:34:51r.david.murraysetversions: + Python 3.5
nosy: + barry, r.david.murray

messages: + msg241814

components: + email
2015-04-22 15:19:43pmolericreate