Skip to content

Commit aa5c658

Browse files
committed
Fix merge changes and fix building on existing ci bots servers.
1 parent 7541d4a commit aa5c658

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727
TypeVar,
2828
Generic,
2929
cast,
30+
TYPE_CHECKING,
3031
)
31-
from typing_extensions import Unpack
32+
33+
if TYPE_CHECKING:
34+
# FIXME: Add mypy and typing_extensions to the requirements.txt once all
35+
# build bots support the library.
36+
from typing_extensions import Unpack
3237

3338
## DAP type references
3439

@@ -740,10 +745,9 @@ def replay_packets(self, replay_file_path):
740745
print("error: didn't get a valid response")
741746
mode = "invalid"
742747

743-
def request_attach(self, **kwargs: Unpack[AttachArguments]):
748+
def request_attach(self, **kwargs: "Unpack[AttachArguments]"):
744749
# Remove any default (empty) values.
745750
attach_args = cast(AttachArguments, {k: v for k, v in kwargs.items() if v})
746-
attach_args.setdefault("disableASLR", True)
747751
attach_args.setdefault("initCommands", [])
748752
attach_args["initCommands"] = [
749753
*self.init_commands,
@@ -932,7 +936,7 @@ def request_initialize(self, sourceInitFile=False):
932936
self.initialize_body = response["body"]
933937
return response
934938

935-
def request_launch(self, **kwargs: Unpack[LaunchArguments]):
939+
def request_launch(self, **kwargs: "Unpack[LaunchArguments]"):
936940
# Remove any default (empty) values.
937941
launch_args = cast(LaunchArguments, {k: v for k, v in kwargs.items() if v})
938942
launch_args.setdefault("initCommands", [])

lldb/packages/Python/lldbsuite/test/tools/lldb-dap/lldbdap_testcase.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import os
22
import time
3-
from typing import Dict, Optional
4-
from typing_extensions import Unpack
3+
from typing import Dict, Optional, TYPE_CHECKING
54
import uuid
65

6+
if TYPE_CHECKING:
7+
# FIXME: Add mypy and typing_extensions to the requirements.txt once all
8+
# build bots support the library.
9+
from typing_extensions import Unpack
10+
711
from dap_server import (
812
DebugAdapterServer,
913
Source,
@@ -399,7 +403,7 @@ def attach(
399403
disconnectAutomatically=True,
400404
sourceInitFile=False,
401405
expectFailure=False,
402-
**kwargs: Unpack[AttachArguments],
406+
**kwargs: "Unpack[AttachArguments]",
403407
):
404408
"""Build the default Makefile target, create the DAP debug adapter,
405409
and attach to the process.
@@ -432,7 +436,7 @@ def launch(
432436
sourceInitFile=False,
433437
disconnectAutomatically=True,
434438
expectFailure=False,
435-
**kwargs: Unpack[LaunchArguments],
439+
**kwargs: "Unpack[LaunchArguments]",
436440
):
437441
"""Sending launch request to dap"""
438442

@@ -464,7 +468,7 @@ def build_and_launch(
464468
/,
465469
*,
466470
adapter_env: Optional[Dict[str, str]] = None,
467-
**kwargs: Unpack[LaunchArguments],
471+
**kwargs: "Unpack[LaunchArguments]",
468472
):
469473
"""Build the default Makefile target, create the DAP debug adapter,
470474
and launch the process.

0 commit comments

Comments
 (0)