Skip to content

Commit f31b293

Browse files
committed
Align remote debugging stubs with CPython
1 parent 8a6a2e3 commit f31b293

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

stdlib/_remote_debugging.pyi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from _typeshed import StrOrBytesPath, structseq
2-
from collections.abc import Callable, Sequence
2+
from collections.abc import Callable
33
from typing import Final, TypeAlias, final
44
from typing_extensions import Self
55

6-
_Location: TypeAlias = LocationInfo | None
6+
_Location: TypeAlias = tuple[int, int, int, int] | LocationInfo | None
77
_Frame: TypeAlias = tuple[str, _Location, str, int | None] | FrameInfo
88
_Stats: TypeAlias = dict[str, int | float]
99

@@ -133,6 +133,9 @@ class RemoteUnwinder:
133133
skip_non_matching_threads: bool = True,
134134
native: bool = False,
135135
gc: bool = False,
136+
opcodes: bool = False,
137+
cache_frames: bool = False,
138+
stats: bool = False,
136139
) -> None: ...
137140
def get_stack_trace(self) -> list[InterpreterInfo]: ...
138141
def get_all_awaited_by(self) -> list[AwaitedInfo]: ...
@@ -153,7 +156,7 @@ class BinaryWriter:
153156
) -> None: ...
154157
@property
155158
def total_samples(self) -> int: ...
156-
def write_sample(self, stack_frames: Sequence[InterpreterInfo], timestamp_us: int) -> None: ...
159+
def write_sample(self, stack_frames: list[InterpreterInfo], timestamp_us: int) -> None: ...
157160
def finalize(self) -> None: ...
158161
def close(self) -> None: ...
159162
def __enter__(self) -> Self: ...

stdlib/profiling/sampling/collector.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ from typing import TypeAlias
55

66
from _remote_debugging import AwaitedInfo, FrameInfo, InterpreterInfo, LocationInfo
77

8-
_Location: TypeAlias = tuple[int, int, int, int] | LocationInfo | None
8+
_Location: TypeAlias = int | tuple[int, int, int, int] | LocationInfo | None
99
_Frame: TypeAlias = FrameInfo | tuple[str, _Location, str, int | None]
1010
_Timestamps: TypeAlias = Sequence[int] | None
1111

0 commit comments

Comments
 (0)