[edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9

Bob Feng bob.c.feng at intel.com
Wed Dec 23 01:35:51 UTC 2020


Add a new BZ for recording the python3.9 related patches.
https://bugzilla.tianocore.org/show_bug.cgi?id=3136

And I’ll update this patch https://edk2.groups.io/g/devel/message/67511  commit message to add this BZ when I push it.

Thanks,
Bob

From: D. Olsson <hi at senzilla.io>
Sent: Wednesday, December 23, 2020 6:32 AM
To: devel at edk2.groups.io; bret.barkelew at microsoft.com; Feng, Bob C <bob.c.feng at intel.com>; gaoliming <gaoliming at byosoft.com.cn>; 'Yunhua Feng' <fengyunhua at byosoft.com.cn>
Subject: Re: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9

I have not created any additional entries on Bugzilla or GitHub for this specific patch. But I have seen plenty of related patches in the mailing list.

D. Olsson
PGP: 8204A8CD


On Tue, Dec 22, 2020 at 22:59, Bret Barkelew via groups.io <bret.barkelew=microsoft.com at groups.io<mailto:bret.barkelew=microsoft.com at groups.io>> wrote:
Do any of these reports have active Bugzilla or GitHub issues associated with them?

Trying to track patch completion in Mu, since we’ve already implemented the “frombytes” solution.

- Bret

From: Bob Feng via groups.io<mailto:bob.c.feng=intel.com at groups.io>
Sent: Monday, December 21, 2020 5:58 PM
To: gaoliming<mailto:gaoliming at byosoft.com.cn>; devel at edk2.groups.io<mailto:devel at edk2.groups.io>; hi at senzilla.io<mailto:hi at senzilla.io>; 'Yunhua Feng'<mailto:fengyunhua at byosoft.com.cn>
Subject: [EXTERNAL] 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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F67511&data=04%7C01%7CBret.Barkelew%40microsoft.com%7C6fa4f0d34ca34df5a21a08d8a61d1c0f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637441991250372790%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=q0kpLCthainyd0V8u%2FgJoCkx1SD4N0SLITWXBqAmLAk%3D&reserved=0

Thanks,
Bob

-----Original Message-----
From: gaoliming <gaoliming at byosoft.com.cn<mailto:gaoliming at byosoft.com.cn>>
Sent: Tuesday, December 22, 2020 8:47 AM
To: devel at edk2.groups.io<mailto:devel at edk2.groups.io>; hi at senzilla.io<mailto:hi at senzilla.io>; 'Yunhua Feng' <fengyunhua at byosoft.com.cn<mailto:fengyunhua at byosoft.com.cn>>; Feng, Bob C <bob.c.feng at intel.com<mailto:bob.c.feng at intel.com>>
Cc: 'Liming Gao' <gaoliming at byosoft.com.cn<mailto:gaoliming at 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 at groups.io<mailto:bounce+27952+69235+4905953+8761045 at groups.io>
> <bounce+27952+69235+4905953+8761045 at groups.io<mailto:bounce+27952+69235+4905953+8761045 at groups.io>> 代表 D. Olsson via
> groups.io
> 发送时间: 2020年12月19日 4:15
> 收件人: devel at edk2.groups.io<mailto:devel at edk2.groups.io>
> 抄送: Dick Olsson <hi at senzilla.io<mailto:hi at 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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.python.org%2F3%2Fwhatsnew%2F3.9.html%23removed&data=04%7C01%7CBret.Barkelew%40microsoft.com%7C6fa4f0d34ca34df5a21a08d8a61d1c0f%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637441991250372790%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Zjbwllc0trGUL%2FSgSnB4Ivmkzu2B1l5AEgbWKf4L77g%3D&reserved=0
>
> Signed-off-by: Dick Olsson <hi at senzilla.io<mailto:hi at 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
>
>
>
>
>
>












-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69390): https://edk2.groups.io/g/devel/message/69390
Mute This Topic: https://groups.io/mt/79140937/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20201223/6d7952de/attachment.htm>


More information about the edk2-devel-archive mailing list