{"id":2225990,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2225990/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260422012041.39933-9-vfazio@gmail.com/","project":{"id":42,"url":"http://patchwork.ozlabs.org/api/1.2/projects/42/?format=json","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":"<20260422012041.39933-9-vfazio@gmail.com>","list_archive_url":null,"date":"2026-04-22T01:20:40","name":"[libgpiod,8/9] bindings: python: tests: migrate the system module to multi-phase init","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"f12b9b1dcca8eee2f6ca2c7ae3477e1fc3fc9bf5","submitter":{"id":78694,"url":"http://patchwork.ozlabs.org/api/1.2/people/78694/?format=json","name":"Vincent Fazio","email":"vfazio@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-gpio/patch/20260422012041.39933-9-vfazio@gmail.com/mbox/","series":[{"id":500906,"url":"http://patchwork.ozlabs.org/api/1.2/series/500906/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-gpio/list/?series=500906","date":"2026-04-22T01:20:32","name":"bindings: python: modernize C extensions","version":1,"mbox":"http://patchwork.ozlabs.org/series/500906/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2225990/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2225990/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-gpio+bounces-35329-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=aE3MPSfm;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-gpio+bounces-35329-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=\"aE3MPSfm\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.53","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\n [IPv6:2600:3c0a:e001:db::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 4g0hJt3PyXz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 11:21:50 +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 F37D8303CA78\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 01:21:05 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A61DB2D5436;\n\tWed, 22 Apr 2026 01:21:05 +0000 (UTC)","from mail-ot1-f53.google.com (mail-ot1-f53.google.com\n [209.85.210.53])\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 408C0200C2\n\tfor <linux-gpio@vger.kernel.org>; Wed, 22 Apr 2026 01:21:04 +0000 (UTC)","by mail-ot1-f53.google.com with SMTP id\n 46e09a7af769-7dbd801138eso2765271a34.1\n        for <linux-gpio@vger.kernel.org>;\n Tue, 21 Apr 2026 18:21:04 -0700 (PDT)","from Zephyrus.localdomain ([131.93.209.211])\n        by smtp.gmail.com with ESMTPSA id\n 006d021491bc7-69464eeee56sm9876036eaf.8.2026.04.21.18.21.02\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Tue, 21 Apr 2026 18:21:02 -0700 (PDT)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776820865; cv=none;\n b=RkyqMDFi+3TF3ykpmF/CXhjDBCyp7HpcTodFwxpaP04vhOOJe+1+J/bqq+rbHcALM5emntEqLSVFHwAUSW7hxeKegWlyE04E0TlZTSLJvRm8lXe6fazklB96xS0iwGPkwbLKeOut157l9aCP+xpXMaOvdNmj4HGRT1QctNYeAHE=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776820865; c=relaxed/simple;\n\tbh=FabEycj9tvaV4lyDSd5rguTIAyQ+tCco890ClR8kXVo=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=iwvjW4bYzTiXb/CItSuSnxpIbjry8mRr1uoH/PwdEEKcBATj5+9em82Ju4qsG1WWT85t2DzqI7j2ctnB6hVzAjm9stQHXs4UwCBjMgYAe3hjeEXpa2bsOlcLygIWVQ0KrulSCtC6W0+GPYg1UBoR8TsZarYTSi9TzSMqjSKFj1s=","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=aE3MPSfm; arc=none smtp.client-ip=209.85.210.53","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1776820863; x=1777425663;\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=NJoY4vcc8yBC6LVSkoR5wl1wWlEyFdnB0jaeRhoN6mg=;\n        b=aE3MPSfmm7UeBKx5hyiPTYwPmcZXQKvkQCtcLr8aW3nAATqhwZW93Xa1P4DF/EbAGh\n         BmcpYe463Yid7SDAsW9ccpb6l2jH8SZWiByn+XoDM8YahIqzfrXxTPbxziLh9cT4VRcZ\n         eMQiwTZfrD8N78DJa+2JNhkh/3D7SOJJKlcBkoaapLYsSNNsN5Fze2OF8usQYDRFhAU7\n         SHQyERdVkzYl7qcE/+0vdQlFdSnvIG4UJuGL4zB5ItqmmXeOfJJD1pwHd3YHDOgR4viQ\n         PUeKVaYhraU3Yzhcm9Igv+twuieVFfnvWWvvBjNv/SNJa2uvTmqh96Q7aEHdjzBPrFs7\n         22QA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1776820863; x=1777425663;\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=NJoY4vcc8yBC6LVSkoR5wl1wWlEyFdnB0jaeRhoN6mg=;\n        b=BbjxL/G+LJTF7UPIf//aBDaLozw08TO+yndV0QMex/XJw3HOWb95cHzEOjM5hUS/Xe\n         LlnYbWC9w+GkiC0JMTKv8hwAL4TZLYR65tHlLHXQpfLScXxY6zZqazfs+uzYjgEMxYFC\n         sx+bVsVdIDV67UATEUmE3QJfMpHzfdlwwWLh6/5o2dMGNvI0uzd0DIzxzUJdQM0Jh9z9\n         j/P2TY+l3X0aHaj0Mkn3LDnLFb6tQawy+WZyOBpvtwaIkgyXe5phOkCWo0zWyFYpWGcw\n         lYcYvGZd7+/wOVSyq/VCzzwqjJ7Z/xlHov3/9h4+DlsvW4MwN+kx9g25qfFOKGUvAf3e\n         2e+w==","X-Gm-Message-State":"AOJu0YytPF4CApzwZu1bGn/v9DxnsEra9u4Sc7PDgflLc/oaTM83xHkr\n\t1KuRbv5W13sd5zwPyHs++vMYpAlzabx6p0o4/W0i1mJIKFGgJGUEqD6DMc/Mqw==","X-Gm-Gg":"AeBDies7pOPNAf72JstazE98ehvjhJbF7Usw9T+/le7t0aNVsVTM712DYlpCzVc6meY\n\t6VNMd9YF2wH8Q0lOeneXMQLdzL0yoLAiMHUKJ/pUdIRu4wawVtA5Dxljeaj+ubhH15S/ZRyhcSG\n\tJU6ssF/r65DUeKtgrWqMWJqyJ7acc6sknuSRw9Q38Jo2bqhKrUyNm3Q362ugqfTCBywmQ+PTt7n\n\tbwIxyuNH4LSrNSvpjo9HEXDYMZ6ihyHwyGSPVYv1MUPbEFtJljME9hOUIa8NbqtMessOoWW0GKd\n\tG9fD/Si6LKN4c1SznlhyRU69ICNQDXpfPfjmzTT9bUNnz62MVdM2EYuToRMGCwpAvEXPPQuN+Rb\n\t4vgZqE49aOVkCBJ5T5pOD1E2m/BvN93b1jz9Ht6suc7RGlB0AK11aJsq7r1nvrzqU5F7HilfJX3\n\tbTxGRubXCYz4oLZj4lt8Lq4C5Lb0PORfLKjq8pDJWSv779pDE2eaeL6W3lGto5k7188wCwgOQ3","X-Received":"by 2002:a05:6820:f011:b0:694:928b:c922 with SMTP id\n 006d021491bc7-694928bcf00mr3692011eaf.17.1776820862883;\n        Tue, 21 Apr 2026 18:21:02 -0700 (PDT)","From":"Vincent Fazio <vfazio@gmail.com>","To":"linux-gpio@vger.kernel.org","Cc":"Vincent Fazio <vfazio@gmail.com>","Subject":"[libgpiod][PATCH 8/9] bindings: python: tests: migrate the system\n module to multi-phase init","Date":"Tue, 21 Apr 2026 20:20:40 -0500","Message-ID":"<20260422012041.39933-9-vfazio@gmail.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20260422012041.39933-1-vfazio@gmail.com>","References":"<20260422012041.39933-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":"Single-phase initialization has been classified as legacy within CPython\ndocumentation [0] with multi-phase being its successor [1].\n\nAs such, switch to the new methodology.\n\n[0]: https://docs.python.org/3/c-api/extension-modules.html#legacy-single-phase-initialization\n[1]: https://docs.python.org/3/c-api/extension-modules.html#multi-phase-initialization\n\nSigned-off-by: Vincent Fazio <vfazio@gmail.com>\n---\n bindings/python/tests/system/ext.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)","diff":"diff --git a/bindings/python/tests/system/ext.c b/bindings/python/tests/system/ext.c\nindex c982fa6..800648e 100644\n--- a/bindings/python/tests/system/ext.c\n+++ b/bindings/python/tests/system/ext.c\n@@ -67,13 +67,18 @@ static PyMethodDef module_methods[] = {\n \t{ }\n };\n \n+static struct PyModuleDef_Slot module_slots[] = {\n+\t{0, NULL},\n+};\n+\n static PyModuleDef module_def = {\n \tPyModuleDef_HEAD_INIT,\n \t.m_name = \"system._ext\",\n \t.m_methods = module_methods,\n+\t.m_slots = module_slots,\n };\n \n PyMODINIT_FUNC PyInit__ext(void)\n {\n-\treturn PyModule_Create(&module_def);\n+\treturn PyModuleDef_Init(&module_def);\n }\n","prefixes":["libgpiod","8/9"]}