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

@@ -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]: ...