Issue 9795: nntplib.NNTP should support the context protocol (original) (raw)

Created on 2010-09-07 22:42 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
nntplib-context-manager.patch giampaolo.rodola,2011-02-25 20:34
Messages (6)
msg115815 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010-09-07 22:42
As the title says. __exit__() simply has to call self.quit(), AFAICT.
msg115818 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2010-09-07 23:13
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.
msg129420 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2011-02-25 20:34
Patch in attachment.
msg129510 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-02-26 08:14
Not sure that silencing errors from quit() is the right thing. Is there any reason?
msg129542 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2011-02-26 13:31
(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.
msg129993 - (view) Author: Giampaolo Rodola' (giampaolo.rodola) * (Python committer) Date: 2011-03-03 18:34
Committed in r88734.
History
Date User Action Args
2022-04-11 14:57:06 admin set github: 54004
2011-03-03 18:34:25 giampaolo.rodola set status: open -> closedmessages: + resolution: fixednosy:pitrou, giampaolo.rodola
2011-02-26 13:31:01 giampaolo.rodola set nosy:pitrou, giampaolo.rodolamessages: +
2011-02-26 08:14:39 pitrou set nosy:pitrou, giampaolo.rodolamessages: +
2011-02-25 20:34:27 giampaolo.rodola set files: + nntplib-context-manager.patchversions: + Python 3.3, - Python 3.2nosy:pitrou, giampaolo.rodolamessages: + keywords: + patch
2010-09-07 23:13:03 giampaolo.rodola set assignee: giampaolo.rodolamessages: +
2010-09-07 22:46:11 pitrou set nosy: + giampaolo.rodola
2010-09-07 22:42:54 pitrou create