Update {code,codop}.compile_command in 3.14 (#14049)

This commit is contained in:
Semyon Moroz
2025-05-13 12:29:35 +00:00
committed by GitHub
parent 813430e77a
commit 23f1888037
3 changed files with 6 additions and 6 deletions
@@ -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
+1 -3
View File
@@ -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
@@ -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: ...
+5 -1
View File
@@ -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