classification
Title: Finer-grained exceptions for the ssl module
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: exarkun, giampaolo.rodola, pitrou, python-dev
Priority: normal Keywords: patch

Created on 2011-02-11 10:08 by pitrou, last changed 2011-10-27 22:03 by pitrou. This issue is now closed.

Files
File name Uploaded Description Edit
sslerrors.patch pitrou, 2011-10-22 22:23 review
Messages (5)
msg128370 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-02-11 10:08
pyOpenSSL (*) has the good idea of defining exception subclasses for the various OpenSSL error codes (ZeroReturnError, WantReadError, etc.). The ssl module could do the same.

(*) http://packages.python.org/pyOpenSSL/openssl-ssl.html
msg140292 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-07-13 17:53
Note: the ERR_GET_REASON() macro helps get a more precise explanation of an error. We could add a reason attribute to raised exceptions, and also provide a mnemonic-integer mapping.
msg146196 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-10-22 22:23
Here is a patch. It adds SSLZeroReturnError, SSLWantReadError, SSLWantWriteError, SSLSyscallError and SSLEOFError.
msg146522 - (view) Author: Roundup Robot (python-dev) Date: 2011-10-27 22:01
New changeset 2c4a9c778bb3 by Antoine Pitrou in branch 'default':
Issue #11183: Add finer-grained exceptions to the ssl module, so that
http://hg.python.org/cpython/rev/2c4a9c778bb3
msg146523 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-10-27 22:03
Committed now.
History
Date User Action Args
2011-10-27 22:03:53pitrousetstatus: open -> closed
resolution: fixed
messages: + msg146523

stage: patch review -> resolved
2011-10-27 22:01:15python-devsetnosy: + python-dev
messages: + msg146522
2011-10-22 22:23:38pitrousetstage: needs patch -> patch review
2011-10-22 22:23:32pitrousetfiles: + sslerrors.patch
keywords: + patch
messages: + msg146196
2011-07-13 17:53:08pitrousetmessages: + msg140292
stage: needs patch
2011-02-11 10:08:30pitroucreate