From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web12.7951.1589441829234055354 for ; Thu, 14 May 2020 00:37:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PafQtPwA; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589441828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DYotoRJ+cqjglG4ruk1+sbFm5i0x2EYTBnC8zF/krBo=; b=PafQtPwArTWKObeXgvPiLegQmJxsrWAh9+guiGg2rnubIY3A+QUE4xrTnjPIQ3DfNP621d edmgAMU9z8Q1qqGeXI+ZAgXqbHMMKvYPg0/tAcq+ZL+Vvhjf4Wdi5W60qV2Lgu4HFXIy+b vfgwPEUe26pMtpf6q0dI4241qZS5Lo4= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-140-s8e9GYIwM3CaGAVHHMHh9A-1; Thu, 14 May 2020 03:37:03 -0400 X-MC-Unique: s8e9GYIwM3CaGAVHHMHh9A-1 Received: by mail-wr1-f69.google.com with SMTP id 30so1117162wrq.15 for ; Thu, 14 May 2020 00:37:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=DYotoRJ+cqjglG4ruk1+sbFm5i0x2EYTBnC8zF/krBo=; b=nd5Kw3CvZy/iF9ow1ifSAmVr/d8Kr6JIpalSpTqRSCk6Tahpq3FH4BeX5KF+5blIqs XUlMltMqaJF8Vgu9T6vcn71HMpiQxmANNxJfB39jYCt+J+mwymqKQsQ5G6srVOE0P7lT yqzUVMLFvFEdaBO5aQDrkgIYC0Kc2Y20t1qRaQgS63/Vv2vZE5OdyIz/oTpBl77Xk9WJ F7jHq4k7t+x32REXdIaqn6lhTEZHbTDQZipID28mYSkqfmzmwjYHrQPi4s9+o5hm6DUB U01o28CesMqZz6RW0+fzJ7ROrHgwZuR6rO0RMx5GGuxFKqGy7FFEBVwNPYT/rRhbhT27 SPKg== X-Gm-Message-State: AGi0PuZ/Q8GWnuz2BIQG+ejD8Ob9A+M7srKN7s2WdH4phXY7fPHZYbbc dgvj2V4Jj68J3MLqQ4P0d+bCteHFJ1/3BVZjItXI4pvKW6gXkjjK8aUN1U690rRtXnFkRICCGi2 W+8o2CZYWyOAZlA== X-Received: by 2002:a1c:4e12:: with SMTP id g18mr46696465wmh.11.1589441822086; Thu, 14 May 2020 00:37:02 -0700 (PDT) X-Google-Smtp-Source: APiQypKY1rsXndwsL5WnRcx21yZejg9tHVbTa/7C9RgEDhVpBUl+WmjeNhaNs9Y+tp6s79JAM7ciMg== X-Received: by 2002:a1c:4e12:: with SMTP id g18mr46696434wmh.11.1589441821812; Thu, 14 May 2020 00:37:01 -0700 (PDT) Return-Path: Received: from [192.168.1.39] (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id y185sm9624142wmy.11.2020.05.14.00.37.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 May 2020 00:37:01 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools/Ecc: Replace deprecated function time.clock() To: devel@edk2.groups.io, bob.c.feng@intel.com, "michael.kubacki@outlook.com" Cc: "Gao, Liming" , Michael D Kinney , Laszlo Ersek References: From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: Date: Thu, 14 May 2020 09:37:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit +Michael & Laszlo. On 5/13/20 4:15 AM, Bob Feng wrote: > Reviewed-by: Bob Feng > > -----Original Message----- > From: michael.kubacki@outlook.com > Sent: Saturday, May 9, 2020 10:23 AM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming > Subject: [PATCH v1 1/1] BaseTools/Ecc: Replace deprecated function time.clock() > > From: Michael Kubacki > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2707 > > Ecc fails with Python 3.8 because it uses the deprecated time.clock() function - https://docs.python.org/3.7/library/time.html#time.clock > > This change updates EccMain.py to use time.perf_counter(). > > Cc: Bob Feng > Cc: Liming Gao > Signed-off-by: Michael Kubacki > --- > BaseTools/Source/Python/Ecc/EccMain.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/BaseTools/Source/Python/Ecc/EccMain.py b/BaseTools/Source/Python/Ecc/EccMain.py > index 560bb9fd7a31..72edbea3b883 100644 > --- a/BaseTools/Source/Python/Ecc/EccMain.py > +++ b/BaseTools/Source/Python/Ecc/EccMain.py > @@ -2,6 +2,7 @@ > # This file is used to be the main entrance of ECC tool # # Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) Microsoft Corporation.
When trying to apply this patch I got: error: patch failed: BaseTools/Source/Python/Ecc/EccMain.py:2 Because it has already been merged as commit 242ab73d7f255d5d859eaf74a23b9d68c686d177. 1/ The copyright comment misses a year range 2/ It is annoying to not know a patch has been merged. What is the expected workflow? Pull repository, look at patches merged, then go on the list to review the un-merged ones? I suppose this won't matter once workflow is switched to GitHub. Still, not very practical. Regards, Phil. > # SPDX-License-Identifier: BSD-2-Clause-Patent # > > @@ -406,9 +407,9 @@ if __name__ == '__main__': > EdkLogger.Initialize() > EdkLogger.IsRaiseError = False > > - StartTime = time.clock() > + StartTime = time.perf_counter() > Ecc = Ecc() > - FinishTime = time.clock() > + FinishTime = time.perf_counter() > > BuildDuration = time.strftime("%M:%S", time.gmtime(int(round(FinishTime - StartTime)))) > EdkLogger.quiet("\n%s [%s]" % (time.strftime("%H:%M:%S, %b.%d %Y", time.localtime()), BuildDuration)) > -- > 2.16.3.windows.1 > > > >