math, mimetypes, mmap, multiprocessing, sqlite: Python 3.13 updates (#12062)

This commit is contained in:
Amin Alaee
2024-05-30 14:56:22 +02:00
committed by GitHub
parent b780ac0ab0
commit 321c0ce75e
6 changed files with 22 additions and 11 deletions

View File

@@ -125,12 +125,6 @@ mailbox.Maildir.get_info
mailbox.Maildir.remove_flag
mailbox.Maildir.set_flags
mailbox.Maildir.set_info
math.fma
mimetypes.MimeTypes.guess_file_type
mimetypes.__all__
mimetypes.guess_file_type
mmap.mmap.seekable
multiprocessing.shared_memory.SharedMemory.__init__
pdb.Pdb.MAX_CHAINED_EXCEPTION_DEPTH
pdb.Pdb.completedefault
pdb.Pdb.completenames
@@ -147,8 +141,6 @@ pydoc.tempfilepager
pydoc.ttypager
site.gethistoryfile
site.register_readline
sqlite3.Connection.iterdump
sqlite3.dbapi2.Connection.iterdump
sre_compile.SRE_FLAG_TEMPLATE
sre_constants.SRE_FLAG_TEMPLATE
sre_parse.SRE_FLAG_TEMPLATE

View File

@@ -125,4 +125,4 @@ if sys.version_info >= (3, 9):
def ulp(x: _SupportsFloatOrIndex, /) -> float: ...
if sys.version_info >= (3, 13):
def fma(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, z: _SupportsFloatOrIndex) -> float: ...
def fma(x: _SupportsFloatOrIndex, y: _SupportsFloatOrIndex, z: _SupportsFloatOrIndex, /) -> float: ...

View File

@@ -1,3 +1,4 @@
import sys
from _typeshed import StrPath
from collections.abc import Sequence
from typing import IO
@@ -18,6 +19,9 @@ __all__ = [
"common_types",
]
if sys.version_info >= (3, 13):
__all__ += ["guess_file_type"]
def guess_type(url: StrPath, strict: bool = True) -> tuple[str | None, str | None]: ...
def guess_all_extensions(type: str, strict: bool = True) -> list[str]: ...
def guess_extension(type: str, strict: bool = True) -> str | None: ...
@@ -25,6 +29,9 @@ def init(files: Sequence[str] | None = None) -> None: ...
def read_mime_types(file: str) -> dict[str, str] | None: ...
def add_type(type: str, ext: str, strict: bool = True) -> None: ...
if sys.version_info >= (3, 13):
def guess_file_type(path: StrPath, *, strict: bool = True) -> tuple[str | None, str | None]: ...
inited: bool
knownfiles: list[str]
suffix_map: dict[str, str]
@@ -44,3 +51,5 @@ class MimeTypes:
def read(self, filename: str, strict: bool = True) -> None: ...
def readfp(self, fp: IO[str], strict: bool = True) -> None: ...
def read_windows_registry(self, strict: bool = True) -> None: ...
if sys.version_info >= (3, 13):
def guess_file_type(self, path: StrPath, *, strict: bool = True) -> tuple[str | None, str | None]: ...

View File

@@ -76,6 +76,8 @@ class mmap(Iterable[int], Sized):
def __exit__(self, *args: Unused) -> None: ...
def __buffer__(self, flags: int, /) -> memoryview: ...
def __release_buffer__(self, buffer: memoryview, /) -> None: ...
if sys.version_info >= (3, 13):
def seekable(self) -> bool: ...
if sys.platform != "win32":
MADV_NORMAL: int

View File

@@ -11,7 +11,11 @@ __all__ = ["SharedMemory", "ShareableList"]
_SLT = TypeVar("_SLT", int, float, bool, str, bytes, None)
class SharedMemory:
def __init__(self, name: str | None = None, create: bool = False, size: int = 0) -> None: ...
if sys.version_info >= (3, 13):
def __init__(self, name: str | None = None, create: bool = False, size: int = 0, *, track: bool = True) -> None: ...
else:
def __init__(self, name: str | None = None, create: bool = False, size: int = 0) -> None: ...
@property
def buf(self) -> memoryview: ...
@property

View File

@@ -428,7 +428,11 @@ class Connection:
def executemany(self, sql: str, parameters: Iterable[_Parameters], /) -> Cursor: ...
def executescript(self, sql_script: str, /) -> Cursor: ...
def interrupt(self) -> None: ...
def iterdump(self) -> Generator[str, None, None]: ...
if sys.version_info >= (3, 13):
def iterdump(self, *, filter: str | None = None) -> Generator[str, None, None]: ...
else:
def iterdump(self) -> Generator[str, None, None]: ...
def rollback(self) -> None: ...
def set_authorizer(
self, authorizer_callback: Callable[[int, str | None, str | None, str | None, str | None], int] | None