Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218313/?format=api
{ "id": 2218313, "url": "http://patchwork.ozlabs.org/api/patches/2218313/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260401001459.19159-4-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-4-vfazio@gmail.com>", "list_archive_url": null, "date": "2026-04-01T00:14:53", "name": "[libgpiod,4/9] bindings: python: setup: apply linter recommendations", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "acbf5df73a78b2cdc1f2afc724e40c399bd886c7", "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-4-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/2218313/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218313/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-gpio+bounces-34513-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=aYbSUaUg;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-gpio+bounces-34513-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=\"aYbSUaUg\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.167.182", "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\n [IPv6:2600:3c09:e001:a7::12fc:5321])\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 4fllv86z5Qz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 11:18:12 +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 B835D30358A9\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 625D3189F20;\n\tWed, 1 Apr 2026 00:18:09 +0000 (UTC)", "from mail-oi1-f182.google.com (mail-oi1-f182.google.com\n [209.85.167.182])\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 DD1DF54774\n\tfor <linux-gpio@vger.kernel.org>; Wed, 1 Apr 2026 00:18:07 +0000 (UTC)", "by mail-oi1-f182.google.com with SMTP id\n 5614622812f47-46aa216a65aso2299504b6e.1\n for <linux-gpio@vger.kernel.org>;\n Tue, 31 Mar 2026 17:18:07 -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.05\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 17:18:06 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775002689; cv=none;\n b=UyE4lxbEbGlZeKrkc+4ZtpWL2SjFx65LbsWAZBz4yBIbGvNXQyuun522F156STOGBDsKnJC805f1ZgdGXjkRQ1JeBoW3Dwxpy59yHOGNpWLRC1paEhwczBa+xXc4/USgEiQmT2BcnbR3l/3aNUS98774kgDVhYzocvtknsPM5cM=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775002689; c=relaxed/simple;\n\tbh=aO6z0pIlEfgd9NJupNQ+WoAXFx4hkywd+0dZ7J7Z8uQ=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=UEkE4lsjGjw8B+uxa2aUuP9KPtT0RH6pcBA1IjSpa08bu04xASOmwujaZZe63UmK4RHluVEOYNZJWGXTKOv8LlSKitOGdqHOzUxToLp7xsh9S4CSzG6U5qMc1J2/NAEILO+uvX1Jwwgti7/UyG4P4fI6OD5VUhBm2Ox8ZGDXpY0=", "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=aYbSUaUg; arc=none smtp.client-ip=209.85.167.182", "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=9Oe0Pdp4ldq+lBERamuDmC69rk6YjZVnj4Xz4VeI3KM=;\n b=aYbSUaUgkSKoRMyLFbUuq2wLuaVkWpK4AZ6sFxd0cKjZ1xS7vkwLGzbbPfl7t8974s\n 33cpFHomdXzVAz97jcVbL0WqwApOvrzYvFRePQn1pHrk6HcEvOtK7Vgnf79vBmpHTEHj\n 3fWZXT3uo1BoqjC9wVFnV501usqM1ltRJvs+5N2T8Ig2wezae5Zh1WtyZOWM+CLNXJTn\n 2i6nNPxL3FIURm2kpVtTxJ9JQLjHm2As36OSMphrWrkzpT8nXAlY8IvNBuZ2SxjkIV0V\n c2AiXc84nyme9v2gfmX3Pp6E1jrC8vMH+5wpWPi4f/cKL2/WqemkER5BWxe2Cf+HktAQ\n F2fA==", "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=9Oe0Pdp4ldq+lBERamuDmC69rk6YjZVnj4Xz4VeI3KM=;\n b=e4RKPrZF0M5sN87MLeloU/W4JahXDYEIXD7FL0wfbb3IhAnJbUXBYPglbSszeZuf8K\n dI56YzgVp1DdnCJI55GX0sN+ptJed4I7UzivQs1D/UvPaSsH6DGovYql+WikomeG0eh9\n /YbjAzduuIkKVeZqaZMx9fqLwQ5KVU/N5Cu4PIMBnwMZ4OZ1MIQQiKcyc0ALxTOyx0ka\n ByNg1nYFKIxANdHAU8tSxXrX9BLDJrNY/lQvoaxp7xVaR2ocJkE/7RpF99rfEc0V4x6W\n snx/FuML7IQBVg7Eqpf7C2e2ZAPVQkqYa1x+WHLe1DhhCO89cwo+wj3aLMg4yAlBOjEG\n 54dg==", "X-Gm-Message-State": "AOJu0YzF7zkAA7GpbI3kUjab/klCbibm4G1qP6JJApGB4zC3NtcHSeca\n\tN5MlBGKfREnfvAMXY+4fOY74iRjcHy95IqEPgUy+CIl0tb1QSd/D7TVDxnGv1g==", "X-Gm-Gg": "ATEYQzxnarGvJPiUMk9kMxcL1in7Lm6gwDoU4uEjlt0BiTSkqcB3Ep0kdmNKO95ZxC+\n\tTKYUDG8JcMJp1u9h8Qo3aKZgHJk1z9IyV5GuzPv1mA/Bo3rm2Zq5PxNklwMKgT+NmKGSv2cPIU2\n\taTsdjQO/bthUk5/MZ2/TC7MY0jHZuO8K+Fbeer4nNfOtuL0hkMIP1l11F83CKmRJRe5LmqSLtMq\n\teT4C7I/p1T8Z6UgMbDkwZUNCC2JIoyJ3FT2idwPxlUNogr+XoqFwOKo9gSvsVmZWUWd8+sLsHfd\n\t0UCc2Mewfnr9lH/W5p1LhyfQW6AkO2nsIB+RVSEPgBSj72G2ZErhRezsNOpJEyoAi7jeYEsofmx\n\tmzg2fJCtj/3pSNjUX7TPy082XCKCy40nlFxOp1TtLIqIcdoLu6jtXF97Jb0VVW+vHdbKnDBr+Vg\n\tl9uEwedFNYk7LJMKHR+Oqs1SnJDdrCgx5wSO8I41PCHki5G16fhS9Cysk+i4mFiw==", "X-Received": "by 2002:a05:6808:c2c8:b0:467:1212:46fe with SMTP id\n 5614622812f47-46ae015bbdcmr899401b6e.38.1775002686505;\n Tue, 31 Mar 2026 17:18:06 -0700 (PDT)", "From": "Vincent Fazio <vfazio@gmail.com>", "To": "linux-gpio@vger.kernel.org", "Cc": "Vincent Fazio <vfazio@gmail.com>", "Subject": "[libgpiod][PATCH 4/9] bindings: python: setup: apply linter\n recommendations", "Date": "Tue, 31 Mar 2026 19:14:53 -0500", "Message-ID": "<20260401001459.19159-4-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": "* Drop unneeded mode parameters\n* Cast toml parsing result to dict[str, str] for expected license value\n* Disambiguate the `line` variable type for parsing the .asc file\n\nSigned-off-by: Vincent Fazio <vfazio@gmail.com>\n---\n bindings/python/setup.py | 19 ++++++++++---------\n 1 file changed, 10 insertions(+), 9 deletions(-)", "diff": "diff --git a/bindings/python/setup.py b/bindings/python/setup.py\nindex 4061328..5f5950e 100644\n--- a/bindings/python/setup.py\n+++ b/bindings/python/setup.py\n@@ -4,7 +4,7 @@\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+from typing import TypeVar, cast\n \n from setuptools import Extension, setup\n from setuptools.command.build_ext import build_ext as orig_build_ext\n@@ -44,11 +44,11 @@ def find_sha256sum(asc_file: str, tar_filename: str) -> str:\n Search through a local copy of sha256sums.asc for a specific filename\n and return the associated sha256 sum.\n \"\"\"\n- with open(asc_file, \"r\") as f:\n+ with open(asc_file) as f:\n for line in f:\n- line = line.strip().split(\" \")\n- if len(line) == 2 and line[1] == tar_filename:\n- return line[0]\n+ _line = line.strip().split(\" \")\n+ if len(_line) == 2 and _line[1] == tar_filename:\n+ return _line[0]\n \n raise BaseError(f\"no signature found for {tar_filename}\")\n \n@@ -85,8 +85,8 @@ def fetch_tarball(func: Callable[[T], None]) -> Callable[[T], None]:\n # If the version in \"libgpiod-version.txt\" already matches our\n # requested tarball, then skip the fetch altogether.\n try:\n- if open(\"libgpiod-version.txt\", \"r\").read() == LIBGPIOD_VERSION:\n- log.info(f\"skipping tarball fetch\")\n+ if open(\"libgpiod-version.txt\").read() == LIBGPIOD_VERSION:\n+ log.info(\"skipping tarball fetch\")\n func(cmd)\n return\n except OSError:\n@@ -161,7 +161,8 @@ def fetch_tarball(func: Callable[[T], None]) -> Callable[[T], None]:\n if sys.version_info >= (3, 11):\n import tomllib\n \n- license_file = tomllib.load(f).get(\"project\").get(\"license\")\n+ project = cast(\"dict[str,str]\", tomllib.load(f).get(\"project\"))\n+ license_file = project.get(\"license\")\n else: # tomllib isn't standard, fall back to parsing by line\n for line in f.readlines():\n _line = line.decode()\n@@ -214,7 +215,7 @@ class build_ext(orig_build_ext):\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+ libgpiod_version = open(\"libgpiod-version.txt\").read()\n except OSError:\n libgpiod_version = LIBGPIOD_VERSION\n \n", "prefixes": [ "libgpiod", "4/9" ] }