Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp299551pxj; Wed, 16 Jun 2021 02:41:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnIinOvm6oDxU0epnp2y2rFEyfbS6EuREuxgfzMO6sHPzBMgudmIFc+VT3+7Foo5Ro6o5B X-Received: by 2002:a5e:a515:: with SMTP id 21mr3005649iog.175.1623836485567; Wed, 16 Jun 2021 02:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623836485; cv=none; d=google.com; s=arc-20160816; b=01fwwYVCAdYL8AJ0Ix/loH3paFNEvP2KJive8XtSRVCbRcOo3sasWPQ22+/ghCgP0r Fzd24AW1vOFarfN9z09J2S/ScTVexrmpOvZZWrEw03u6sA3BMYoDobTiaX9YHmJayGpM hsDa6nHw4tvtgt9vylE7a2YQ6VosxCBiG2AYt/qiLfRzGBufUuMaU65kmvuGPTch8tkm 9IB33St1gWWvsog2JY1a9P8Qegc1OgERyo0GVYHP2/RKhxt49M6D54xM+KQ50dIdy7NP XxPUUxe3bm8aHVc9OM0ZBpO6PretIBXVUrC9gkVNUimcMiCIsZcELEJNGkOvfL9SekEP DBKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=ZWm4JaN0Kmx/gNs8N9UEjJY41D+Vbr7666aSQNGKto8=; b=TIiEbFHHUxdoZnTRi7COMgRhEeh/eTPfY8YK/F2CBk7UZKTXAggBZjIzvaXfBOTlKQ Hih1HfRqtj3QgCUkyoSZQ/a6b+NcqF6Y1hShbiKLQaAwMfQ3Gw0QkbwSkAaql/CoQr/I YivuKQlIbKkfU2oQPoWxyxt8CzdFJsfpsXWIfx0rQ/V/kz44hghXonssESOhvayedt6S PVbrUMt0k4vmN31L4Vo01sRH6kq3nF+OjSlknjFH8OuNYxKN4SrlE1C4xaFixqVCUXLg w/6plNsZiAHn5zImFYzEWQpaVsoJF9u6EwYHp4+/36Q2KjUE9IAX6PmI92U9g5nTlCEL LluA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XudP2yxX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si1811373ila.79.2021.06.16.02.41.12; Wed, 16 Jun 2021 02:41:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XudP2yxX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232218AbhFPJmr (ORCPT + 99 others); Wed, 16 Jun 2021 05:42:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231491AbhFPJmq (ORCPT ); Wed, 16 Jun 2021 05:42:46 -0400 Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 047DDC061574; Wed, 16 Jun 2021 02:40:40 -0700 (PDT) Received: by mail-qk1-x736.google.com with SMTP id k11so1932853qkk.1; Wed, 16 Jun 2021 02:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ZWm4JaN0Kmx/gNs8N9UEjJY41D+Vbr7666aSQNGKto8=; b=XudP2yxXdQJoWvzBHIcIRC+UYlEfd3FMgVwNabFlarO1izNDVz7KfYpHBZzRKW/FLe M+sZRKIH2fWSfClk0sOR3XgbOSslZJFEXebAggVfMEcz+27mfDn/xa96jXpQwSTRlwUK DzDfFOfpNmlTqkR8y3RpfcTdVHcvGuljEMaePAh5vLSQoKR4pcEp4RjoWi6OR5PJOZhC mXHeXNAVn6SkiUtASItNWGACPO5kF9fD0boMLqxndCKEFx8Xoy+0yiMtJL539NjUEuH+ v/b0cAWITrEKfG9NlSLaLcQrJ2YhQo2wNpPRbVjX1yU2PAVeqVnn1lfbuXaDGYS5LhpN UT6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZWm4JaN0Kmx/gNs8N9UEjJY41D+Vbr7666aSQNGKto8=; b=Wzl8PyyuPveOEaMeFx2foWdzrfyHZ47qmNFvu+WNTDgxwActwT5pxl7ejhz3afGBaF rkyx8NdnpYyBhCqTFEoZITM0FaTs7hna9K/F04DUft0dkgDmkdpdrUjuFLJ6pym5gKNu OCBKpqRZ5UTNSe+MtUJqnaPUxd3V2EZvNgUkHTQ8h4VqqcB54QdLkBRez96KBKWBXmlf QM1IC1xan+W6KB+FkDERnR0H4UUrHRU8PsFBQbCJFbkwGHipYS78SgqA/i6qcrOAiBiJ fF8JNt933TQHrcMwa09j9pUBRaTCLMCyEOQpZcWvFXdGoji8YJLh8rbxnpPJGXBEFSGm nw5Q== X-Gm-Message-State: AOAM5307akz3JuvDjoYnSZmgEH7dvqQPOsVWavEYD87VIWG1HGnOm6Cj 87fnzQoX/auio4UKXFZPWVE= X-Received: by 2002:a37:5cc6:: with SMTP id q189mr4336675qkb.305.1623836439267; Wed, 16 Jun 2021 02:40:39 -0700 (PDT) Received: from localhost.localdomain (ec2-35-169-212-159.compute-1.amazonaws.com. [35.169.212.159]) by smtp.gmail.com with ESMTPSA id y10sm378360qki.32.2021.06.16.02.40.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jun 2021 02:40:38 -0700 (PDT) From: SeongJae Park To: brendanhiggins@google.com Cc: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, SeongJae Park Subject: [PATCH] kunit: tool: Assert version requirement Date: Wed, 16 Jun 2021 09:40:33 +0000 Message-Id: <20210616094033.18246-1-sj38.park@gmail.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: SeongJae Park Commit 87c9c1631788 ("kunit: tool: add support for QEMU") on the 'next' tree adds 'from __future__ import annotations' in 'kunit_kernel.py'. Because it is supported on only >=3.7 Python, people using older Python will get below error: Traceback (most recent call last): File "./tools/testing/kunit/kunit.py", line 20, in import kunit_kernel File "/home/sjpark/linux/tools/testing/kunit/kunit_kernel.py", line 9 from __future__ import annotations ^ SyntaxError: future feature annotations is not defined This commit adds a version assertion in 'kunit.py', so that people get more explicit error message like below: Traceback (most recent call last): File "./tools/testing/kunit/kunit.py", line 15, in assert sys.version_info >= (3, 7) AssertionError Signed-off-by: SeongJae Park --- tools/testing/kunit/kunit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/kunit/kunit.py b/tools/testing/kunit/kunit.py index be8d8d4a4e08..748d88178506 100755 --- a/tools/testing/kunit/kunit.py +++ b/tools/testing/kunit/kunit.py @@ -12,6 +12,8 @@ import sys import os import time +assert sys.version_info >= (3, 7) + from collections import namedtuple from enum import Enum, auto -- 2.17.1