Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter #59458

Closed
vpelletier mannequin opened this issue Jul 5, 2012 · 4 comments
Closed

xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter #59458

vpelletier mannequin opened this issue Jul 5, 2012 · 4 comments

Comments

@vpelletier
Copy link
Mannequin

vpelletier mannequin commented Jul 5, 2012

BPO 15253
Nosy @loewis, @vpelletier

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2012-07-05.08:46:50.328>
created_at = <Date 2012-07-05.08:27:13.603>
labels = []
title = 'xmlrpclib.ServerProxy does not support 2-tuple value for uri parameter'
updated_at = <Date 2012-07-05.17:46:30.732>
user = 'https://github.com/vpelletier'

bugs.python.org fields:

activity = <Date 2012-07-05.17:46:30.732>
actor = 'loewis'
assignee = 'none'
closed = True
closed_date = <Date 2012-07-05.08:46:50.328>
closer = 'loewis'
components = []
creation = <Date 2012-07-05.08:27:13.603>
creator = 'vpelletier'
dependencies = []
files = []
hgrepos = []
issue_num = 15253
keywords = []
message_count = 4.0
messages = ['164676', '164677', '164678', '164687']
nosy_count = 2.0
nosy_names = ['loewis', 'vpelletier']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue15253'
versions = ['Python 2.7']

@vpelletier
Copy link
Mannequin Author

vpelletier mannequin commented Jul 5, 2012

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', {}))

@loewis
Copy link
Mannequin

loewis mannequin commented Jul 5, 2012

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.

@loewis loewis mannequin closed this as completed Jul 5, 2012
@vpelletier
Copy link
Mannequin Author

vpelletier mannequin commented Jul 5, 2012

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 bpo-1581. But the closing reason here is more convincing to me than on bpo-1581.

Thanks.

@loewis
Copy link
Mannequin

loewis mannequin commented Jul 5, 2012

The situation is now much different from what it was for bpo-1561. Python 2 is closed for anything but bug fixes; this rules out code cleanup as well.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants