Skip to content

Add dis.Instruction.make for 3.14 #14039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2025
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion stdlib/@tests/stubtest_allowlists/py314.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ ctypes.wintypes.HDROP
ctypes.wintypes.HFILE
ctypes.wintypes.HRESULT
ctypes.wintypes.HSZ
dis.Instruction.make
enum.Enum.__signature__
enum.EnumMeta.__signature__
enum.EnumType.__signature__
Expand Down
15 changes: 15 additions & 0 deletions stdlib/dis.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,21 @@ class Instruction(_Instruction):
def jump_target(self) -> int: ...
@property
def is_jump_target(self) -> bool: ...
if sys.version_info >= (3, 14):
@staticmethod
def make(
opname: str,
arg: int | None,
argval: Any,
argrepr: str,
offset: int,
start_offset: int,
starts_line: bool,
line_number: int | None,
label: int | None = None,
positions: Positions | None = None,
cache_info: list[tuple[str, int, Any]] | None = None,
) -> Instruction: ...

class Bytecode:
codeobj: types.CodeType
Expand Down