Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions stdlib/dis.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import sys
import types
from collections.abc import Callable, Iterator
from opcode import * # `dis` re-exports it as a part of public API
from typing import IO, Any, Final, NamedTuple
from typing_extensions import Self, TypeAlias, disjoint_base
from typing import IO, Any, Final, NamedTuple, overload
from typing_extensions import Self, TypeAlias, deprecated, disjoint_base

__all__ = [
"code_info",
Expand Down Expand Up @@ -277,7 +277,14 @@ else:
def distb(tb: types.TracebackType | None = None, *, file: IO[str] | None = None) -> None: ...

if sys.version_info >= (3, 13):
# 3.13 made `show_cache` `None` by default
# 3.13 made `show_caches` `None` by default and has no effect
@overload
def get_instructions(x: _HaveCodeType, *, first_line: int | None = None, adaptive: bool = False) -> Iterator[Instruction]: ...
@overload
@deprecated(
"The `show_caches` parameter is deprecated since Python 3.13. "
"The iterator generates the `Instruction` instances with the `cache_info` field populated."
)
def get_instructions(
x: _HaveCodeType, *, first_line: int | None = None, show_caches: bool | None = None, adaptive: bool = False
) -> Iterator[Instruction]: ...
Expand Down