get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2227558/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2227558,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2227558/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260423222125.29097-6-vfazio@gmail.com/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/42/?format=api",
        "name": "Linux GPIO development",
        "link_name": "linux-gpio",
        "list_id": "linux-gpio.vger.kernel.org",
        "list_email": "linux-gpio@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260423222125.29097-6-vfazio@gmail.com>",
    "date": "2026-04-23T22:21:22",
    "name": "[libgpiod,v2,5/8] bindings: python: use PyImport_ImportModuleAttrString when available",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6e7a81fa6f60233c62dd60ffa9f2f6eba2576784",
    "submitter": {
        "id": 78694,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/78694/?format=api",
        "name": "Vincent Fazio",
        "email": "vfazio@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260423222125.29097-6-vfazio@gmail.com/mbox/",
    "series": [
        {
            "id": 501257,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501257/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=501257",
            "date": "2026-04-23T22:21:18",
            "name": "bindings: python: modernize C extensions",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/501257/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227558/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227558/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-35437-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-gpio@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=f6Quf3Q6;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35437-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"f6Quf3Q6\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.160.47",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com"
        ],
        "Received": [
            "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1rDQ73Chz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 08:21:58 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 93DE7301DCD2\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 22:21:54 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 73B8437C916;\n\tThu, 23 Apr 2026 22:21:54 +0000 (UTC)",
            "from mail-oa1-f47.google.com (mail-oa1-f47.google.com\n [209.85.160.47])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 04B912EC081\n\tfor <linux-gpio@vger.kernel.org>; Thu, 23 Apr 2026 22:21:52 +0000 (UTC)",
            "by mail-oa1-f47.google.com with SMTP id\n 586e51a60fabf-42fbf95cca8so2004610fac.0\n        for <linux-gpio@vger.kernel.org>;\n Thu, 23 Apr 2026 15:21:52 -0700 (PDT)",
            "from Zephyrus.localdomain ([131.93.209.211])\n        by smtp.gmail.com with ESMTPSA id\n 586e51a60fabf-42b930afa63sm17784598fac.5.2026.04.23.15.21.51\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 23 Apr 2026 15:21:51 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776982914; cv=none;\n b=pO1QAt7o90+oGADsGzwIE+gHoYRQkU8P4go/hAeM3DMWFUbYQgvB/fquwTsCS5ebDBcQNUFUT4+tgjuwaMvJWUrSIM7Vkyb+5MiPKnnM/OGgKnysLJyu27zT+igSI10tgtzJ9gUbz6v66rp8dXdV1yn4ZE2afXdWeuXyyBSqQF4=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776982914; c=relaxed/simple;\n\tbh=tpuxXJ4fKIV8MkMtvscHa5DQXdXPFwcCok4985Xen8M=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=FAFxW/SmhBEvSU3gQyZXdcAxTb3iZj+dadktQFkUfuUtOujOpmAXSRY0NP5hKq3K+gUAiV6sRZjdV3vD8IPQII8VTTmae8npgTg9WQJz4bvyFdSBtx358CaJ/F8PRFA70djCHWjyDwjsf6vAoWc58URKmYtg90iiH9u5cokZ8yQ=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=f6Quf3Q6; arc=none smtp.client-ip=209.85.160.47",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776982912; x=1777587712;\n darn=vger.kernel.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=Z2nMEq+vh8lDv5J7/vwrmy0PP3tp5v9ohfw+PwdcpIQ=;\n        b=f6Quf3Q6Tubc6wwnBKMHnlP+x+LvPaJYIBJvzX+xNWHQHP3PT4PHxQ3gMiPuHHykaT\n         z6c80rSNy03OIsrpH4MNqMKBOzPgwJb3+eN485zsmQsug7vnKuVt5b6zx2ZbLnfv2zzR\n         XNDQuOYgqMImNfbSviKNsgsbmXFaG6Oncl3/HCLbPPjkP/nLSC5Z5/pOBmXzmjbTyVQP\n         L/KB5vJ15sQTsckXIYG2j98hYTTMvpIzjCwl+dIlPdRlTDrIHjeov2wOJCnQLVu2WfaM\n         5/3bz1QMl32UH5qsC9I7EWBLUQcbRsrgihJwTaQSrGzqgEnbJxtEI+s+3FQNswMLO/vp\n         ejwA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776982912; x=1777587712;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=Z2nMEq+vh8lDv5J7/vwrmy0PP3tp5v9ohfw+PwdcpIQ=;\n        b=FG4SZ3P/pGzLFln2aF30IJJQlLdK3QndoJJyFlP5kUZ6PZlCqV1OJDxwx4SileI1bQ\n         wt2lYue7M9/OB3P/PZObUJ2GpELhEgfXASGsiBPTjM/pCRnJfgNZRhjE7JQjslJ0zPJE\n         oZE+RHob5CUG6ZwWUuGyiRLkLV9dpyCEn9OM7iZ3eTbB8s5R5yRwKqUNdZ3AnuXkdgjg\n         h9iGHjsxoGr+oVBoz88L50bVkWoLn/36JSxakmTUelTxti8fjQ+sxfSBSG3cgcyy/136\n         eVfVQGuYKWd4cNZpO+pJ+QuJqToYw+/4SoFwLtutVasnmaFEt+JlZeQQXs/uy4mQrhpj\n         uXtw==",
        "X-Gm-Message-State": "AOJu0Yxn5h2J76HGTQ5p9LiVGuGEFAKGLJzDGoS520ASQ9NuP8PClTkR\n\tiRSrtMBCdeTsa7FzFTnUeroUUUPM4NafrecZKbS4JqxOZhClUN+inHjTT8Q5bQ==",
        "X-Gm-Gg": "AeBDiesZN/+0/dFTshQkVGmO+sh7X7BBX9ZLcDx/I2H1hN44DPzRU2YDh0T7xvMgjX2\n\tYZYhf6v8FvNQqOVHHfbJcVdl68rHPwP0YF1qFOY27il/xT7AgW6pbKlcu4nIc/GwSnnO1qkn3YT\n\tD8ER/tW8LxXQJU/aq6DW3XxVpplh3N/ZkdclC+bg56B1de2CYr9kGeS9URi7EnAy5YREs3s8oMx\n\tYQhBj7oWkUj3a2q67hjuPyF9qwhWJEFRRGwUdHKLdSmUoWwfHaXhjtbzekDN9TkNbD/v/X2NnxO\n\t370FStLhy9fGIjzdS/tuX1Dz14NI2MWVtxJwBvnVmztfclcJNsrzAoEKhZ7SmgrAC9w384NIpfR\n\tXU9Hx5nwEDu1hXUHptC1UnxEtHM3hUJ9+nGIlmaeJGuvw/sBK7ngsIIT3rPFl3YZxpseaGVt7G7\n\tY6WoEzhGs7/J8/IPdGWsemGK0Yb2fYBzGt16iDbAXujzQKZwtturr5UfV8itRzGh2JoAj1vC/TX\n\tCUuAQ1vX6s=",
        "X-Received": "by 2002:a05:6870:c1d1:b0:3d9:2fe2:f5c8 with SMTP id\n 586e51a60fabf-42aded75b22mr18515464fac.32.1776982911841;\n        Thu, 23 Apr 2026 15:21:51 -0700 (PDT)",
        "From": "Vincent Fazio <vfazio@gmail.com>",
        "To": "linux-gpio@vger.kernel.org",
        "Cc": "brgl@kernel.org,\n\tVincent Fazio <vfazio@gmail.com>",
        "Subject": "[libgpiod][PATCH v2 5/8] bindings: python: use\n PyImport_ImportModuleAttrString when available",
        "Date": "Thu, 23 Apr 2026 17:21:22 -0500",
        "Message-ID": "<20260423222125.29097-6-vfazio@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260423222125.29097-1-vfazio@gmail.com>",
        "References": "<20260423222125.29097-1-vfazio@gmail.com>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-gpio@vger.kernel.org",
        "List-Id": "<linux-gpio.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-gpio+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-gpio+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Commit 035ad74fdd introduced Py_gpiod_GetModuleAttrString as a way to\nget a module's attribute and was inspired by CPython's internal function\n_PyImport_GetModuleAttrString.\n\nCPython 3.14 added PyImport_ImportModuleAttrString to the public API [0]\nwhich allows us to use the standard function when available.\n\n[0]: https://github.com/python/cpython/pull/128912\n\nSigned-off-by: Vincent Fazio <vfazio@gmail.com>\n---\n bindings/python/gpiod/ext/common.c   |  3 +++\n bindings/python/gpiod/ext/internal.h | 10 ++++++++--\n 2 files changed, 11 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/bindings/python/gpiod/ext/common.c b/bindings/python/gpiod/ext/common.c\nindex 7d2dda7..fc28e96 100644\n--- a/bindings/python/gpiod/ext/common.c\n+++ b/bindings/python/gpiod/ext/common.c\n@@ -64,6 +64,8 @@ PyObject *Py_gpiod_SetErrFromErrno(void)\n \treturn PyErr_SetFromErrno(exc);\n }\n \n+/* TODO: remove when 3.14 is the minimum version */\n+#if PY_VERSION_HEX < 0x030E0000\n PyObject *Py_gpiod_GetModuleAttrString(const char *modname,\n \t\t\t\t       const char *attrname)\n {\n@@ -78,6 +80,7 @@ PyObject *Py_gpiod_GetModuleAttrString(const char *modname,\n \n \treturn attribute;\n }\n+#endif\n \n unsigned int Py_gpiod_PyLongAsUnsignedInt(PyObject *pylong)\n {\ndiff --git a/bindings/python/gpiod/ext/internal.h b/bindings/python/gpiod/ext/internal.h\nindex 15aedfb..2996884 100644\n--- a/bindings/python/gpiod/ext/internal.h\n+++ b/bindings/python/gpiod/ext/internal.h\n@@ -8,8 +8,6 @@\n #include <Python.h>\n \n PyObject *Py_gpiod_SetErrFromErrno(void);\n-PyObject *Py_gpiod_GetModuleAttrString(const char *modname,\n-\t\t\t\t       const char *attrname);\n unsigned int Py_gpiod_PyLongAsUnsignedInt(PyObject *pylong);\n void Py_gpiod_dealloc(PyObject *self);\n PyObject *Py_gpiod_MakeRequestObject(struct gpiod_line_request *request,\n@@ -17,4 +15,12 @@ PyObject *Py_gpiod_MakeRequestObject(struct gpiod_line_request *request,\n struct gpiod_line_config *Py_gpiod_LineConfigGetData(PyObject *obj);\n struct gpiod_line_settings *Py_gpiod_LineSettingsGetData(PyObject *obj);\n \n+#if PY_VERSION_HEX >= 0x030E0000\n+/* Alias to standard function available in 3.14 */\n+#define Py_gpiod_GetModuleAttrString PyImport_ImportModuleAttrString\n+#else\n+PyObject *Py_gpiod_GetModuleAttrString(const char *modname,\n+\t\t\t\t       const char *attrname);\n+#endif /* PY_VERSION_HEX >= 0x030E0000 */\n+\n #endif /* __LIBGPIOD_PYTHON_MODULE_H__ */\n",
    "prefixes": [
        "libgpiod",
        "v2",
        "5/8"
    ]
}