From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109407 invoked by alias); 8 Jan 2016 11:29:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 109393 invoked by uid 89); 8 Jan 2016 11:29:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=imports X-HELO: mail-pf0-f182.google.com Received: from mail-pf0-f182.google.com (HELO mail-pf0-f182.google.com) (209.85.192.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 08 Jan 2016 11:29:09 +0000 Received: by mail-pf0-f182.google.com with SMTP id q63so8983720pfb.1 for ; Fri, 08 Jan 2016 03:29:09 -0800 (PST) X-Received: by 10.98.9.75 with SMTP id e72mr3480390pfd.29.1452252547888; Fri, 08 Jan 2016 03:29:07 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id dg1sm166579324pad.18.2016.01.08.03.29.05 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 08 Jan 2016 03:29:06 -0800 (PST) From: Yao Qi To: Simon Marchi Cc: Subject: Re: [PATCH] perf testsuite: python 3 fixes References: <1452203012-19728-1-git-send-email-simon.marchi@ericsson.com> Date: Fri, 08 Jan 2016 11:29:00 -0000 In-Reply-To: <1452203012-19728-1-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Thu, 7 Jan 2016 16:43:32 -0500") Message-ID: <86fuy8wbr5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00129.txt.bz2 Simon Marchi 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. --=20 Yao (=E9=BD=90=E5=B0=A7)