Issue 15253: xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter (original) (raw)

Issue15253

Created on 2012-07-05 08:27 by vpelletier, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg164676 - (view) Author: Vincent Pelletier (vpelletier) Date: 2012-07-05 08:27
SafeTransport class supports a 2-tuple as uri, in order to pass x509 parameters to httplib.HTTPSConnection . xmlrpclib.ServerProxy.__init__ fails when given such tuple, because it calls: urllib.splittype(uri) without checking uri type first. Minimal test case to reproduce is: import xmlrpclib xmlrpclib.ServerProxy(('https://example.com', {}))
msg164677 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-07-05 08:46
This is not a bug; the uri parameter is documented as an URI. Your report can be considered as a feature request (for supporting non-URI values for the uri parameter), however, Python 2 is closed for new features, so this could only be added for 3.x. Closing this as "won't fix". See http://www.velocityreviews.com/forums/t710620-python-xmlrpc-client-with-ssl-client-certificates-and-standard-modules.html#post_message_4004113 for a possible work-around.
msg164678 - (view) Author: Vincent Pelletier (vpelletier) Date: 2012-07-05 08:56
Then I guess SafeTransport should be cleaned to remove its dead code (tuple host handling), and the class you link to should be included (in spirit if not verbatim) in xmlrpclib. Also, sorry, I realized after posting that this bug is a dupe of #1581. But the closing reason here is more convincing to me than on #1581. Thanks.
msg164687 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2012-07-05 17:46
The situation is now much different from what it was for #1561. Python 2 is closed for anything but bug fixes; this rules out code cleanup as well.
History
Date User Action Args
2022-04-11 14:57:32 admin set github: 59458
2012-07-05 17:46:30 loewis set messages: +
2012-07-05 08:56:20 vpelletier set messages: +
2012-07-05 08:46:50 loewis set status: open -> closednosy: + loewismessages: + resolution: wont fix
2012-07-05 08:27:13 vpelletier create