[Lldb-commits] [lldb] 50ddc26 - [lldb][test][Shell] Remove Python 2 compatibility in build.py (#163192)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 13 06:59:55 PDT 2025
Author: David Spickett
Date: 2025-10-13T13:59:52Z
New Revision: 50ddc26f4c90274b11ad879e516469860ab655ca
URL: https://github.com/llvm/llvm-project/commit/50ddc26f4c90274b11ad879e516469860ab655ca
DIFF: https://github.com/llvm/llvm-project/commit/50ddc26f4c90274b11ad879e516469860ab655ca.diff
LOG: [lldb][test][Shell] Remove Python 2 compatibility in build.py (#163192)
_winreg was renamed to winreg in 3.0, and we require >= 3.8.
https://docs.python.org/3/whatsnew/3.0.html#library-changes
Added:
Modified:
lldb/test/Shell/helper/build.py
Removed:
################################################################################
diff --git a/lldb/test/Shell/helper/build.py b/lldb/test/Shell/helper/build.py
index caaa14f90af1c..a5a7e997be044 100755
--- a/lldb/test/Shell/helper/build.py
+++ b/lldb/test/Shell/helper/build.py
@@ -9,12 +9,8 @@
import sys
if sys.platform == "win32":
- # This module was renamed in Python 3. Make sure to import it using a
- # consistent name regardless of python version.
- try:
- import winreg
- except:
- import _winreg as winreg
+ import winreg
+
if __name__ != "__main__":
raise RuntimeError("Do not import this script, run it instead")
More information about the lldb-commits
mailing list