This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rcritten
Recipients benjamin.peterson, eric.araujo, georg.brandl, rcritten
Date 2011-09-06.18:35:42
SpamBayes Score 0.0002085887
Marked as misclassified No
Message-id <1315334146.6.0.722125308209.issue12912@psf.upfronthosting.co.za>
In-reply-to
Content
Python 2.7 changed the internal class used in xmlrpclib from HTTP to HTTPConnection. 

I have code that subclasses httplib.HTTP to use the python-nss package to create a connection over SSL (similiar to httplib.HTTPS). My code currently looks something like this as a workaround:

class NSSConnection(httplib.HTTPConnection)
...

class NSSHTTPS(httplib.HTTP):
    _connection_class = NSSConnection

    def __init__ ...

def connect():
    (major, minor, micro, releaselevel, serial) = sys.version_info
    if major == 2 and minor < 7:
        conn = NSSHTTPS(host, 443, dbdir="/etc/pki/nssdb")
    else:
        conn = NSSConnection(host, 443, dbdir="/etc/pki/nssdb")

Full code is at https://fedorahosted.org/freeipa/browser/ipalib/rpc.py and https://fedorahosted.org/freeipa/browser/ipapython/nsslib.py

At least one other person has run into this, https://techknowhow.library.emory.edu/blogs/branker/2011/07/01/python-27-xmlrpclibtransport-backward-compatibility
History
Date User Action Args
2011-09-06 18:35:46rcrittensetrecipients: + rcritten, georg.brandl, benjamin.peterson, eric.araujo
2011-09-06 18:35:46rcrittensetmessageid: <1315334146.6.0.722125308209.issue12912@psf.upfronthosting.co.za>
2011-09-06 18:35:42rcrittenlinkissue12912 messages
2011-09-06 18:35:42rcrittencreate