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.

Title: datetime/xmlrpclib.DateTime comparison
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, fdrake, skip.montanaro
Priority: normal Keywords: patch

Created on 2005-10-19 02:46 by skip.montanaro, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
xmlrpclib.diff skip.montanaro, 2005-10-22 21:01
Messages (6)
msg48876 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2005-10-19 02:46
Recent changes to xmlrpclib provided improved support for
datetime objects.  This patch improves that by adding
support for comparison of xmlrpclib.DateTime objects with
datetime.{datetime,date,time} objects.

On the Mojam web server I run with an xmlrpclib module
that is close to what Python 2.5 will have, though I
use Python 2.3.4.  The datetime support breaks the
antispam BadContent support in MoinMoin's security
policy because datetime objects and xmlrpclib.DateTime
objects can't be compared.  I believe this patch
should solve that (though I haven't had time to test that
yet).  I've added new test cases to check support for
comparing datetime.{datetime,date} objects with DateTime 
objects.  I still need to add a test case to check support
for comparing datetime.time objects.

I believe something like this needs to go in 2.5 (maybe
this should have been a bug report instead of patch).

All Python test cases pass.
msg48877 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2005-10-22 21:01
Logged In: YES 

Based on inputs from python-dev I removed conversions of and
comparisons with and datetime.time objects. I
also tweaked it to work with Python 2.2 through Python 2.5
(datetime support is unavailable in Python2.2).  New patch is
attached.  I'd simply check this in except I've not done
anything with rich comparisons before.

Assigning to Fred since he's familiar with the code.

msg55564 - (view) Author: Skip Montanaro (skip.montanaro) * (Python triager) Date: 2007-09-01 17:44
Fred, can we move this forward?
msg62578 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2008-02-20 00:11
Skip, I can look at xmlrpclib issues.
msg62763 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2008-02-23 16:13
The patch looks OK.

The python-dev discussion starts at

I'm nervous about removing the ability to pass a date or time to
the constructor, but the consensus was that this conversion was a bad
idea, so I'll apply the patch as-is, and update the docs.
msg62765 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2008-02-23 16:23
Committed to 2.6 trunk in rev. 60991.
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42498
2008-02-23 16:23:37akuchlingsetstatus: open -> closed
resolution: accepted
messages: + msg62765
2008-02-23 16:13:21akuchlingsetmessages: + msg62763
2008-02-20 00:11:25akuchlingsetassignee: fdrake -> akuchling
messages: + msg62578
nosy: + akuchling
2007-09-01 17:44:59skip.montanarosetmessages: + msg55564
2005-10-19 02:46:18skip.montanarocreate