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: xmlrpc is broken
Type: behavior Stage: needs patch
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, jhylton
Priority: release blocker Keywords:

Created on 2008-11-28 22:43 by benjamin.peterson, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg76563 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-11-28 22:43
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'

----------------------------------------------------------------------
msg76598 - (view) Author: Jeremy Hylton (jhylton) (Python triager) Date: 2008-11-29 16:21
I don't think I understand this report.  The TransportSubclassTestCase
class tests the behavior of overridable methods that don't exist in
Python 3.0.  Is this really a Python 3.0 problem?  I'm not sure why we
expect it to work there.

Jeremy

On Fri, Nov 28, 2008 at 5:43 PM, Benjamin Peterson
<report@bugs.python.org> wrote:
>
> New submission from Benjamin Peterson <musiccomposition@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@bugs.python.org>
> <http://bugs.python.org/issue4456>
> _______________________________________
>
msg76599 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-11-29 16:27
On Sat, Nov 29, 2008 at 10:21 AM, Jeremy Hylton <report@bugs.python.org> wrote:
>
> Jeremy Hylton <jeremy@alum.mit.edu> added the comment:
>
> I don't think I understand this report.  The TransportSubclassTestCase
> class tests the behavior of overridable methods that don't exist in
> Python 3.0.  Is this really a Python 3.0 problem?  I'm not sure why we
> expect it to work there.

Oh! I had no idea that those methods were not supported in 3.0. I
guess we can close this.

>
> Jeremy
History
Date User Action Args
2022-04-11 14:56:41adminsetgithub: 48706
2008-11-29 16:27:41benjamin.petersonsetstatus: open -> closed
resolution: not a bug
2008-11-29 16:27:24benjamin.petersonsetmessages: + msg76599
2008-11-29 16:21:35jhyltonsetmessages: + msg76598
2008-11-28 22:43:50benjamin.petersoncreate