From bcacf6b8ef9fc87412a72ce34beb0c3890b00d76 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 13 Feb 2024 10:57:34 +0800 Subject: [PATCH] chore: Delete the pond-stubs folder --- pond-stubs/__init__.pyi | 0 pond-stubs/count_min_sketch.pyi | 13 ------------- pond-stubs/pond_class.pyi | 25 ------------------------- pond-stubs/pooled_object.pyi | 9 --------- pond-stubs/pooled_object_factory.pyi | 17 ----------------- pyproject.toml | 2 +- 6 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 pond-stubs/__init__.pyi delete mode 100644 pond-stubs/count_min_sketch.pyi delete mode 100644 pond-stubs/pond_class.pyi delete mode 100644 pond-stubs/pooled_object.pyi delete mode 100644 pond-stubs/pooled_object_factory.pyi diff --git a/pond-stubs/__init__.pyi b/pond-stubs/__init__.pyi deleted file mode 100644 index e69de29..0000000 diff --git a/pond-stubs/count_min_sketch.pyi b/pond-stubs/count_min_sketch.pyi deleted file mode 100644 index 113d6bc..0000000 --- a/pond-stubs/count_min_sketch.pyi +++ /dev/null @@ -1,13 +0,0 @@ -import typing as t -from _typeshed import Incomplete -from threading import RLock as RLock, Thread as Thread - -class CountMinSketch: - m: Incomplete - d: Incomplete - sketch: Incomplete - lock: bool - def __init__(self, m: int, d: int) -> None: ... - def add(self, x: t.Hashable) -> None: ... - def query(self, x: t.Hashable) -> int: ... - def __getitem__(self, x: t.Hashable) -> int: ... diff --git a/pond-stubs/pond_class.pyi b/pond-stubs/pond_class.pyi deleted file mode 100644 index f774522..0000000 --- a/pond-stubs/pond_class.pyi +++ /dev/null @@ -1,25 +0,0 @@ -from .count_min_sketch import CountMinSketch as CountMinSketch -from .pooled_object import PooledObject as PooledObject -from .pooled_object_factory import PooledObjectFactory as PooledObjectFactory -from _typeshed import Incomplete -from asyncio import AbstractEventLoop -from typing import Optional - -class Pond: - counter: Incomplete - def __init__(self, borrowed_timeout: int = ..., time_between_eviction_runs: int = ..., eviction_weight: float = ..., thread_daemon: bool = ..., loop: Optional[AbstractEventLoop] = ...) -> None: ... - def register(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> None: ... - def borrow(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> PooledObject: ... - def recycle(self, pooled_object: PooledObject, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> None: ... - def clear(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> None: ... - def size(self) -> int: ... - def count_total_objects(self) -> int: ... - def contains(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> bool: ... - def pooled_object_size(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> int: ... - def is_full(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> bool: ... - def is_empty(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> bool: ... - def stop(self) -> None: ... - async def async_register(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> None: ... - async def async_borrow(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> PooledObject: ... - async def async_recycle(self, pooled_object: PooledObject, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> None: ... - async def async_clear(self, factory: Optional[PooledObjectFactory] = ..., name: Optional[str] = ...) -> None: ... diff --git a/pond-stubs/pooled_object.pyi b/pond-stubs/pooled_object.pyi deleted file mode 100644 index ad042d9..0000000 --- a/pond-stubs/pooled_object.pyi +++ /dev/null @@ -1,9 +0,0 @@ -from typing import Any - -class PooledObject: - create_time: float - last_borrow_time: float - keeped_object: Any - def __init__(self, obj: Any) -> None: ... - def use(self) -> Any: ... - def update_brrow_time(self) -> PooledObject: ... diff --git a/pond-stubs/pooled_object_factory.pyi b/pond-stubs/pooled_object_factory.pyi deleted file mode 100644 index 45d4a03..0000000 --- a/pond-stubs/pooled_object_factory.pyi +++ /dev/null @@ -1,17 +0,0 @@ -import abc -from .pooled_object import PooledObject as PooledObject -from _typeshed import Incomplete - -class PooledObjectFactory(metaclass=abc.ABCMeta): - pooled_maxsize: Incomplete - least_one: Incomplete - def __init__(self, pooled_maxsize: int = ..., least_one: bool = ...) -> None: ... - @abc.abstractmethod - def createInstance(self) -> PooledObject: ... - @abc.abstractmethod - def destroy(self, pooled_object: PooledObject) -> None: ... - @abc.abstractmethod - def reset(self, pooled_object: PooledObject) -> PooledObject: ... - @abc.abstractmethod - def validate(self, pooled_object: PooledObject) -> bool: ... - def factory_name(self) -> str: ... diff --git a/pyproject.toml b/pyproject.toml index f841078..5942ba9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ license = {file = "LICENSE"} name = "pondpond" readme = "README.md" requires-python = ">=3.8" -version = "1.3.2" +version = "1.3.3" [project.urls] "Blog" = "https://qin.news"