[issue9795] nntplib.NNTP should support the context protocol
Giampaolo Rodola' g.rod...@gmail.com added the comment: Committed in r88734. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9795] nntplib.NNTP should support the context protocol
Antoine Pitrou pit...@free.fr added the comment: Not sure that silencing errors from quit() is the right thing. Is there any reason? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9795] nntplib.NNTP should support the context protocol
Giampaolo Rodola' g.rod...@gmail.com added the comment: (socket.error, EOFError) after quit() indicates that the socket is disconnected, in which case we should not raise any error (or at least, this is the approach we're using in ftplib) while all other NNTPError related errors are not suppressed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9795] nntplib.NNTP should support the context protocol
Giampaolo Rodola' g.rod...@gmail.com added the comment: Patch in attachment. -- keywords: +patch versions: +Python 3.3 -Python 3.2 Added file: http://bugs.python.org/file20894/nntplib-context-manager.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9795] nntplib.NNTP should support the context protocol
New submission from Antoine Pitrou pit...@free.fr: As the title says. __exit__() simply has to call self.quit(), AFAICT. -- components: Library (Lib) messages: 115815 nosy: pitrou priority: normal severity: normal status: open title: nntplib.NNTP should support the context protocol type: feature request versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9795] nntplib.NNTP should support the context protocol
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9795] nntplib.NNTP should support the context protocol
Giampaolo Rodola' g.rod...@gmail.com added the comment: Assigning this to me. Hopefully this should go into the plan of adding a context manager to all network libs (ftplib, smptlib, imaplib, etc..) in time for Python 3.2. -- assignee: - giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9795 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com