bindings: python: remove gpiod.version_string()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 14 Oct 2020 08:08:15 +0000 (10:08 +0200)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 14 Oct 2020 08:08:15 +0000 (10:08 +0200)
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 <bgolaszewski@baylibre.com>
bindings/python/gpiodmodule.c

index fee4c32406fabea4e9d7500c2a8b58096cbb8770..1c0dba5d3bb8e7d100c44209eef4af93a1a581a7 100644 (file)
@@ -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,
-       },
        { }
 };