mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Thomas Richter <tmricht@linux.ibm.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kan Liang <kan.liang@linux.intel.com>
Subject: Re: [PATCH v1 2/2] perf test attr: Fix deprecation warning
Date: Thu, 18 May 2023 08:23:03 +0100	[thread overview]
Message-ID: <8d6b615e-0999-59d2-e123-5a2570f12cf5@arm.com> (raw)
In-Reply-To: <20230517225707.2682235-2-irogers@google.com>



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 <irogers@google.com>
> ---
>  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 <james.clark@arm.com>

I thought I also did this a while ago but it must have gotten lost or I
didn't send it.

  reply	other threads:[~2023-05-18  7:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 22:57 [PATCH v1 1/2] perf test attr: Update no event/metric expectations Ian Rogers
2023-05-17 22:57 ` [PATCH v1 2/2] perf test attr: Fix deprecation warning Ian Rogers
2023-05-18  7:23   ` James Clark [this message]
2023-05-18  7:50 ` [PATCH v1 1/2] perf test attr: Update no event/metric expectations James Clark
2023-05-18 12:20   ` Arnaldo Carvalho de Melo
2023-05-18 12:55     ` Liang, Kan
2023-05-18 17:45       ` Liang, Kan
2023-05-18 17:59         ` Arnaldo Carvalho de Melo
2023-05-19 13:37         ` Arnaldo Carvalho de Melo
2023-05-18 13:01 ` Liang, Kan
2023-05-18 14:10   ` Ian Rogers
2023-05-18 14:40     ` Liang, Kan
2023-05-18 16:36       ` Ian Rogers
2023-05-18 17:36         ` Liang, Kan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d6b615e-0999-59d2-e123-5a2570f12cf5@arm.com \
    --to=james.clark@arm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tmricht@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®