[ python-Bugs-1690840 ] xmlrpclib methods submit call on __str__, __repr__

SourceForge.net noreply at sourceforge.net
Thu Mar 29 21:14:04 CEST 2007


Bugs item #1690840, was opened at 2007-03-29 19:14
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1690840&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Greg Hazel (ghazel)
Assigned to: Nobody/Anonymous (nobody)
Summary: xmlrpclib methods submit call on __str__, __repr__

Initial Comment:
Notice how trying to print a method causes it to submit the call:


Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from xmlrpclib import ServerProxy
>>> s = ServerProxy("http://google.com")
>>> print s.somecall
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\python25\lib\xmlrpclib.py", line 1147, in __call__
    return self.__send(self.__name, args)
  File "c:\python25\lib\xmlrpclib.py", line 1437, in __request
    verbose=self.__verbose
  File "c:\python25\lib\xmlrpclib.py", line 1191, in request
    headers
xmlrpclib.ProtocolError: <ProtocolError for google.com/RPC2: 501 Not Implemented


Similarly:

>>> f = s.somecall
>>> locals()
{'f': Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\python25\lib\xmlrpclib.py", line 1147, in __call__
    return self.__send(self.__name, args)
  File "c:\python25\lib\xmlrpclib.py", line 1437, in __request
    verbose=self.__verbose
  File "c:\python25\lib\xmlrpclib.py", line 1191, in request
    headers
xmlrpclib.ProtocolError: <ProtocolError for google.com/RPC2: 501 Not Implemented>



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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1690840&group_id=5470


More information about the Python-bugs-list mailing list