Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5828378rwr; Mon, 1 May 2023 11:22:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5acn7OY0OsG4toJEEqMOWkmXePPPHDjIKh2qRXd0JwP1mQxYWJgwiFrkW/C5uztH0OuJjS X-Received: by 2002:a05:6a20:7486:b0:f8:a493:5290 with SMTP id p6-20020a056a20748600b000f8a4935290mr19460336pzd.20.1682965350041; Mon, 01 May 2023 11:22:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682965350; cv=none; d=google.com; s=arc-20160816; b=L8oCSJTPXmX/mO2fSOnhBQIX1fDquzOo6up2HrcAOetv4ILIasG2LU2xzyXT73/sjE 2EKqA+58d/g+nHFebbpNZkRNomzBKAFs6SNjdm8Lk/qBH9jNX01dmFm9BPu98cSZ9/Mv gpFIa7NKEV/dPqMBTkyb7BWg2uCpsSShv9iSZ93HckAdOW5XkERMzSHDU3GsA5sS37am ZOehJD+OfyBcA05uD9QmTNyu8CqYOpKwXTPn9w/eUyQ2BU6rKieS9MUTNv1XEtpGq4LL xNvW+/TD8WLXi6lbkapn4tT6JidWXwUni4a6Y3n8AnEShsl9cLAuULRPNR8trSetdL8Z cEYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=x586HEdntjiG3UWvC4VzSehiz+nFWAPjdh7JwBrp8xg=; b=fyFlSNcR+YhuUz2bXcERMR01wqRufeJbzPtTD5D5tqwu0ptiIrbL/63O0x0cID5qiE 13YtIPqmkznxsq1gfZ+RJ0whSJ8mr1sRi+SO+Xo/X7LmK2uvHul65yjax/lUR1GoDn96 8FXWzSSfxDxOvcMYvQpzV2oZv03SA+l+Zf2zNvRpUs1+d634Dh92NaUfVml1eTRBMKRT y0FRZUFbeGKLGXZI8QjqigOX7DRVO7SQ738zw/+6loM13+oo9vKRMO5O+BcpVYZFTl5X ZHrf4F1WHmFw6JAlocIMOWjbMCiyeR1xX1ZR9v7pMHmEHhh8D7qaMZcJxvGLbAYntsM1 4L6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=W4ttgpj+; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s35-20020a634523000000b0051b784e64casi27908444pga.171.2023.05.01.11.22.17; Mon, 01 May 2023 11:22:30 -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=@google.com header.s=20221208 header.b=W4ttgpj+; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231978AbjEASTh (ORCPT + 99 others); Mon, 1 May 2023 14:19:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjEASTf (ORCPT ); Mon, 1 May 2023 14:19:35 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E96B1997 for ; Mon, 1 May 2023 11:19:34 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1aaf702c3ccso91865ad.1 for ; Mon, 01 May 2023 11:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682965174; x=1685557174; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=x586HEdntjiG3UWvC4VzSehiz+nFWAPjdh7JwBrp8xg=; b=W4ttgpj+tk0PA98qPFHXkYMcTTNGgT8dXJrzRMqAkiUx2G1AGa5w/ZD/aR+Ewn295X gJkoJkJZ/EHMxNW4MmniSmgpIXt/k0/BxI0S9bAst5nFS4tqJQN2F37XE5YiKLzAb5Cz I/XHsS1CrQXeOMtu6sr5DqkgY9iURplfi9Q0TQC3zez4clqsKtBf2dLBIA1DQcp0iDt1 4cmJcIADiJc3z+139LXHs81jrcoEoIc0qb284WMlZck7F5akRGeNTEq9oF1mI/QVDT66 6zhpSm2Lxt0MFCKb8bR4t3+cQGJ2Ou13HXqu8UppaR3TyU5PfQWVU7fO4R6IoAl63RWM ecCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682965174; x=1685557174; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x586HEdntjiG3UWvC4VzSehiz+nFWAPjdh7JwBrp8xg=; b=l1rLotmv10BkRrgkRlFC46aHc8pzC91J4cVP5F++1uCZfnNuWJ7I+J5t6stHEBlSN1 BFIYUbc6E5d0E4yD7DLX4ebej865PbdnyaSyDhSyPFcJ6gpM3gY6PD2u2F3cquU+B/1m LDel9jFJ02zkWtGcEHXWJpbZuHOtFSKlED6se0waj90fmewG2wb3oFZmxthwZMY+9Nvx HLApzB8BJx52lQh6VHjNI1Rb/mIQeaX9Kjhw4Fuj56S+ZhgdRTo3AAyyLtSzxjlagkoF h9pgqRZAznlzqoIq8x1L3xBAntbghryhIx08w8X0CvHz5hD/4uMzk52yhFmRhvUOu6M+ oU9Q== X-Gm-Message-State: AC+VfDxzBlS2AdpoSJeJ8ium34F4KXd407F+YjdT1BLAy0nK6LjHnmHm qs4WnMgsRHzPeT1atYX4gdhvBO26lRZSnui4+hgGHw== X-Received: by 2002:a17:902:d504:b0:1a9:3251:e3ae with SMTP id b4-20020a170902d50400b001a93251e3aemr6776plg.3.1682965173837; Mon, 01 May 2023 11:19:33 -0700 (PDT) MIME-Version: 1.0 References: <20230501171520.138753-1-sj@kernel.org> In-Reply-To: <20230501171520.138753-1-sj@kernel.org> From: Daniel Latypov Date: Mon, 1 May 2023 11:19:22 -0700 Message-ID: Subject: Re: [PATCH v2 1/3] kunit: tool: add subscripts for type annotations where appropriate To: SeongJae Park 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, Johannes Berg , regressions@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable 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, May 1, 2023 at 10:15=E2=80=AFAM SeongJae Park wrote= : > [snip] > > > > It seems like support for the subscript wasn't added until Python 3.9. > > > > I know support for subscripting other types like re.Pattern was added > > in 3.9 per https://peps.python.org/pep-0585/ but it doesn't mention > > Popen there... > > This patch also added typing.IO[str] and concurrent.Future[None], so > > those might be problematic too. > > > > Can you check if the typing.IO and concurrent.Future[None] changes > > cause problems? > > (I don't have an easy way of testing against older Python versions curr= ently). > > Thank you for quick reply. Reverting Popen changes only as below fixed m= y > issue. So seems typing.IO and concurrent.Future[None] chages doesn't cau= se > problems at least for my use case. Sounds good. Sent https://lore.kernel.org/linux-kselftest/20230501181610.2617032-1-dlaty= pov@google.com I was hoping adding `--python-version 3.7` to the `mypy --strict` invocation would help, but it still fails for me :\ $ ./tools/testing/kunit/run_cheks.py ... mypy: FAILED > kunit_kernel.py:95: error: Missing type parameters for generic type "Pope= n" [type-arg] > kunit_kernel.py:116: error: Missing type parameters for generic type "Pop= en" [type-arg] > kunit_kernel.py:145: error: Missing type parameters for generic type "Pop= en" [type-arg] > Found 3 errors in 1 file (checked 8 source files) And here I was, hoping it would complain about code incompatible with python 3.7... But at the very least, that patch should fix the current problem. Daniel