public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io, bob.c.feng@intel.com,
	"michael.kubacki@outlook.com" <michael.kubacki@outlook.com>
Cc: "Gao, Liming" <liming.gao@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Laszlo Ersek <lersek@redhat.com>
Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools/Ecc: Replace deprecated function time.clock()
Date: Thu, 14 May 2020 09:37:00 +0200	[thread overview]
Message-ID: <a94c6b9c-e1b8-73af-c598-87e732504b7f@redhat.com> (raw)
In-Reply-To: <BN6PR11MB0068939C103C35F0A53DFA5AC9BF0@BN6PR11MB0068.namprd11.prod.outlook.com>

+Michael & Laszlo.

On 5/13/20 4:15 AM, Bob Feng wrote:
> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
> 
> -----Original Message-----
> From: michael.kubacki@outlook.com <michael.kubacki@outlook.com>
> Sent: Saturday, May 9, 2020 10:23 AM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
> Subject: [PATCH v1 1/1] BaseTools/Ecc: Replace deprecated function time.clock()
> 
> From: Michael Kubacki <michael.kubacki@microsoft.com>
> 
> 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 <bob.c.feng@intel.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
> ---
>   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.<BR>
> +# Copyright (c) Microsoft Corporation.<BR>

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
> 
> 
> 
> 


  reply	other threads:[~2020-05-14  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09  2:22 [PATCH v1 1/1] BaseTools/Ecc: Replace deprecated function time.clock() Michael Kubacki
2020-05-13  2:15 ` Bob Feng
2020-05-14  7:37   ` Philippe Mathieu-Daudé [this message]
2020-05-14  8:18     ` [edk2-devel] " Michael Kubacki
2020-05-14  8:45       ` Philippe Mathieu-Daudé
2020-05-14  9:12         ` Bob Feng
2020-05-14  7:18 ` Philippe Mathieu-Daudé

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-list 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=a94c6b9c-e1b8-73af-c598-87e732504b7f@redhat.com \
    --to=devel@edk2.groups.io \
    /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