[llvm] db9811c - Make lldbDataFormatters.py compatible with Python 3.8 (#82518)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 11:53:05 PST 2024
Author: Alexander Richardson
Date: 2024-02-21T11:53:01-08:00
New Revision: db9811cd131d66c1c3dff0222fc8bcc83a555846
URL: https://github.com/llvm/llvm-project/commit/db9811cd131d66c1c3dff0222fc8bcc83a555846
DIFF: https://github.com/llvm/llvm-project/commit/db9811cd131d66c1c3dff0222fc8bcc83a555846.diff
LOG: Make lldbDataFormatters.py compatible with Python 3.8 (#82518)
I just tried to load this into LLDB built against Python 3.8.5 and got
the following error: `TypeError: 'type' object is not subscriptable`. I
could fix this by wrapping the annotations in quotes but since Python
3.7 this syntax can be enabled with `from __future__ import
annotations`.
Added:
Modified:
llvm/utils/lldbDataFormatters.py
Removed:
################################################################################
diff --git a/llvm/utils/lldbDataFormatters.py b/llvm/utils/lldbDataFormatters.py
index de101abdabc8ec..4a34ad2a87c331 100644
--- a/llvm/utils/lldbDataFormatters.py
+++ b/llvm/utils/lldbDataFormatters.py
@@ -3,6 +3,7 @@
Load into LLDB with 'command script import /path/to/lldbDataFormatters.py'
"""
+from __future__ import annotations
import collections
import lldb
More information about the llvm-commits
mailing list