From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.120]) by mx.groups.io with SMTP id smtpd.web10.8575.1589445928391572085 for ; Thu, 14 May 2020 01:45:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FkbYLLfK; spf=pass (domain: redhat.com, ip: 207.211.31.120, mailfrom: philmd@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589445927; 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=hOjvwTVNWmF9a+CqO/OfZ2QDF35ZqJlOagPNf+e7Xss=; b=FkbYLLfKUdmi2WpNRisEsW2vJiqEkPv4XMCHybDr6XNn38FtkB+pyCw2wzYKAAowM2q9GF YZb/Wj2iJetfbZNTScEVqItN6RTnvsvv9TOrVP9YS2DWrj+xlOum/6RqoGRiPCiJ4v+egu mY5d33TKVfhGFT248iXszi/W3FygvQo= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-179-o88sNI31NpewYRCsNyTFQQ-1; Thu, 14 May 2020 04:45:21 -0400 X-MC-Unique: o88sNI31NpewYRCsNyTFQQ-1 Received: by mail-wr1-f71.google.com with SMTP id z16so268344wrq.21 for ; Thu, 14 May 2020 01:45:21 -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=hOjvwTVNWmF9a+CqO/OfZ2QDF35ZqJlOagPNf+e7Xss=; b=WRw0++ZKUOxvZJligmO3N52aSS19aRNpUmmwCcxMtU7ZEZahzYgUuN0glx6zTwfMnN mYYQPaU6FM04iErZdSINDvVhqtNrdGx+vhq/OeQ9QP9HTSKYgJMVcnC05yu0ZzNzoA6O PpwhHM9npBodJ9g9MBC0B7BaaLHOv+iPFTeqDuPTNIn2JssRdpCB+YfS1ykVQb8ltP1J 8HJyh5wGiK7+dwq5hxcVwVu/9vlVovNMofXh1wK5Rr9gUF8Sm2Yj+/gn8qa+a6R4is7l 5/kPQPryj87fKaMcvqMG82z1/Emw9K50qIOE4h9dFyLGRnGP5NkkjYqxzrTesM2YUNh4 T0SQ== X-Gm-Message-State: AOAM532Pv7iAQGrQhyomYYWpqLttorJHP9PZjPGFqYEJB/328VcYwYbh y0q78GDm1z9Db3139PfZ9IjIj6XozelfVo5xNRwYP5SqDV+m2P9WiCLBXeS5UCwPS7PKo9PnaNK pzgoAmmVhZ104Xg== X-Received: by 2002:adf:e74a:: with SMTP id c10mr4214692wrn.109.1589445920628; Thu, 14 May 2020 01:45:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlHH4mWw79V2JCBcgDjZuc+fTk63+Ch/vfrQTzvDoQZb6nEMcQgQYi73eLCes7/+4dHTp+Rw== X-Received: by 2002:adf:e74a:: with SMTP id c10mr4214667wrn.109.1589445920389; Thu, 14 May 2020 01:45:20 -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 5sm5885874wmd.19.2020.05.14.01.45.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 May 2020 01:45:19 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools/Ecc: Replace deprecated function time.clock() To: Michael Kubacki , devel@edk2.groups.io, bob.c.feng@intel.com Cc: "Gao, Liming" , Michael D Kinney , Laszlo Ersek References: From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Message-ID: Date: Thu, 14 May 2020 10:45:18 +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: 8bit On 5/14/20 10:18 AM, Michael Kubacki wrote: > Hi Phil, > > It has been a policy from Microsoft contributors to not include a year > in the copyright header you will find this in many other existing files > in edk2, I am simply aligning to that practice. If you want an aligned codebase, we should first remove all they years in all the other Copyright lines. > > Bob is the maintainer and as maintainer he chose to submit the patch (it > has been on the list since May 8th). It has been relatively common to > reply to the patch thread to indicate it was submitted with commit > details. This is extra work for the maintainer, but save time to reviewers. The mergify bot could do that, but (see previous comment below) it is probably not worthwhile if the plan is to switch to GitHub pull requests. > I noticed the details were not updated in the BZ either in this > case so I have done that and closed the BZ. Thanks for this. > > Thanks, > Michael > > > On 5/14/2020 12:37 AM, Philippe Mathieu-Daudé wrote: >> +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 >>> >>> >>> >>> >> >