This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] perf testsuite: python 3 fixes
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Fri, 08 Jan 2016 11:29:02 +0000
- Subject: Re: [PATCH] perf testsuite: python 3 fixes
- Authentication-results: sourceware.org; auth=none
- References: <1452203012-19728-1-git-send-email-simon dot marchi at ericsson dot com>
Simon Marchi <simon.marchi@ericsson.com> writes:
> There are a few errors when trying to run the performance testsuite with
> Python 3. This commit fixes them.
>
> In Python 2, it was possible to use relative imports (importing a module
> relative to the current one). In Python 3 it isn't. So I use
> absolute_import from the __future__ module, which allows Python 2 to
> behave like Python 3, and use the Python 3 syntax.
>
> In Python 3, dict.iterkeys doesn't exist anymore. Using dict.keys is a
> good compromise in this case.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.perf/lib/perftest/perftest.py: Change relative imports to
> absolute.
> (SingleStatisticTestResult.report): Use dict.keys instead of
> dict.iterkeys.
Patch is fine with me.
--
Yao (éå)