[New-bugs-announce] [issue9991] xmlrpc client ssl check faulty

Jonathan Niehof report at bugs.python.org
Thu Sep 30 00:15:34 CEST 2010


New submission from Jonathan Niehof <jniehof at lanl.gov>:

This has been reported before (#6494, #7987) and closed as "You need to build Python with SSL support." However, this error is raised even if ssl support is included.

The SSL check in xmlrpc.client for Python 3.1 is:
if not hasattr(socket, "ssl")
but ssl was removed from socket and into its own class for Py3k. So one workaround, provided ssl support is available:

import socket
if not hasattr(socket, 'ssl')
    socket.ssl = None
import xmlrpc.client

at which point everything works fine.

The attached patch fixes the bug, checking for ssl support based on the existence of http.client.HTTPSConnection, which is similar to the check in Python 2.7.

----------
components: Library (Lib)
files: xmlrpc_client_ssl_check.patch
keywords: patch
messages: 117667
nosy: jniehof
priority: normal
severity: normal
status: open
title: xmlrpc client ssl check faulty
type: crash
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file19061/xmlrpc_client_ssl_check.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9991>
_______________________________________


More information about the New-bugs-announce mailing list