classification
Title: nntplib shouldn't raise generic EOFError
Type: enhancement Stage: test needed
Components: Library (Lib) Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, mattrope
Priority: low Keywords:

Created on 2005-04-20 19:52 by mattrope, last changed 2010-08-21 13:55 by BreamoreBoy.

Messages (2)
msg25090 - (view) Author: Matt Roper (mattrope) Date: 2005-04-20 19:52
Python's nntplib currently raises a generic EOFError if
the connection is closed unexpectedly.  This seems
inconsistent with other Python libraries (smtplib,
imaplib, etc.) and is unexpected behaviour.  It seems
that a new Exception class derived from the NNTPError
(e.g., NNTPConnectionError) should be used instead.

As it stands now, the only indication that EOFError can
be raised is in the docstring for the internal
getline() method.  There is no mention in the
documentation that higher level methods call getline()
and can raise the EOFError to the application level. 
If no new exception class is added for this situation,
it would be nice to have this behaviour noted in the
documentation.
msg114494 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-08-21 13:55
The OP would accept a documentation change if the code's not going to be changed.
History
Date User Action Args
2010-08-21 13:55:56BreamoreBoysetnosy: + BreamoreBoy

messages: + msg114494
versions: + Python 3.2, - Python 2.7
2009-02-16 01:01:26ajaksu2setstage: test needed
versions: + Python 2.7
2005-04-20 19:52:50mattropecreate