get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218312,
    "url": "http://patchwork.ozlabs.org/api/patches/2218312/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260401001459.19159-3-vfazio@gmail.com/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/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": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260401001459.19159-3-vfazio@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-01T00:14:52",
    "name": "[libgpiod,3/9] bindings: python: setup: add type annotations",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2f4bd08224094e78f2092d9568fca9fded5921e6",
    "submitter": {
        "id": 78694,
        "url": "http://patchwork.ozlabs.org/api/people/78694/?format=api",
        "name": "Vincent Fazio",
        "email": "vfazio@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260401001459.19159-3-vfazio@gmail.com/mbox/",
    "series": [
        {
            "id": 498263,
            "url": "http://patchwork.ozlabs.org/api/series/498263/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=498263",
            "date": "2026-04-01T00:14:50",
            "name": "[libgpiod,1/9] bindings: python: build_tests: do not fallback to distutils",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498263/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218312/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218312/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-34512-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=bDXX/eoy;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-gpio+bounces-34512-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=\"bDXX/eoy\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.42",
            "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 sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\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 4fllv74f7wz1yGw\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 11:18:11 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 25F67302712A\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 00:18:09 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 73D7918A92F;\n\tWed,  1 Apr 2026 00:18:08 +0000 (UTC)",
            "from mail-ot1-f42.google.com (mail-ot1-f42.google.com\n [209.85.210.42])\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 E7C1918BC3D\n\tfor <linux-gpio@vger.kernel.org>; Wed,  1 Apr 2026 00:18:06 +0000 (UTC)",
            "by mail-ot1-f42.google.com with SMTP id\n 46e09a7af769-7d1872504cbso426011a34.0\n        for <linux-gpio@vger.kernel.org>;\n Tue, 31 Mar 2026 17:18:06 -0700 (PDT)",
            "from Zephyrus.localdomain ([131.93.209.211])\n        by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7da0a7ea668sm9173679a34.19.2026.03.31.17.18.04\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 31 Mar 2026 17:18:05 -0700 (PDT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775002688; cv=none;\n b=lBIPTwrr3TDHe2EUnyizkoR9OYZVagTT0648orLXavoLxku04v7SlQw2nTMPyzrPFHijlId+2Mp1rO0nlK5PnD8K9TRTuRTCl9JuhV7XckXBFTjYzlGcH6p/HRZCaOEk+fPM5RZpqLxds7eU009X/TJbfpYnb1brjy/TYWADXXU=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775002688; c=relaxed/simple;\n\tbh=vmcQGfSdokuL2RhbLJNKjH4NvXM/fNPZowW3AErytnk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=GOFzzRtxge2BxknF7CFkcgw2U8tyndONu6xwmXz69aqihpCsD6QjVcwXt8gcNilHzqoq6qRzhI7lEK4xKTHVeHRiXLbCjZqiIVNsQQyt1mSAVxeybgHmfwy5TClxruPTvoY9WSsbzZ1+zdb+006Ffdas3IF//PJsDUoEpMR6ulY=",
        "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=bDXX/eoy; arc=none smtp.client-ip=209.85.210.42",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775002686; x=1775607486;\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=MJX7hL4hTjPHcklVVW+2FwrO6RmoRwssmjnnhZbP86Y=;\n        b=bDXX/eoyDcSOnxF3QkWawZb1wlM1qe43Fbrl5gTRlp/TiEZXLThN6Hpl6zzx7GSyGO\n         gJen4VxtpqutLZPF3uGsHVtn0M092wT9yOSUKyALyaPobyTGKDBuepIbeJaJxva66WsO\n         EdOLF5cXsU3IHKGVcYbnfMpb1bAiFoJsnhq7ouDJq4tRys6NJE52rT9YUMQAZr8Blv36\n         T3B3uJPTOVooVDZIMELiDz1pJ+ts+7xIWmRruEyNfp+TMmLam+cNKg8Iiqd5ycZrEVYK\n         7d/74Zs0Badpj0Ntc+3Qi3x/s3ixKCXPalBDJA59O0XVM2xwM9CqWlL+ZTYxM8l29Em0\n         AWwA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775002686; x=1775607486;\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=MJX7hL4hTjPHcklVVW+2FwrO6RmoRwssmjnnhZbP86Y=;\n        b=NQ43ali/ZyN/IKA2tYPXovN7+v76cQpdTJFSsunebBn2AIrOHJeaGQkzcEmkRQV87T\n         kMS/kBiAXs5iPuOHOoDU/gB9akmx9u/jZAFynKRHIu/uxdEBP4CpBWYFgXhAMRaWUcwT\n         2dBRrA8EbSbR+ycNk4ezBgcu1so6kMUChwHZS1cGDFW0LtYhWcFpzgOmcCRr8QQkatN7\n         lenwPOzCGJCc0OoryWfInZfmZfjQjc0NM2A8k2qTVoCReDVITXqIY4eWkicr8MV2IO6j\n         X2yM6K1C5b9vUFFw4OLXwrmbe7GFa0bZDu60C+nxmh+5AokSQJ9BmbCh7e9wbKs+Eb/1\n         msSA==",
        "X-Gm-Message-State": "AOJu0YxvLU4V3LYiAR6c2wAboM21kV5LSxIHw+woknpEDy5QipiroX9j\n\tK4H2ojWoG7kq5cZL59EdR482Y5gDZuoeCzIWVFzMUthxWoEya9vZGsdIS7RF0A==",
        "X-Gm-Gg": "ATEYQzx4aR5D0GoW7dqRBEHTbHq/I1UOv56zRKR9v2IEnmKAiGqIqUn4Vp8bi1m+/65\n\tSu0nWO8fNnf3RmnEsUO/eZEK6rutAGw//rTz8MUYJ8KqmXNTY5YPMoqmb01WLDeP2XgcmVyespQ\n\tmifzpa1/izud/GjRAXT1I1kqZu8uNZkFR7l/m/de0LFgaJbPd0aA1Ex+/VbFBV5jxVzT42h9I+P\n\tpNTiikCqSuHr1vlOoAE5P1KlGQQiWgx7ozDITDBDLSNR94DRs1vEHvBEmeZjIdC+aNTLSzcWEKE\n\twBykkUeXl8E/7Jqa9fEsEvbvOzbKe5N+siZTiDG0U5hYG07mNVIhym3CykovTV8WRcqDzs582Y1\n\tGo63b8Gw5eECkB6u0ZpY/ZKbh6DHWyjqwtEN0H+3yr+VLHgCyafMWHykafC1OC4kjp52iU4uEWl\n\te98VoM+/Tp7wcBVA4zyvE++fQhXz9093l4t26aT4Vd7z8i4DiENZJRGMgs94MO8w==",
        "X-Received": "by 2002:a05:6830:3693:b0:7d7:ecee:af6b with SMTP id\n 46e09a7af769-7db99f252f5mr906362a34.2.1775002685632;\n        Tue, 31 Mar 2026 17:18:05 -0700 (PDT)",
        "From": "Vincent Fazio <vfazio@gmail.com>",
        "To": "linux-gpio@vger.kernel.org",
        "Cc": "Vincent Fazio <vfazio@gmail.com>",
        "Subject": "[libgpiod][PATCH 3/9] bindings: python: setup: add type annotations",
        "Date": "Tue, 31 Mar 2026 19:14:52 -0500",
        "Message-ID": "<20260401001459.19159-3-vfazio@gmail.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260401001459.19159-1-vfazio@gmail.com>",
        "References": "<20260401001459.19159-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": "Add type annotations to help with lint checks.\n\nSigned-off-by: Vincent Fazio <vfazio@gmail.com>\n---\n bindings/python/setup.py | 25 +++++++++++++++----------\n 1 file changed, 15 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/bindings/python/setup.py b/bindings/python/setup.py\nindex 7bf9246..4061328 100644\n--- a/bindings/python/setup.py\n+++ b/bindings/python/setup.py\n@@ -1,8 +1,10 @@\n # SPDX-License-Identifier: GPL-2.0-or-later\n # SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>\n \n+from collections.abc import Callable\n from os import getenv, path, unlink\n from shutil import copy, copytree, rmtree\n+from typing import TypeVar\n \n from setuptools import Extension, setup\n from setuptools.command.build_ext import build_ext as orig_build_ext\n@@ -10,6 +12,8 @@ from setuptools.command.sdist import log\n from setuptools.command.sdist import sdist as orig_sdist\n from setuptools.errors import BaseError\n \n+T = TypeVar(\"T\", \"sdist\", \"build_ext\")\n+\n LINK_SYSTEM_LIBGPIOD = getenv(\"LINK_SYSTEM_LIBGPIOD\") == \"1\"\n LIBGPIOD_MINIMUM_VERSION = \"2.1\"\n LIBGPIOD_VERSION = getenv(\"LIBGPIOD_VERSION\")\n@@ -20,7 +24,7 @@ SHA256_CHUNK_SIZE = 2048\n LICENSE_FILE = \"LICENSE\"\n \n \n-def sha256(filename):\n+def sha256(filename: str) -> str:\n     \"\"\"\n     Return a sha256sum for a specific filename, loading the file in chunks\n     to avoid potentially excessive memory use.\n@@ -35,7 +39,7 @@ def sha256(filename):\n     return sha256sum.hexdigest()\n \n \n-def find_sha256sum(asc_file, tar_filename):\n+def find_sha256sum(asc_file: str, tar_filename: str) -> str:\n     \"\"\"\n     Search through a local copy of sha256sums.asc for a specific filename\n     and return the associated sha256 sum.\n@@ -49,7 +53,7 @@ def find_sha256sum(asc_file, tar_filename):\n     raise BaseError(f\"no signature found for {tar_filename}\")\n \n \n-def fetch_tarball(command):\n+def fetch_tarball(func: Callable[[T], None]) -> Callable[[T], None]:\n     \"\"\"\n     Verify the requested LIBGPIOD_VERSION tarball exists in sha256sums.asc,\n     fetch it from https://mirrors.edge.kernel.org/pub/software/libs/libgpiod/\n@@ -61,10 +65,10 @@ def fetch_tarball(command):\n \n     # If no LIBGPIOD_VERSION is specified in env, just run the command\n     if LIBGPIOD_VERSION is None:\n-        return command\n+        return func\n \n     # If LIBGPIOD_VERSION is specified, apply the tarball wrapper\n-    def wrapper(self):\n+    def wrapper(cmd: T) -> None:\n         # Just-in-time import of tarfile and urllib.request so these are\n         # not required for Yocto to build a vendored or linked package\n         import sys\n@@ -83,7 +87,7 @@ def fetch_tarball(command):\n         try:\n             if open(\"libgpiod-version.txt\", \"r\").read() == LIBGPIOD_VERSION:\n                 log.info(f\"skipping tarball fetch\")\n-                command(self)\n+                func(cmd)\n                 return\n         except OSError:\n             pass\n@@ -175,13 +179,13 @@ def fetch_tarball(command):\n                     # For further details, see `egg_info.find_sources` and\n                     # `manifest_maker.add_license_files`\n                     copy(_path, LICENSE_FILE)\n-                    self.distribution.metadata.license_files = [LICENSE_FILE]\n+                    cmd.distribution.metadata.license_files = [LICENSE_FILE]  # type: ignore[attr-defined]\n \n         # Save the libgpiod version for sdist\n         open(\"libgpiod-version.txt\", \"w\").write(LIBGPIOD_VERSION)\n \n         # Run the command\n-        command(self)\n+        func(cmd)\n \n         # Clean up the build directory\n         if path.exists(LICENSE_FILE):\n@@ -206,8 +210,9 @@ class build_ext(orig_build_ext):\n     \"\"\"\n \n     @fetch_tarball\n-    def run(self):\n+    def run(self) -> None:\n         # Try to get the gpiod version from the .txt file included in sdist\n+        libgpiod_version: str | None\n         try:\n             libgpiod_version = open(\"libgpiod-version.txt\", \"r\").read()\n         except OSError:\n@@ -251,7 +256,7 @@ class sdist(orig_sdist):\n     \"\"\"\n \n     @fetch_tarball\n-    def run(self):\n+    def run(self) -> None:\n         super().run()\n \n \n",
    "prefixes": [
        "libgpiod",
        "3/9"
    ]
}