Martin Panter added the comment:

Posting RemoteDisconnected.v5.patch:

* Rebased and fixed minor merge conflict
* Change RemoteDisconnected base class from ConnectionError to 
ConnectionResetError
* Minor tweaks to tests

It seems that having a separate RemoteDisconnected exception (as in this patch) 
has at least two benefits:

1. It would allow the user to distinguish between a true ConnectionResetError 
(due to TCP reset or whatever) from a clean TCP shutdown

2. Backwards compatibility with user code that only handles BadStatusLine

The only disadvantage seems to be the bloat of adding a new exception type. But 
if some other comitter agrees that merging them is better and dropping 
backwards compatibility is okay I am happy to adjust the patch to go along with 
that.

----------
Added file: http://bugs.python.org/file38203/RemoteDisconnected.v5.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue3566>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to