]> granicus.if.org Git - python/commitdiff
Revert r53672, just fix signature of time_isoformat instead.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 18 Feb 2007 08:50:38 +0000 (08:50 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 18 Feb 2007 08:50:38 +0000 (08:50 +0000)
Misc/NEWS
Modules/datetimemodule.c

index cd72a0c9a8335b9b2c1b6eee87dc359a46c9d202..92c7e7c06175cacc6c87d08d3cb70676b9489357 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -111,7 +111,7 @@ Extension Modules
 
 - Patch #1657276: Make NETLINK_DNRTMSG conditional.
 
-- Bug #1653736: Complain about keyword arguments to time.isoformat.
+- Bug #1653736: Fix signature of time_isoformat.
 
 - operator.count() now raises an OverflowError when the count reaches sys.maxint.
 
index cf8a68ba226e2e97f6d40d03022e93b1829a32ef..9ae77326b663505ad470ee6101f34c66ff0a84f9 100644 (file)
@@ -3166,8 +3166,11 @@ time_str(PyDateTime_Time *self)
        return PyObject_CallMethod((PyObject *)self, "isoformat", "()");
 }
 
+/* Even though this silently ignores all arguments, it cannot
+   be fixed to reject them in release25-maint */
 static PyObject *
-time_isoformat(PyDateTime_Time *self, PyObject *unused)
+time_isoformat(PyDateTime_Time *self, PyObject *unused_args, 
+              PyObject *unused_keywords)
 {
        char buf[100];
        PyObject *result;
@@ -3411,7 +3414,7 @@ time_reduce(PyDateTime_Time *self, PyObject *arg)
 
 static PyMethodDef time_methods[] = {
 
-       {"isoformat",   (PyCFunction)time_isoformat,    METH_NOARGS,
+       {"isoformat",   (PyCFunction)time_isoformat,    METH_KEYWORDS,
         PyDoc_STR("Return string in ISO 8601 format, HH:MM:SS[.mmmmmm]"
                   "[+HH:MM].")},