[PATCH 0/3] BaseTools: fix some python DeprecationWarnings


Cole
 

This addresses some python DeprecationWarnings that are popping up
with python 3.10

Cole Robinson (3):
build: Fix python3.10 threading DeprecationWarnings
python: Replace distutils.utils.split_quotes with shlex.split
BaseTools: Drop check for distutils.utils

.../Source/Python/AutoGen/UniClassObject.py | 4 +-
.../Python/UPT/Library/UniClassObject.py | 4 +-
BaseTools/Source/Python/build/build.py | 48 +++++++++----------
BaseTools/Tests/RunTests.py | 7 ---
4 files changed, 28 insertions(+), 35 deletions(-)

--
2.31.1


Bob Feng
 

This patch set is good to me.

Reviewed-by: Bob Feng <bob.c.feng@...>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Cole
Sent: Saturday, July 24, 2021 4:02 AM
To: devel@edk2.groups.io
Cc: Cole Robinson <crobinso@...>
Subject: [edk2-devel] [PATCH 0/3] BaseTools: fix some python DeprecationWarnings

This addresses some python DeprecationWarnings that are popping up with python 3.10

Cole Robinson (3):
build: Fix python3.10 threading DeprecationWarnings
python: Replace distutils.utils.split_quotes with shlex.split
BaseTools: Drop check for distutils.utils

.../Source/Python/AutoGen/UniClassObject.py | 4 +-
.../Python/UPT/Library/UniClassObject.py | 4 +-
BaseTools/Source/Python/build/build.py | 48 +++++++++----------
BaseTools/Tests/RunTests.py | 7 ---
4 files changed, 28 insertions(+), 35 deletions(-)

--
2.31.1


Yuwei Chen
 

Hi Robinson,

When we doing the internal test, the issue is found that py27 is blocked by this patch.
You can reproduce the error with below steps:

For Linux:
[Error Reproduce steps]
$ export PYTHON3_ENABLE=FALSE
$ export PYTHON_COMMAND=/usr/bin/python2.7
$ build -p OvmfPkg/OvmfPkgIa32X64.dsc -a IA32 -a X64 -t GCC5
Active Platform = /home/jshi19/wksp_efi/edk2-3/OvmfPkg/OvmfPkgIa32X64.dsc
......
- Failed -
Build end time: 13:00:59, Aug.10 2021
Build total time: 00:00:07

[After Reverting the patch]
$ git revert 0b1b0a9674e27c858f05436ed92250f4498245cf
$ build -p OvmfPkg/OvmfPkgIa32X64.dsc -a IA32 -a X64 -t GCC5
Pass


For Windows:
[Error Reproduce steps]
set PYTHON3_ENABLE=FALSE
set PYTHON_COMMAND=C:\Python27\python.exe
build -p OvmfPkg\OvmfPkgIa32X64.dsc -a IA32 -a X64 -t VS2015x86
Active Platform = c:\users\yuweiche\code\edk2\edk2\OvmfPkg\OvmfPkgIa32X64.dsc
......
- Failed -
Build end time: 15:40:35, Aug.10 2021
Build total time: 00:00:07

[After Reverting the patch]
$ git revert 0b1b0a9674e27c858f05436ed92250f4498245cf
$ build -p OvmfPkg\OvmfPkgIa32X64.dsc -a IA32 -a X64 -t VS2015x86
- Done -
Build end time: 15:35:16, Aug.10 2021
Build total time: 00:01:58


Hope you can fix this bug. 😊 @crobinso@...

Hi Liming @Liming Gao, what do you think about this issue? If we need fix it before this quarter release?

Thanks,
Yuwei (Christine)

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Cole
Sent: Saturday, July 24, 2021 4:02 AM
To: devel@edk2.groups.io
Cc: Cole Robinson <crobinso@...>
Subject: [edk2-devel] [PATCH 0/3] BaseTools: fix some python
DeprecationWarnings

This addresses some python DeprecationWarnings that are popping up with
python 3.10

Cole Robinson (3):
build: Fix python3.10 threading DeprecationWarnings
python: Replace distutils.utils.split_quotes with shlex.split
BaseTools: Drop check for distutils.utils

.../Source/Python/AutoGen/UniClassObject.py | 4 +-
.../Python/UPT/Library/UniClassObject.py | 4 +-
BaseTools/Source/Python/build/build.py | 48 +++++++++----------
BaseTools/Tests/RunTests.py | 7 ---
4 files changed, 28 insertions(+), 35 deletions(-)

--
2.31.1