Drop Python 3.8 branches (#13776)

This commit is contained in:
Sebastian Rittau
2025-04-03 10:35:36 +02:00
committed by GitHub
parent 1e43190554
commit 30b16c168d
117 changed files with 1023 additions and 2639 deletions
+16 -23
View File
@@ -2,6 +2,7 @@ import sys
from _typeshed import StrOrBytesPath
from collections.abc import Iterable
from cProfile import Profile as _cProfile
from dataclasses import dataclass
from profile import Profile
from typing import IO, Any, Literal, overload
from typing_extensions import Self, TypeAlias
@@ -11,10 +12,7 @@ if sys.version_info >= (3, 11):
else:
from enum import Enum
if sys.version_info >= (3, 9):
__all__ = ["Stats", "SortKey", "FunctionProfile", "StatsProfile"]
else:
__all__ = ["Stats", "SortKey"]
__all__ = ["Stats", "SortKey", "FunctionProfile", "StatsProfile"]
_Selector: TypeAlias = str | float | int
@@ -42,23 +40,20 @@ else:
STDNAME = "stdname"
TIME = "time"
if sys.version_info >= (3, 9):
from dataclasses import dataclass
@dataclass(unsafe_hash=True)
class FunctionProfile:
ncalls: str
tottime: float
percall_tottime: float
cumtime: float
percall_cumtime: float
file_name: str
line_number: int
@dataclass(unsafe_hash=True)
class FunctionProfile:
ncalls: str
tottime: float
percall_tottime: float
cumtime: float
percall_cumtime: float
file_name: str
line_number: int
@dataclass(unsafe_hash=True)
class StatsProfile:
total_tt: float
func_profiles: dict[str, FunctionProfile]
@dataclass(unsafe_hash=True)
class StatsProfile:
total_tt: float
func_profiles: dict[str, FunctionProfile]
_SortArgDict: TypeAlias = dict[str, tuple[tuple[tuple[int, int], ...], str]]
@@ -85,9 +80,7 @@ class Stats:
def strip_dirs(self) -> Self: ...
def calc_callees(self) -> None: ...
def eval_print_amount(self, sel: _Selector, list: list[str], msg: str) -> tuple[list[str], str]: ...
if sys.version_info >= (3, 9):
def get_stats_profile(self) -> StatsProfile: ...
def get_stats_profile(self) -> StatsProfile: ...
def get_print_list(self, sel_list: Iterable[_Selector]) -> tuple[int, list[str]]: ...
def print_stats(self, *amount: _Selector) -> Self: ...
def print_callees(self, *amount: _Selector) -> Self: ...