Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp574259rwd; Thu, 18 May 2023 00:29:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4gHIfhZ50elUO5WGPUqVu1/F1541+j7OB97Wp0qZBxXxlU5zQatdctIzVLSz0GBCBfKTcz X-Received: by 2002:a05:6a20:d045:b0:101:a435:a38 with SMTP id hv5-20020a056a20d04500b00101a4350a38mr1030990pzb.57.1684394939821; Thu, 18 May 2023 00:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684394939; cv=none; d=google.com; s=arc-20160816; b=kJCPITPOSkvSGke8dMHkz8k3G+nHW9uyw+DkT5LFQqPuZmKCVetdoHTu6ONnxZjMK9 nFlTgPaLWfrQmodU4WXcnh/Qz29j3OEQgzUSF0phYrJm76Yd/L+p4zonDfIuc1yEjzfY kyxSIY1hoQRwSPekD5lYRaFf0ttNMi6bGkKPBzr30+AlL9E1yFtSYuoz9MIG6+zQ5x9W dYtxk1kmr70qfC3DAc1X2CHd6hLzingsJMKnB9LmaYH0FveZP41wbTGdjp8kXMwb0h38 47yrCGjsEiGYPoQvXS6PBI6NBfdFXulBt9CnO58UYam5aFcsqfX9ksxiLF/i7JZp2z/2 Kfkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=3aBtfySmYHAOWHtTPeEXJQ9W/oXMX8uMyfS6AyXr4zw=; b=FDucFFor32891xNKdJ8sQqFPidc6l3SIBVbuTjIGBn+u+yNCC5KlGkCnBwWGPBadPu 6MOzFZga7dYOuhExjF0XxoWIUn2ZA3LZnAxnnJtPmYvWZyZQG7wGGTcRN4MGdNkplGRQ NmQLwtWW9s5xa9h7y0SZz1RBJj88ckkLVTTidj7FBqmOm9KrGw34Ley0vPxeW7KFJ79q ILpV2EUysYqiGHOcDtCs646tYIC9vKnCJ4CU7PBkuQ5IJgZ3i+O5SCl12mbRw0f+OmqG 3edrRXgPHGxBo3SEwlrChZ4HTDUUPaglxTX7zdmKv3NIBfe7XG9+zKd55mPLKFpHcpgR PqnA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l63-20020a633e42000000b0052c76af96d2si701582pga.832.2023.05.18.00.28.45; Thu, 18 May 2023 00:28:59 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbjERHXO (ORCPT + 99 others); Thu, 18 May 2023 03:23:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjERHXN (ORCPT ); Thu, 18 May 2023 03:23:13 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 08B252113; Thu, 18 May 2023 00:23:10 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 17BF81FB; Thu, 18 May 2023 00:23:55 -0700 (PDT) Received: from [192.168.1.3] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AF24A3F73F; Thu, 18 May 2023 00:23:08 -0700 (PDT) Message-ID: <8d6b615e-0999-59d2-e123-5a2570f12cf5@arm.com> Date: Thu, 18 May 2023 08:23:03 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v1 2/2] perf test attr: Fix deprecation warning Content-Language: en-US To: Ian Rogers References: <20230517225707.2682235-1-irogers@google.com> <20230517225707.2682235-2-irogers@google.com> Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Thomas Richter , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Kan Liang From: James Clark In-Reply-To: <20230517225707.2682235-2-irogers@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,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 17/05/2023 23:57, Ian Rogers wrote: > Address the warning: > ``` > tests/attr.py:155: DeprecationWarning: The SafeConfigParser class has > been renamed to ConfigParser in Python 3.2. This alias will be > removed in Python 3.12. Use ConfigParser directly instead. > parser = configparser.SafeConfigParser() > ``` > by removing the word 'Safe'. > > Signed-off-by: Ian Rogers > --- > tools/perf/tests/attr.py | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tools/perf/tests/attr.py b/tools/perf/tests/attr.py > index ccfef861e931..e890c261ad26 100644 > --- a/tools/perf/tests/attr.py > +++ b/tools/perf/tests/attr.py > @@ -152,7 +152,7 @@ def parse_version(version): > # - expected values assignments > class Test(object): > def __init__(self, path, options): > - parser = configparser.SafeConfigParser() > + parser = configparser.ConfigParser() > parser.read(path) > > log.warning("running '%s'" % path) > @@ -247,7 +247,7 @@ class Test(object): > return True > > def load_events(self, path, events): > - parser_event = configparser.SafeConfigParser() > + parser_event = configparser.ConfigParser() > parser_event.read(path) > > # The event record section header contains 'event' word, > @@ -261,7 +261,7 @@ class Test(object): > # Read parent event if there's any > if (':' in section): > base = section[section.index(':') + 1:] > - parser_base = configparser.SafeConfigParser() > + parser_base = configparser.ConfigParser() > parser_base.read(self.test_dir + '/' + base) > base_items = parser_base.items('event') > Reviewed-by: James Clark I thought I also did this a while ago but it must have gotten lost or I didn't send it.