8000 Update `{code,codop}.compile_command` in 3.14 by donbarbos · Pull Request #14049 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content
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
2 changes: 0 additions & 2 deletions stdlib/@tests/stubtest_allowlists/py314.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ builtins.int.__round__
builtins.memoryview.__class_getitem__
builtins.staticmethod.__annotate__
builtins.staticmethod.__class_getitem__
code.compile_command
codeop.compile_command
compression.gzip.GzipFile.readinto
compression.gzip.GzipFile.readinto
compression.gzip.GzipFile.readinto1
Expand Down
4 changes: 1 addition & 3 deletions stdlib/code.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import sys
from codeop import CommandCompiler
from codeop import CommandCompiler, compile_command as compile_command
from collections.abc import Callable
from types import CodeType
from typing import Any
Expand Down Expand Up @@ -52,5 +52,3 @@ else:
local: dict[str, Any] | None = None,
exitmsg: str | None = None,
) -> None: ...

def compile_command(source: str, filename: str = "<input>", symbol: str = "single") -> CodeType | None: ...
6 changes: 5 additions & 1 deletion stdlib/codeop.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ from types import CodeType

__all__ = ["compile_command", "Compile", "CommandCompiler"]

def compile_command(source: str, filename: str = "<input>", symbol: str = "single") -> CodeType | None: ...
if sys.version_info >= (3, 14):
def compile_command(source: str, filename: str = "<input>", symbol: str = "single", flags: int = 0) -> CodeType | None: ...

else:
def compile_command(source: str, filename: str = "<input>", symbol: str = "single") -> CodeType | None: ...

class Compile:
flags: int
Expand Down
0