[issue4456] xmlrpc is broken

Benjamin Peterson report at bugs.python.org
Fri Nov 28 23:43:51 CET 2008


New submission from Benjamin Peterson <musiccomposition at gmail.com>:

It looks there are logic problems with regards to encoding in xmlrpc:

        if not isinstance(methodname, str):
            methodname = methodname.encode(encoding)

Merging r67370 and running test_xmlrpc gives:

test_bug_1164912 (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_cmp_datetime_DateTime (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_datetime_before_1900 (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_bad_dict (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_bare_datetime (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_big_int (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_big_long (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_load (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_none (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_recursive_dict (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_dump_recursive_seq (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_newstyle_class (test.test_xmlrpc.XMLRPCTestCase) ... ok
test_escape (test.test_xmlrpc.HelperTestCase) ... ok
test_datetime_datetime (test.test_xmlrpc.DateTimeTestCase) ... ok
test_decode (test.test_xmlrpc.DateTimeTestCase) ... ok
test_default (test.test_xmlrpc.DateTimeTestCase) ... ok
test_repr (test.test_xmlrpc.DateTimeTestCase) ... ok
test_time (test.test_xmlrpc.DateTimeTestCase) ... ok
test_time_struct (test.test_xmlrpc.DateTimeTestCase) ... ok
test_time_tuple (test.test_xmlrpc.DateTimeTestCase) ... ok
test_decode (test.test_xmlrpc.BinaryTestCase) ... ok
test_default (test.test_xmlrpc.BinaryTestCase) ... ok
test_string (test.test_xmlrpc.BinaryTestCase) ... ok
test_dotted_attribute (test.test_xmlrpc.FaultTestCase) ... ok
test_dump_fault (test.test_xmlrpc.FaultTestCase) ... ok
test_repr (test.test_xmlrpc.FaultTestCase) ... ok
test_custom_user_agent (test.test_xmlrpc.TransportSubclassTestCase) ...
ERROR
test_send_content (test.test_xmlrpc.TransportSubclassTestCase) ... ERROR
test_send_host (test.test_xmlrpc.TransportSubclassTestCase) ... ERROR
test_send_request (test.test_xmlrpc.TransportSubclassTestCase) ... ERROR
test_dotted_attribute (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_introspection1 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_introspection2 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_introspection3 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_introspection4 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_multicall (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_non_existing_multicall (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_simple1 (test.test_xmlrpc.SimpleServerTestCase) ... ok
test_basic (test.test_xmlrpc.FailingServerTestCase) ... ok
test_fail_no_info (test.test_xmlrpc.FailingServerTestCase) ... ok
test_fail_with_info (test.test_xmlrpc.FailingServerTestCase) ... ok
test_cgi_get (test.test_xmlrpc.CGIHandlerTestCase) ... ok
test_cgi_xmlrpc_response (test.test_xmlrpc.CGIHandlerTestCase) ... ok

======================================================================
ERROR: test_custom_user_agent (test.test_xmlrpc.TransportSubclassTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 657, in
test_custom_user_agent
    req = self.issue_request(TestTransport)
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 645, in
issue_request
    proxy.pow(6, 8)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1095, in __call__
    return self.__send(self.__name, args)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1353, in __request
    verbose=self.__verbose
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1136, in request
    return self._parse_response(resp, None)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1246, in
_parse_response
    p.feed(response)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 516, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 12, column 2

======================================================================
ERROR: test_send_content (test.test_xmlrpc.TransportSubclassTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 687, in
test_send_content
    req = self.issue_request(TestTransport)
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 645, in
issue_request
    proxy.pow(6, 8)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1095, in __call__
    return self.__send(self.__name, args)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1353, in __request
    verbose=self.__verbose
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1136, in request
    return self._parse_response(resp, None)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1246, in
_parse_response
    p.feed(response)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 516, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 12, column 2

======================================================================
ERROR: test_send_host (test.test_xmlrpc.TransportSubclassTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 667, in
test_send_host
    req = self.issue_request(TestTransport)
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 645, in
issue_request
    proxy.pow(6, 8)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1095, in __call__
    return self.__send(self.__name, args)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1353, in __request
    verbose=self.__verbose
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1136, in request
    return self._parse_response(resp, None)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1246, in
_parse_response
    p.feed(response)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 516, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: mismatched tag: line 12, column 2

======================================================================
ERROR: test_send_request (test.test_xmlrpc.TransportSubclassTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 677, in
test_send_request
    req = self.issue_request(TestTransport)
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 645, in
issue_request
    proxy.pow(6, 8)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1095, in __call__
    return self.__send(self.__name, args)
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1353, in __request
    verbose=self.__verbose
  File "/temp/python/py3k/Lib/xmlrpc/client.py", line 1124, in request
    http_conn = self.send_request(host, handler, request_body, verbose)
  File "/temp/python/py3k/Lib/test/test_xmlrpc.py", line 675, in
send_request
    conn.putheader("X-Test", "test_send_request")
AttributeError: 'str' object has no attribute 'putheader'

----------------------------------------------------------------------

----------
components: Library (Lib)
messages: 76563
nosy: benjamin.peterson, jhylton
priority: release blocker
severity: normal
stage: needs patch
status: open
title: xmlrpc is broken
type: behavior
versions: Python 3.0

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


More information about the Python-bugs-list mailing list