Issue 9795: nntplib.NNTP should support the context protocol
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) * ![]() |
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) * ![]() |
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) * ![]() |
Date: 2011-02-25 20:34 | |
Patch in attachment. |
|||
| msg129510 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
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) * ![]() |
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) * ![]() |
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 -> closed messages:
+ msg129993 |
| 2011-02-26 13:31:01 | giampaolo.rodola | set | nosy:
pitrou, giampaolo.rodola messages: + msg129542 |
| 2011-02-26 08:14:39 | pitrou | set | nosy:
pitrou, giampaolo.rodola messages: + msg129510 |
| 2011-02-25 20:34:27 | giampaolo.rodola | set | files:
+ nntplib-context-manager.patch versions: + Python 3.3, - Python 3.2 nosy: pitrou, giampaolo.rodola messages: + msg129420 keywords: + patch |
| 2010-09-07 23:13:03 | giampaolo.rodola | set | assignee: giampaolo.rodola messages: + msg115818 |
| 2010-09-07 22:46:11 | pitrou | set | nosy:
+ giampaolo.rodola |
| 2010-09-07 22:42:54 | pitrou | create | |
