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.

classification
Title: xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter
Type: Stage:
Components: Versions: Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: loewis, vpelletier
Priority: normal Keywords:

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:32adminsetgithub: 59458
2012-07-05 17:46:30loewissetmessages: + msg164687
2012-07-05 08:56:20vpelletiersetmessages: + msg164678
2012-07-05 08:46:50loewissetstatus: open -> closed

nosy: + loewis
messages: + msg164677

resolution: wont fix
2012-07-05 08:27:13vpelletiercreate