public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "gaoliming" <gaoliming@byosoft.com.cn>
To: "'Feng, Bob C'" <bob.c.feng@intel.com>, <devel@edk2.groups.io>,
	<hi@senzilla.io>, "'Yunhua Feng'" <fengyunhua@byosoft.com.cn>
Subject: 回复: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
Date: Tue, 22 Dec 2020 10:06:11 +0800	[thread overview]
Message-ID: <004401d6d807$056d53f0$1047fbd0$@byosoft.com.cn> (raw)
In-Reply-To: <DM6PR11MB4073F490A7094C4F595591CBC9DF0@DM6PR11MB4073.namprd11.prod.outlook.com>

Bob:
  If https://edk2.groups.io/g/devel/message/67511 supports python 2&3, it will be better. 

  Have you reviewed this patch? 

Thanks
Liming
> -----邮件原件-----
> 发件人: Feng, Bob C <bob.c.feng@intel.com>
> 发送时间: 2020年12月22日 9:59
> 收件人: gaoliming <gaoliming@byosoft.com.cn>; devel@edk2.groups.io;
> hi@senzilla.io; 'Yunhua Feng' <fengyunhua@byosoft.com.cn>
> 主题: RE: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with
> Python 3.9
> 
> This patch won't work for python2
> 
> Let's review this patch.
> https://edk2.groups.io/g/devel/message/67511
> 
> Thanks,
> Bob
> 
> -----Original Message-----
> From: gaoliming <gaoliming@byosoft.com.cn>
> Sent: Tuesday, December 22, 2020 8:47 AM
> To: devel@edk2.groups.io; hi@senzilla.io; 'Yunhua Feng'
> <fengyunhua@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>
> Cc: 'Liming Gao' <gaoliming@byosoft.com.cn>
> Subject: 回复: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility
> with Python 3.9
> 
> Yunhua and Bob:
>   Can you review this patch this week? More and more people reports
> Python39 fail in BaseTools.
> 
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: bounce+27952+69235+4905953+8761045@groups.io
> > <bounce+27952+69235+4905953+8761045@groups.io> 代表 D. Olsson
> via
> > groups.io
> > 发送时间: 2020年12月19日 4:15
> > 收件人: devel@edk2.groups.io
> > 抄送: Dick Olsson <hi@senzilla.io>
> > 主题: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with
> > Python 3.9
> >
> > Python 3.9 removed the tostring() and fromstring() methods:
> > https://docs.python.org/3/whatsnew/3.9.html#removed
> >
> > Signed-off-by: Dick Olsson <hi@senzilla.io>
> > ---
> >  BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > 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 = 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 = len(SectionData)
> >
> > GenFdsGlobalVariable.SectionHeader.pack_into(SectionData, 0, Len &
> > 0xff, (Len >> 8) & 0xff, (Len >> 16) & 0xff, 0x15)
> > -                SaveFileOnChange(Output, SectionData.tostring())
> > +                SaveFileOnChange(Output, SectionData.tobytes())
> >
> >          elif Ver:
> >              Cmd += ("-n", Ver)
> > --
> > 2.25.1
> >
> >
> >
> >
> > 
> >
> 
> 




  reply	other threads:[~2020-12-22  2:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 20:15 [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9 D. Olsson
2020-12-22  0:46 ` 回复: [edk2-devel] " gaoliming
2020-12-22  1:58   ` Bob Feng
2020-12-22  2:06     ` gaoliming [this message]
2020-12-22 21:59     ` Bret Barkelew
2020-12-22 22:31       ` D. Olsson
2020-12-23  1:35         ` Bob Feng
2020-12-23  2:21           ` Bret Barkelew

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='004401d6d807$056d53f0$1047fbd0$@byosoft.com.cn' \
    --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