Jessica McKellar added the comment: Thanks for the patch, Lita! Lita: I have some patch feedback for you at the end of this message.
-- Lita and I talked about this a bit via email; here's some additional context from that conversation: There were a couple of questions to answer before working on a patch: 1. Are brackets allowed in flag names according to the RFC? 2. If brackets aren't allowed, do other popular IMAP services permit them anyway? If so, we should consider allowing them even though this deviates from the RFC. To answer (1), my read of http://tools.ietf.org/html/rfc3501 is as follows: a. Look at http://tools.ietf.org/html/rfc3501, search for PERMANENTFLAGS definition. Note use of "flag-perm" variable. b. Search for "flag-perm". Find it on page 85, in section 9, Formal Syntax. This is describing the formal syntax in Backus-Naur Form (BNF). c. flag-perm = flag / "\*" d. flag = "\Answered" / "\Flagged" / "\Deleted" / "\Seen" / "\Draft" / flag-keyword / flag-extension ; Does not include "\Recent" e. flag-keyword = atom f. atom = 1*ATOM-CHAR g. ATOM-CHAR = <any CHAR except atom-specials> h. atom-specials = "(" / ")" / "{" / SP / CTL / list-wildcards / quoted-specials / resp-specials i. resp-specials = "]" My reading of this series of definitions is that "]" is not allowed in flag names. To answer (2), Lita ran some tests against GMail's IMAP service and found that it does let you create flags containing "]". -- Patch feedback: 1. Can you attach the script you used to probe GMail's IMAP service for what flag names were permitted? 2. Since this patch causes us to violate the RFC (but with good reason!), can you add a comment above the regex noting the violation and stating what characters we allow for flags and why? 3. This change need tests. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21815> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com