]> granicus.if.org Git - python/commit
Issue #14837: SSL errors now have `library` and `reason` attributes describing precis...
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 22 Jun 2012 19:11:52 +0000 (21:11 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 22 Jun 2012 19:11:52 +0000 (21:11 +0200)
commit3b36fb1f537a771829c9c7c9720dc040d3c87885
treeaaec4c06b55dfb3681c56be22fe1112a79d3c433
parent31227ca5148436ee3e48430814c59fc31876821d
Issue #14837: SSL errors now have `library` and `reason` attributes describing precisely what happened and in which OpenSSL submodule.
The str() of a SSLError is also enhanced accordingly.

NOTE: this commit creates a reference leak.  The leak seems tied to the
use of PyType_FromSpec() to create the SSLError type.  The leak is on the
type object when it is instantiated:

>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
35
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
36
>>> e = ssl.SSLError()
>>> sys.getrefcount(ssl.SSLError)
37
Doc/library/ssl.rst
Lib/test/test_ssl.py
Misc/NEWS
Modules/_ssl.c