From patchwork Sat Apr 4 21:28:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2129 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338308; bh=K8IXDjNtrxI3VZlPWddoRm3yVPEmIFGoqzz7IRO4EcI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=vP8KHMJwU79ktj++na1evL/Hi2WCWEIKv+uEyI+S9CM1g4nbXbJ8IxYmNnQBCz144 XjAv1pBrnwAyLETRTaQMa2K4Tugm0IHZBgdmd+S2Cu5ADJBElv0md2zNCfXHEjt096 UpOyaQJ52tQrfKimgsu+HUhrehnwZRBF1dyNhG5q1pt9+4fxVcQvpVmabTrVoMnSJP zm3EjF4sugJEtdVUKuJ96CDf3PSG6u8Ep2rrZkTcf5JdrhQnTRtgvQIag6OFlQcG8p /xSwJJAm8R7MRKhGRCmyIU7X8rq5zpHReeDR+uVMHfjy44b8mqIlPe8Hq0XGd9Bmrl S1AMgultXWdKg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id EDC9F6A382 for ; Sat, 4 Apr 2026 15:31:48 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ILuF9ubx-ZCx for ; Sat, 4 Apr 2026 15:31:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338308; bh=K8IXDjNtrxI3VZlPWddoRm3yVPEmIFGoqzz7IRO4EcI=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=vP8KHMJwU79ktj++na1evL/Hi2WCWEIKv+uEyI+S9CM1g4nbXbJ8IxYmNnQBCz144 XjAv1pBrnwAyLETRTaQMa2K4Tugm0IHZBgdmd+S2Cu5ADJBElv0md2zNCfXHEjt096 UpOyaQJ52tQrfKimgsu+HUhrehnwZRBF1dyNhG5q1pt9+4fxVcQvpVmabTrVoMnSJP zm3EjF4sugJEtdVUKuJ96CDf3PSG6u8Ep2rrZkTcf5JdrhQnTRtgvQIag6OFlQcG8p /xSwJJAm8R7MRKhGRCmyIU7X8rq5zpHReeDR+uVMHfjy44b8mqIlPe8Hq0XGd9Bmrl S1AMgultXWdKg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D432B6A375 for ; Sat, 4 Apr 2026 15:31:48 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338307; bh=h3KoLF2kXqRZFkqGOFpi8Sl78kFPKjvA9Kb1Wnufacg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w1zBmxDbnxc2r7cX2ZWmVmy4UXlMMbsXJPEeCyx3A9q7fYGxUrgYjbXAa1BzfssTi wgSSlfrety3kjMTN/174c+npOtb5x+U1CDLLlJA5oJ0bL/TRBU0w/mGlfgN5GUy1ft KHxBa4ZPpgEtB9hRDEtPIt1be0C2KL9cdpzL0ky8UNi2dClmOUc6kfFF508upeZy1c sA1mv6a2ume9GOBy+JmdJf2jx9U0VaRut6Ij7l9slSozUqgtZ0uUzlE+F7KJgnjPeo o0CUi4vQK4iyYCpDqHht0fe5ynnhtL7yY1xcYxn+EtiPDCJHsfPVZIIfkYagsHdN+x wR2GePvt971UQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6C4356A369; Sat, 4 Apr 2026 15:31:47 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id zhctGYpu-l9R; Sat, 4 Apr 2026 15:31:47 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338303; bh=xhaX62+oC3mAGjaIUyclFMnqhl8AKlWCS4/1IJAKqOc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wQBGSbTaEXn25ChCpC0kNAaxx6/xsf8qWhffsuKjhSHn4ZvbRW9w1YiW2ZMn89RIS TSFu2xDoUAnGAwFOrrECvYfPzwyVRvg1u5iqGBapfUCJ9cyQwPlpOVyE7oIaIEd9bA nTq2mc3R2LkWOo7JgLRuN/jHYGtmyDl2h6hfvx5A7/IUhDwnrsvOAPUymCICTuOoO0 l1yHVSM58IyoneLKoTG9Lo8tZ5yQRLBZBINrtN5cTVMnifjk5XZfsMkgugx2vjsV3i ZULG4IwAOANC8uuegCJOEn2RYGrLuKJhEnpmScgiif9W52whLVbGlmuLVvIzktCX5J SbkPxgayhsu/w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 10BC16869D; Sat, 4 Apr 2026 15:31:43 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Sat, 4 Apr 2026 15:28:50 -0600 Message-ID: <20260404213020.372253-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260404213020.372253-1-sjg@u-boot.org> References: <20260404213020.372253-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: HNJEGIQOQRZ6X2H46YHOKUGHHGTUBJLK X-Message-ID-Hash: HNJEGIQOQRZ6X2H46YHOKUGHHGTUBJLK X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/37] patman: Make patchwork query_series() and get_patch_comments() public List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Rename _query_series() to query_series() and _get_patch_comments() to get_patch_comments() so that review.py can call them without accessing protected members. Update all internal callers. Signed-off-by: Simon Glass --- tools/patman/patchwork.py | 10 +++++----- tools/patman/status.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/patman/patchwork.py b/tools/patman/patchwork.py index 5192b817968..de676161eee 100644 --- a/tools/patman/patchwork.py +++ b/tools/patman/patchwork.py @@ -270,7 +270,7 @@ class Patchwork: async with aiohttp.ClientSession() as client: return await self._request(client, 'projects/') - async def _query_series(self, client, desc): + async def query_series(self, client, desc): """Query series by name Args: @@ -306,7 +306,7 @@ class Patchwork: name_found = [] # Do a series query on the description - res = await self._query_series(client, desc) + res = await self.query_series(client, desc) for pws in res: if pws['name'] == desc: if int(pws['version']) == version: @@ -317,7 +317,7 @@ class Patchwork: # series name cmt = ser.commits[0] - res = await self._query_series(client, cmt.subject) + res = await self.query_series(client, cmt.subject) for pws in res: patch = Patch(0) patch.parse_subject(pws['name']) @@ -523,7 +523,7 @@ class Patchwork: """ return await self._request(client, f'patches/{patch_id}/') - async def _get_patch_comments(self, client, patch_id): + async def get_patch_comments(self, client, patch_id): """Read comments about a patch Args: @@ -783,7 +783,7 @@ On Tue, 4 Mar 2025 at 06:09, Simon Glass wrote: """ data = await self.get_patch(client, patch_id) state = data['state'] - comment_data = await self._get_patch_comments(client, patch_id) + comment_data = await self.get_patch_comments(client, patch_id) return Patch(patch_id, state, data, comment_data) diff --git a/tools/patman/status.py b/tools/patman/status.py index 967fef3ad6e..2828e4a3bfc 100644 --- a/tools/patman/status.py +++ b/tools/patman/status.py @@ -28,7 +28,7 @@ def process_reviews(content, comment_data, base_rtags): Args: content (str): Content text of the patch itself - see pwork.get_patch() comment_data (list of dict): Comments for the patch - see - pwork._get_patch_comments() + pwork.get_patch_comments() base_rtags (dict): base review tags (before any comments) key: Response tag (e.g. 'Reviewed-by') value: Set of people who gave that response, each a name/email