From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by mx.groups.io with SMTP id smtpd.web09.5230.1608598007739245646 for ; Mon, 21 Dec 2020 16:46:48 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: byosoft.com.cn, ip: 58.240.74.242, mailfrom: gaoliming@byosoft.com.cn) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Tue, 22 Dec 2020 08:46:44 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , , "'Yunhua Feng'" , Cc: "'Liming Gao'" References: <20201218201443.1001495-1-hi@senzilla.io> In-Reply-To: <20201218201443.1001495-1-hi@senzilla.io> Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gW2VkazIvbWFzdGVyIFBBVENIIDEvMV0gR2VuRmRzOiBDb21wYXRpYmlsaXR5IHdpdGggUHl0aG9uIDMuOQ==?= Date: Tue, 22 Dec 2020 08:46:45 +0800 Message-ID: <003801d6d7fb$ec551390$c4ff3ab0$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQFiT0YbRC7WB8gl2zLyUA4r/VbfF6rrWPLQ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Language: zh-cn Yunhua and Bob: Can you review this patch this week? More and more people reports Python= 39 fail in BaseTools. Thanks Liming > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: bounce+27952+69235+4905953+8761045@groups.i= o > =E4=BB=A3=E8=A1=A8 D. Ols= son via > groups.io > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B412=E6=9C=8819=E6=97= =A5 4:15 > =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io > =E6=8A=84=E9=80=81: Dick Olsson > =E4=B8=BB=E9=A2=98: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compati= bility with > Python 3.9 >=20 > Python 3.9 removed the tostring() and fromstring() methods: > https://docs.python.org/3/whatsnew/3.9.html#removed >=20 > Signed-off-by: Dick Olsson > --- > BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > index dc1727c466..124dc43199 100644 > --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py > @@ -463,12 +463,12 @@ class GenFdsGlobalVariable: > GenFdsGlobalVariable.SecCmdList.append(' > '.join(Cmd).strip()) > else: > SectionData =3D array('B', [0, 0, 0, 0]) > - SectionData.fromstring(Ui.encode("utf_16_le")) > + SectionData.frombytes(Ui.encode("utf_16_le")) > SectionData.append(0) > SectionData.append(0) > Len =3D len(SectionData) >=20 > GenFdsGlobalVariable.SectionHeader.pack_into(SectionData, 0, Len & 0xff, > (Len >> 8) & 0xff, (Len >> 16) & 0xff, 0x15) > - SaveFileOnChange(Output, SectionData.tostring()) > + SaveFileOnChange(Output, SectionData.tobytes()) >=20 > elif Ver: > Cmd +=3D ("-n", Ver) > -- > 2.25.1 >=20 >=20 >=20 >=20 >=20 >=20