Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5878284rwr; Mon, 1 May 2023 12:14:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7+uKCbPuYK5IjF+ti8m5OSBX57iorzPYdqJV3vp0yHC2i/9LJ3wQPwh8t+EW6nCuJKklLC X-Received: by 2002:a05:6a21:150b:b0:f2:9161:d4de with SMTP id nq11-20020a056a21150b00b000f29161d4demr15222847pzb.49.1682968494498; Mon, 01 May 2023 12:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682968494; cv=none; d=google.com; s=arc-20160816; b=kzZG31QGeRavdCYIsJJ9OGzWrUK/YLcFmtlhTPh7oebKIXvi2mklKUwNVNGraRVmnx XD1NNxgTVY421gGK7CT0LJdI2ng381Fbgj7qIIDnltaHym+RYyhOQ0qwt7tmPW5v6zvn vBdTO8iH+Y++BYjNx+NK515CYMdkkpP81SBedBkbl+AOnYM14tpKxIWdn5NHZS2uQ16W p3ExaGEF1fGcaA9Gl33Czqpeze0cPqMorqJwgJvyqXh4AtTCALMomMazXhbuvsMZTN+n MEF33QMmwmcFyb+OlYDbVGRUkTD1bx5AWFc6MN+ktBlaMEOZjd72NA1QESplCU7sPxgI GCgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mSl4iH8x0TJLHH7xGDKVtj3ZGDwgVyYg2q2ylIYfoKQ=; b=x6r32+N2u4wb25iE10Hgb3XQQC5ZQiKKlByhIW+httcL+isTF0hSJhYrr6+gAMFmNT sD0RnOB5zr7TDnL0U8UEleMLa30qcoK2oSUcn9vhI0SoNZ6KskLELKSbZp/hYldm2Lmo mQFOUlsbmJMSNg7XnhaYuIrMAhhlwhrlZEhFDuloBP0Mz4wK8pDqyW/e8WG3NSiE2uht o3fu8gRfFowXXf0HI1fNRFm18xl+ICdquqRVxavHSE9eqiNE1WMiyoCRmQAXdJkPXeDt aVWpHZX2c3qJu43siRtoDLooQrhlW4hhdraxd0qkYbxHtB6vpnRPWCWwtK+fDPg3Fjid ypoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j7pkR9OU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k190-20020a6284c7000000b0063f24efaf7bsi24910950pfd.390.2023.05.01.12.14.38; Mon, 01 May 2023 12:14:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=j7pkR9OU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232356AbjEATKo (ORCPT + 99 others); Mon, 1 May 2023 15:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232101AbjEATKn (ORCPT ); Mon, 1 May 2023 15:10:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FD921FC0; Mon, 1 May 2023 12:10:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 09F5B618AC; Mon, 1 May 2023 19:10:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABC40C433D2; Mon, 1 May 2023 19:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682968241; bh=7wA5MD8Ul6eRk6o5es1/yKxJrO4V6BCjnRixIYeEAH4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j7pkR9OU+t1cf869c4V7a2oISoGQAT53bNvhWLJU+6ypkVtMDi06q3P9Uow1MnSkM O52pydRtx/rKTnnhHrzaiwXufppnjN04ezUfGxlyA+K/8i8+AaQBENv7SBOTEyFVlz U3yoTkb14H4jQ/9UqMvWJ60n4LdIZ+NMRWOZ3S4h0ky6oqKt0kZ71gX2Z9/NQ6te2k IYkV5WRuwBbyJLlhFtGYnE4hcuIshLMOJ6/TLyA0uijhZkMs6hQMsd50MwEPQPfyiT IsxgZrMislen5Oe6a/wDKyafq/lzH8batbx8LWF8CPqeBycng9Zho5Z87aTNHK8pGc cJgSctxNPr4YQ== From: SeongJae Park To: Daniel Latypov Cc: brendanhiggins@google.com, davidgow@google.com, rmoar@google.com, linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org, johannes@sipsolutions.net, SeongJae Park Subject: Re: [PATCH] kunit: tool: undo type subscripts for subprocess.Popen Date: Mon, 1 May 2023 19:10:39 +0000 Message-Id: <20230501191039.140496-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230501181610.2617032-1-dlatypov@google.com> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 May 2023 11:16:10 -0700 Daniel Latypov wrote: > Writing `subprocess.Popen[str]` requires python 3.9+. > kunit.py has an assertion that the python version is 3.7+, so we should > try to stay backwards compatible. > > This conflicts a bit with commit 1da2e6220e11 ("kunit: tool: fix > pre-existing `mypy --strict` errors and update run_checks.py"), since > mypy complains like so > > kunit_kernel.py:95: error: Missing type parameters for generic type "Popen" [type-arg] > > Note: `mypy --strict --python-version 3.7` does not work. > > We could annotate each file with comments like > `# mypy: disable-error-code="type-arg" > but then we might still get nudged to break back-compat in other files. > > This patch adds a `mypy.ini` file since it seems like the only way to > disable specific error codes for all our files. > > Note: run_checks.py doesn't need to specify `--config_file mypy.ini`, > but I think being explicit is better, particularly since most kernel > devs won't be familiar with how mypy works. Thank you for fast fix! > > Fixes: 695e26030858 ("kunit: tool: add subscripts for type annotations where appropriate") > Reported-by: SeongJae Park > Link: https://lore.kernel.org/linux-kselftest/20230501171520.138753-1-sj@kernel.org > Signed-off-by: Daniel Latypov Tested-by: SeongJae Park Thanks, SJ [...]