• Antoine Pitrou's avatar
    Issue #14837: SSL errors now have `library` and `reason` attributes describing… · 3b36fb1f
    Antoine Pitrou yazdı
    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
    3b36fb1f
_ssl.c 85.8 KB