Bugs item #1164912, was opened at 2005-03-16 19:27 Message generated for change (Comment added) made by akuchling You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1164912&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: Python 2.4 >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Allan Saddi (asaddi) >Assigned to: A.M. Kuchling (akuchling) Summary: xmlrpclib.DateTime.decode() should stringify argument Initial Comment: DateTime.decode() is allowing unicode strings to be assigned to self.value. Python 2.4 (#2, Feb 17 2005, 09:44:14) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type "help", "copyright", "credits" or "license" for more information. >>> from xmlrpclib import * >>> s = loads(dumps((DateTime(),), methodresponse=True)) >>> print s ((<DateTime u'20050316T16:10:20' at 81ca38c>,), None) When this DateTime object with unicode value is subsequently passed to dumps(), dumps() will either return the result as a unicode string (which I don't believe is the correct behavior), or it will raise a UnicodeDecodeError. >>> dumps(s[0]) u'<params>\n<param>\n<value><dateTime.iso8601>20050316T16: 10:20</dateTime.iso8601></value>\n</param>\n</params>\n' (UnicodeDecodeError is raised when marshalling other unicode strings that do not have a simple ascii representation with the resultant DateTime.) ---------------------------------------------------------------------- >Comment By: A.M. Kuchling (akuchling) Date: 2005-12-04 14:13 Message: Logged In: YES user_id=11375 I've added the str() call to xmlrpclib in rev41594. Thanks for reporting this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1164912&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com