[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d6b615e-0999-59d2-e123-5a2570f12cf5@arm.com>
Date: Thu, 18 May 2023 08:23:03 +0100
From: James Clark <james.clark@....com>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Thomas Richter <tmricht@...ux.ibm.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Kan Liang <kan.liang@...ux.intel.com>
Subject: Re: [PATCH v1 2/2] perf test attr: Fix deprecation warning
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@...gle.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@....com>
I thought I also did this a while ago but it must have gotten lost or I
didn't send it.
Powered by blists - more mailing lists