* [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
@ 2020-12-18 20:15 D. Olsson
2020-12-22 0:46 ` 回复: [edk2-devel] " gaoliming
0 siblings, 1 reply; 8+ messages in thread
From: D. Olsson @ 2020-12-18 20:15 UTC (permalink / raw)
To: devel; +Cc: Dick Olsson
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* 回复: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
2020-12-18 20:15 [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9 D. Olsson
@ 2020-12-22 0:46 ` gaoliming
2020-12-22 1:58 ` Bob Feng
0 siblings, 1 reply; 8+ messages in thread
From: gaoliming @ 2020-12-22 0:46 UTC (permalink / raw)
To: devel, hi, 'Yunhua Feng', bob.c.feng; +Cc: 'Liming Gao'
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
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
2020-12-22 0:46 ` 回复: [edk2-devel] " gaoliming
@ 2020-12-22 1:58 ` Bob Feng
2020-12-22 2:06 ` 回复: " gaoliming
2020-12-22 21:59 ` Bret Barkelew
0 siblings, 2 replies; 8+ messages in thread
From: Bob Feng @ 2020-12-22 1:58 UTC (permalink / raw)
To: gaoliming, devel@edk2.groups.io, hi@senzilla.io,
'Yunhua Feng'
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
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* 回复: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
2020-12-22 1:58 ` Bob Feng
@ 2020-12-22 2:06 ` gaoliming
2020-12-22 21:59 ` Bret Barkelew
1 sibling, 0 replies; 8+ messages in thread
From: gaoliming @ 2020-12-22 2:06 UTC (permalink / raw)
To: 'Feng, Bob C', devel, hi, 'Yunhua Feng'
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
> >
> >
> >
> >
> >
> >
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
2020-12-22 1:58 ` Bob Feng
2020-12-22 2:06 ` 回复: " gaoliming
@ 2020-12-22 21:59 ` Bret Barkelew
2020-12-22 22:31 ` D. Olsson
1 sibling, 1 reply; 8+ messages in thread
From: Bret Barkelew @ 2020-12-22 21:59 UTC (permalink / raw)
To: devel@edk2.groups.io, Feng, Bob C, gaoliming, hi@senzilla.io,
'Yunhua Feng'
[-- Attachment #1: Type: text/plain, Size: 3810 bytes --]
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@groups.io>
Sent: Monday, December 21, 2020 5:58 PM
To: gaoliming<mailto:gaoliming@byosoft.com.cn>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; hi@senzilla.io<mailto:hi@senzilla.io>; 'Yunhua Feng'<mailto:fengyunhua@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@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://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@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
>
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 9210 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
2020-12-22 21:59 ` Bret Barkelew
@ 2020-12-22 22:31 ` D. Olsson
2020-12-23 1:35 ` Bob Feng
0 siblings, 1 reply; 8+ messages in thread
From: D. Olsson @ 2020-12-22 22:31 UTC (permalink / raw)
To: devel, bret.barkelew, Feng, Bob C, gaoliming,
'Yunhua Feng'
[-- Attachment #1: Type: text/plain, Size: 3900 bytes --]
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@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@groups.io)
> Sent: Monday, December 21, 2020 5:58 PM
> To: [gaoliming](mailto:gaoliming@byosoft.com.cn); devel@edk2.groups.io; hi@senzilla.io; ['Yunhua Feng'](mailto:fengyunhua@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@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://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@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
>>
>>
>>
>>
>>
>>
>
>
[-- Attachment #2: Type: text/html, Size: 8468 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
2020-12-22 22:31 ` D. Olsson
@ 2020-12-23 1:35 ` Bob Feng
2020-12-23 2:21 ` Bret Barkelew
0 siblings, 1 reply; 8+ messages in thread
From: Bob Feng @ 2020-12-23 1:35 UTC (permalink / raw)
To: D. Olsson, devel@edk2.groups.io, bret.barkelew@microsoft.com,
gaoliming, 'Yunhua Feng'
[-- Attachment #1: Type: text/plain, Size: 5137 bytes --]
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@senzilla.io>
Sent: Wednesday, December 23, 2020 6:32 AM
To: devel@edk2.groups.io; bret.barkelew@microsoft.com; Feng, Bob C <bob.c.feng@intel.com>; gaoliming <gaoliming@byosoft.com.cn>; 'Yunhua Feng' <fengyunhua@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@groups.io<mailto:bret.barkelew=microsoft.com@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@groups.io>
Sent: Monday, December 21, 2020 5:58 PM
To: gaoliming<mailto:gaoliming@byosoft.com.cn>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; hi@senzilla.io<mailto:hi@senzilla.io>; 'Yunhua Feng'<mailto:fengyunhua@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@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
Sent: Tuesday, December 22, 2020 8:47 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; hi@senzilla.io<mailto:hi@senzilla.io>; 'Yunhua Feng' <fengyunhua@byosoft.com.cn<mailto:fengyunhua@byosoft.com.cn>>; Feng, Bob C <bob.c.feng@intel.com<mailto:bob.c.feng@intel.com>>
Cc: 'Liming Gao' <gaoliming@byosoft.com.cn<mailto: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<mailto:bounce+27952+69235+4905953+8761045@groups.io>
> <bounce+27952+69235+4905953+8761045@groups.io<mailto:bounce+27952+69235+4905953+8761045@groups.io>> 代表 D. Olsson via
> groups.io
> 发送时间: 2020年12月19日 4:15
> 收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> 抄送: Dick Olsson <hi@senzilla.io<mailto: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://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@senzilla.io<mailto: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
>
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 13067 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
2020-12-23 1:35 ` Bob Feng
@ 2020-12-23 2:21 ` Bret Barkelew
0 siblings, 0 replies; 8+ messages in thread
From: Bret Barkelew @ 2020-12-23 2:21 UTC (permalink / raw)
To: Feng, Bob C, D. Olsson, devel@edk2.groups.io, gaoliming,
'Yunhua Feng'
[-- Attachment #1.1: Type: text/plain, Size: 7255 bytes --]
Thanks, Bob!
- Bret
From: Feng, Bob C<mailto:bob.c.feng@intel.com>
Sent: Tuesday, December 22, 2020 5:35 PM
To: D. Olsson<mailto:hi@senzilla.io>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Bret Barkelew<mailto:Bret.Barkelew@microsoft.com>; gaoliming<mailto:gaoliming@byosoft.com.cn>; 'Yunhua Feng'<mailto:fengyunhua@byosoft.com.cn>
Subject: [EXTERNAL] RE: [edk2-devel] [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9
Add a new BZ for recording the python3.9 related patches.
https://bugzilla.tianocore.org/show_bug.cgi?id=3136<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D3136&data=04%7C01%7Cbret.barkelew%40microsoft.com%7C8a90baffee5548fa016608d8a6e318a7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637442841595129557%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=G37mPlomk6wDKGmmsUfjV%2BGNnFr%2FTXfg0XnrhORxf6I%3D&reserved=0>
And I’ll update this patch https://edk2.groups.io/g/devel/message/67511<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F67511&data=04%7C01%7Cbret.barkelew%40microsoft.com%7C8a90baffee5548fa016608d8a6e318a7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637442841595139510%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=TN1spRuLYK8gTZo%2Fml2co%2BZVpIxDtRiW78us2mff1q0%3D&reserved=0> commit message to add this BZ when I push it.
Thanks,
Bob
From: D. Olsson <hi@senzilla.io>
Sent: Wednesday, December 23, 2020 6:32 AM
To: devel@edk2.groups.io; bret.barkelew@microsoft.com; Feng, Bob C <bob.c.feng@intel.com>; gaoliming <gaoliming@byosoft.com.cn>; 'Yunhua Feng' <fengyunhua@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@groups.io<mailto:bret.barkelew=microsoft.com@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@groups.io>
Sent: Monday, December 21, 2020 5:58 PM
To: gaoliming<mailto:gaoliming@byosoft.com.cn>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; hi@senzilla.io<mailto:hi@senzilla.io>; 'Yunhua Feng'<mailto:fengyunhua@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<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F67511&data=04%7C01%7Cbret.barkelew%40microsoft.com%7C8a90baffee5548fa016608d8a6e318a7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637442841595139510%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=TN1spRuLYK8gTZo%2Fml2co%2BZVpIxDtRiW78us2mff1q0%3D&reserved=0>
Thanks,
Bob
-----Original Message-----
From: gaoliming <gaoliming@byosoft.com.cn<mailto:gaoliming@byosoft.com.cn>>
Sent: Tuesday, December 22, 2020 8:47 AM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>; hi@senzilla.io<mailto:hi@senzilla.io>; 'Yunhua Feng' <fengyunhua@byosoft.com.cn<mailto:fengyunhua@byosoft.com.cn>>; Feng, Bob C <bob.c.feng@intel.com<mailto:bob.c.feng@intel.com>>
Cc: 'Liming Gao' <gaoliming@byosoft.com.cn<mailto: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<mailto:bounce+27952+69235+4905953+8761045@groups.io>
> <bounce+27952+69235+4905953+8761045@groups.io<mailto:bounce+27952+69235+4905953+8761045@groups.io>> 代表 D. Olsson via
> groups.io
> 发送时间: 2020年12月19日 4:15
> 收件人: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
> 抄送: Dick Olsson <hi@senzilla.io<mailto: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://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<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%7C8a90baffee5548fa016608d8a6e318a7%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637442841595149474%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DJrm5NYCLT6sFDikpdQXemdQ16cNNtO3Seyq1xVVKLE%3D&reserved=0>
>
> Signed-off-by: Dick Olsson <hi@senzilla.io<mailto: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
>
>
>
>
>
>
[-- Attachment #1.2: Type: text/html, Size: 14399 bytes --]
[-- Attachment #2: 7B86408DAE3F4D2DBF84E203E42B7023.png --]
[-- Type: image/png, Size: 151 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-12-23 2:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox