[Lldb-commits] [lldb] 9d193ad - [lldb] Avoid NotRequired for Python < 3.11 compatibility (#192723)
via lldb-commits
lldb-commits at lists.llvm.org
Sat Apr 18 11:24:55 PDT 2026
Author: Jonas Devlieghere
Date: 2026-04-18T11:24:48-07:00
New Revision: 9d193ada7056dcc61ab061d2e35a4c05d7e61e15
URL: https://github.com/llvm/llvm-project/commit/9d193ada7056dcc61ab061d2e35a4c05d7e61e15
DIFF: https://github.com/llvm/llvm-project/commit/9d193ada7056dcc61ab061d2e35a4c05d7e61e15.diff
LOG: [lldb] Avoid NotRequired for Python < 3.11 compatibility (#192723)
NotRequired was added in Python 3.11, while the minimum supported Python
for LLDB is 3.8. Avoid it by using `Dict[str, Any]` instead.
Added:
Modified:
lldb/scripts/gen-property-docs-from-json.py
Removed:
################################################################################
diff --git a/lldb/scripts/gen-property-docs-from-json.py b/lldb/scripts/gen-property-docs-from-json.py
index e7de4ea2f4120..5d90f9f7ec8e1 100644
--- a/lldb/scripts/gen-property-docs-from-json.py
+++ b/lldb/scripts/gen-property-docs-from-json.py
@@ -1,28 +1,11 @@
import argparse
-from typing import TypedDict, Union, Optional, TextIO, NotRequired
+from typing import Any, Dict, TypedDict, Union, Optional, TextIO
from dataclasses import dataclass
import json
import re
-PropertyDef = TypedDict(
- "PropertyDef",
- {
- "!superclasses": list[str],
- "Name": str,
- "Path": str,
- "Type": str,
- "Description": NotRequired[str],
- "HasDefaultUnsignedValue": NotRequired[int],
- "HasDefaultBooleanValue": NotRequired[int],
- "DefaultUnsignedValue": NotRequired[int],
- "HasDefaultStringValue": NotRequired[int],
- "DefaultStringValue": NotRequired[str],
- "HasDefaultEnumValue": NotRequired[int],
- "DefaultEnumValue": NotRequired[str],
- "EnumValues": NotRequired[str],
- },
-)
+PropertyDef = Dict[str, Any]
class Property:
More information about the lldb-commits
mailing list