From: Bartosz Golaszewski Date: Wed, 14 Oct 2020 08:08:15 +0000 (+0200) Subject: bindings: python: remove gpiod.version_string() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0bea9ee220eb69526475060e853dc0c6abe7a918;p=qemu-gpiodev%2Flibgpiod.git bindings: python: remove gpiod.version_string() We support the standard __version__ module attribute. There's no need to duplicate this functionality in the form of the version_string() function. Signed-off-by: Bartosz Golaszewski --- diff --git a/bindings/python/gpiodmodule.c b/bindings/python/gpiodmodule.c index fee4c32..1c0dba5 100644 --- a/bindings/python/gpiodmodule.c +++ b/bindings/python/gpiodmodule.c @@ -2687,18 +2687,6 @@ static gpiod_LineObject *gpiod_Module_find_line(PyObject *Py_UNUSED(self), return line_obj; } -PyDoc_STRVAR(gpiod_Module_version_string_doc, -"version_string() -> string\n" -"\n" -"DEPRECATED: use __version__ module attribute instead.\n" -"Get the API version of the library as a human-readable string."); - -static PyObject *gpiod_Module_version_string(PyObject *Py_UNUSED(ignored0), - PyObject *Py_UNUSED(ignored1)) -{ - return PyUnicode_FromFormat("%s", gpiod_version_string()); -} - static PyMethodDef gpiod_module_methods[] = { { .ml_name = "find_line", @@ -2706,12 +2694,6 @@ static PyMethodDef gpiod_module_methods[] = { .ml_flags = METH_VARARGS, .ml_doc = gpiod_Module_find_line_doc, }, - { - .ml_name = "version_string", - .ml_meth = (PyCFunction)gpiod_Module_version_string, - .ml_flags = METH_NOARGS, - .ml_doc = gpiod_Module_version_string_doc, - }, { } };