sblondon <stephane.blon...@gmail.com> added the comment: If the access is read-only, the lock is not required [1]. However, I agree it does not worth to be more complex (changing the signature of the subclass or adding another context manager for the lock). I updated the patch and documentation so the mailbox is locked at the __enter__().
1: For example, the first source code example at https://docs.python.org/3/library/mailbox.html#examples ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32234> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com