Skip to content

Commit b974642

Browse files
Merge branch 'main' into allow_arbitrary_types_dict_pop
2 parents 322ec0f + b94c9e8 commit b974642

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

stdlib/dis.pyi

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import sys
22
import types
33
from collections.abc import Callable, Iterator
44
from opcode import * # `dis` re-exports it as a part of public API
5-
from typing import IO, Any, Final, NamedTuple
6-
from typing_extensions import Self, TypeAlias, disjoint_base
5+
from typing import IO, Any, Final, NamedTuple, overload
6+
from typing_extensions import Self, TypeAlias, deprecated, disjoint_base
77

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

279279
if sys.version_info >= (3, 13):
280-
# 3.13 made `show_cache` `None` by default
280+
# 3.13 made `show_caches` `None` by default and has no effect
281+
@overload
282+
def get_instructions(x: _HaveCodeType, *, first_line: int | None = None, adaptive: bool = False) -> Iterator[Instruction]: ...
283+
@overload
284+
@deprecated(
285+
"The `show_caches` parameter is deprecated since Python 3.13. "
286+
"The iterator generates the `Instruction` instances with the `cache_info` field populated."
287+
)
281288
def get_instructions(
282289
x: _HaveCodeType, *, first_line: int | None = None, show_caches: bool | None = None, adaptive: bool = False
283290
) -> Iterator[Instruction]: ...

0 commit comments

Comments
 (0)