bpo-29695: Deprecated using bad named keyword arguments in builtings: (#486)
int(), bool(), float(), list() and tuple(). Specify the value as a
positional argument instead.
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 0bf6cee..6c47602 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -4811,6 +4811,12 @@
}
return PyLong_FromLong(0L);
}
+ if (PyTuple_GET_SIZE(args) == 0) {
+ if (PyErr_Warn(PyExc_DeprecationWarning,
+ "Using 'x' as a keyword argument is deprecated; "
+ "specify the value as a positional argument instead") < 0)
+ return NULL;
+ }
if (obase == NULL)
return PyNumber_Long(x);