[Python-checkins] CVS: python/dist/src/Lib xmlrpclib.py,1.2,1.3
Fredrik Lundh
effbot@users.sourceforge.net
Thu, 23 Aug 2001 13:04:35 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv7665/Lib
Modified Files:
xmlrpclib.py
Log Message:
updated to current PythonWare version (1.0b3). fixed type checks in
DateTime constructor. use ServerProxy instead of Server in sample
code.
Index: xmlrpclib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xmlrpclib.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** xmlrpclib.py 2001/08/02 04:15:00 1.2
--- xmlrpclib.py 2001/08/23 20:04:33 1.3
***************
*** 28,32 ****
# 2001-03-28 fl Make sure response tuple is a singleton
# 2001-03-29 fl Don't require empty params element (from Nicholas Riley)
! # 2001-06-10 fl Folded in _xmlrpclib accelerator support
#
# Copyright (c) 1999-2001 by Secret Labs AB.
--- 28,33 ----
# 2001-03-28 fl Make sure response tuple is a singleton
# 2001-03-29 fl Don't require empty params element (from Nicholas Riley)
! # 2001-06-10 fl Folded in _xmlrpclib accelerator support (1.0b2)
! # 2001-08-20 fl Base xmlrpclib.Error on built-in Exception (from Paul Prescod)
#
# Copyright (c) 1999-2001 by Secret Labs AB.
***************
*** 114,123 ****
return string
! __version__ = "1.0b2"
# --------------------------------------------------------------------
# Exceptions
! class Error:
# base class for client errors
pass
--- 115,124 ----
return string
! __version__ = "1.0b3"
# --------------------------------------------------------------------
# Exceptions
! class Error(Exception):
# base class for client errors
pass
***************
*** 196,202 ****
def __init__(self, value=0):
! t = type(value)
! if not isinstance(t, StringType):
! if not isinstance(t, TupleType):
if value == 0:
value = time.time()
--- 197,202 ----
def __init__(self, value=0):
! if not isinstance(value, StringType):
! if not isinstance(value, TupleType):
if value == 0:
value = time.time()
***************
*** 388,391 ****
--- 388,396 ----
else:
# parameter block
+ # FIXME: the xml-rpc specification allows us to leave out
+ # the entire <params> block if there are no parameters.
+ # however, changing this may break older code (including
+ # old versions of xmlrpclib.py), so this is better left as
+ # is for now. See @XMLRPC3 for more information. /F
write("<params>\n")
for v in values:
***************
*** 902,906 ****
def __repr__(self):
return (
! "<Server proxy for %s%s>" %
(self.__host, self.__handler)
)
--- 907,911 ----
def __repr__(self):
return (
! "<ServerProxy for %s%s>" %
(self.__host, self.__handler)
)
***************
*** 915,918 ****
--- 920,924 ----
# result getattr(server, "strange-python-name")(args)
+ # compatibility
Server = ServerProxy
***************
*** 924,929 ****
# simple test program (from the XML-RPC specification)
! # server = Server("http://localhost:8000") # local server
! server = Server("http://betty.userland.com")
print server
--- 930,935 ----
# simple test program (from the XML-RPC specification)
! # server = ServerProxy("http://localhost:8000") # local server
! server = ServerProxy("http://betty.userland.com")
print server