From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id hsMoBA1iaGovYzEAWB0awg (envelope-from ) for ; Tue, 28 Jul 2026 04:02:21 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=kcisv3zt; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RtJXf3h4; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=fIoRj+SX; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=GHv8LqSP; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id F40761E09E; Tue, 28 Jul 2026 04:02:20 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4FEA71E099 for ; Tue, 28 Jul 2026 04:02:20 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3B8B44BB24E7 for ; Tue, 28 Jul 2026 08:02:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B8B44BB24E7 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=kcisv3zt; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RtJXf3h4; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=fIoRj+SX; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=GHv8LqSP Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2a07:de40:b251:101:10:150:64:2]) by sourceware.org (Postfix) with ESMTPS id 1E7954B9DB5E for ; Tue, 28 Jul 2026 08:01:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E7954B9DB5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1E7954B9DB5E Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:2 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785225714; cv=none; b=cdhkFkBhuLnx36r+DxK4NagMhkOH444wJKVNh8KrH5WtGRx/zYmentjawecJ3fiCI3dm7MMdPyBAzpgXggnqzEKheVGD2sXiSmNMfGaVSxviGkzV8hGwaRnZnHOvQ14NgzOoKG5669wdPs1Aeu38h+eUv31Bzd/jfDlUqvEOveo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785225714; c=relaxed/simple; bh=5kBSC3RwXCh7sIWJboqQTvqY8tk2IUPq/0ixaQ4Dgl4=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:From:To; b=BHpDexUebgb+Zv+upbmSywGst/3a+MCmdhmC2HwngWE5IxyVNcmTJOAo1Txw+6NkqEwW5qv2iV28Nf7imyYZ+eZ3tl7ObUZO7KqiwfHDH34m2Q9izd0xZZJL8+ma1nKB3Dv5PINrpBtzNawEKWxc66i9aaiWqxtka0IFbMobt+E= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=kcisv3zt; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RtJXf3h4; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=fIoRj+SX; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=GHv8LqSP DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E7954B9DB5E Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C62133E36; Tue, 28 Jul 2026 08:01:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1785225708; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gtixJYd4jkedDvc+QDvEp5tQ8KYlLnoEz5/JH0gDzfU=; b=kcisv3zt48WR58hlhdv4ZuBIOtwtkAmj5/Ljy/pJ1iXJxrMU45qeWW8EBiCvQCLtWKBcgU RPOXGBvv27iNGy7bpq5rv9a/xi2d0Ckps56b5DFmrBgMerVBLG6VLoSn4jkxo6Ij2asRf4 cOyalSSp843NNLCiZzc9bWb9+XTYiA8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1785225708; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gtixJYd4jkedDvc+QDvEp5tQ8KYlLnoEz5/JH0gDzfU=; b=RtJXf3h4A18vNjRMquvxNIJsK0oBDkbyU4tibI8PXJnXzS1aInJyl/yjqAlFLYvu37t6ME 5YfobCJMyeXDx0DA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1785225704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gtixJYd4jkedDvc+QDvEp5tQ8KYlLnoEz5/JH0gDzfU=; b=fIoRj+SXIe6W9k80mRCUY4yZTtRBS1as0ir5cDqTfjJZCRk6X/ztSLhXuyd3QUjeBekyak RVae5OMOzs6ncnTe+q4gdZmSh75gzb6sW8p0Oqpso9lbav/Ou1ovm/fEvXS9FMUm6v3zWF gC8B/xr6OG0Rl9hvGNoM4bZ8IihwOX0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1785225704; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gtixJYd4jkedDvc+QDvEp5tQ8KYlLnoEz5/JH0gDzfU=; b=GHv8LqSPK5IpUIduaAMdeTjC0k2eTXLjNgdtYORfsuUAmDFozmMl38LPIbK6fRqMhcMRCF Xe7iShTkes/jWHCg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id AF024779B3; Tue, 28 Jul 2026 08:01:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id JfJWKehhaGobGQAAD6G6ig (envelope-from ); Tue, 28 Jul 2026 08:01:44 +0000 Message-ID: Date: Tue, 28 Jul 2026 10:01:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [pre-commit] : add 'tomli' dependency for codespell pre-commit hook From: Tom de Vries To: Stephan Rohr , gdb-patches@sourceware.org References: <20260630082043.84858-1-stephan.rohr@intel.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.988]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email, suse.de:mid, imap1.dmz-prg2.suse.org:helo, intel.com:email] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 7/13/26 12:35 PM, Tom de Vries wrote: > On 7/13/26 11:42 AM, Tom de Vries wrote: >> On 6/30/26 10:20 AM, Stephan Rohr wrote: >>> From: "Rohr, Stephan" >>> >>> The codespell pre-commit hook imports the 'tomllib' module to parse >>> 'pyproject.toml'.  'tomllib' is not available for Python versions 3.10 >>> and older.  Add a dependency on 'tomli' so the hook also works on these >>> Python versions. >>> >> >> Hi, >> >> this LGTM. >> >> Approved-By: Tom de Vries >> It's been two weeks since approval, so to prevent this from falling through the cracks I've pushed this, after rebasing and applying the anchor change I suggested below. Thanks, - Tom > > Also, consider removing duplication using an anchor: > ... > diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml > index f96959d79fc..70c3033a9fe 100644 > --- a/.pre-commit-config.yaml > +++ b/.pre-commit-config.yaml > @@ -80,12 +80,12 @@ repos: >        files: '^(gdb|gdbserver|gdbsupport)/' >        args: [--toml, gdb/pyproject.toml] >        # 'tomllib' library is not available on Python < 3.11. > -      additional_dependencies: ['tomli'] > +      additional_dependencies: &codespell_deps ['tomli'] >      - id: codespell >        name: codespell-log >        entry: gdb/contrib/codespell-log.sh >        args: [--toml, gdb/pyproject.toml] > -      additional_dependencies: ['tomli'] > +      additional_dependencies: *codespell_deps >        verbose: true >        stages: [commit-msg] > > ... > > Thanks, > - Tom > >> FWIW, I had some trouble reproducing this.  I tried to reproduce this >> in a python virtual environment (3.10) on a system with system python >> 3.14.   As it turns out, pre-commit creates a python 3.14 environment, >> so tomli is found. >> >> After setting language_version to 3.10 in the yaml file, I managed to >> reproduce it, and indeed your patch fixes it. >> >> Thanks, >> - Tom >> >>> --- >>>   .pre-commit-config.yaml | 3 +++ >>>   1 file changed, 3 insertions(+) >>> >>> diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml >>> index 9910bbb82f2..1c6b018d7ac 100644 >>> --- a/.pre-commit-config.yaml >>> +++ b/.pre-commit-config.yaml >>> @@ -79,10 +79,13 @@ repos: >>>       - id: codespell >>>         files: '^(gdb|gdbserver|gdbsupport)/' >>>         args: [--toml, gdb/pyproject.toml] >>> +      # 'tomllib' library is not available on Python < 3.11. >>> +      additional_dependencies: ['tomli'] >>>       - id: codespell >>>         name: codespell-log >>>         entry: gdb/contrib/codespell-log.sh >>>         args: [--toml, gdb/pyproject.toml] >>> +      additional_dependencies: ['tomli'] >>>         verbose: true >>>         stages: [commit-msg] >> >