From f90a3b8be512243901f44d59a224981210784bdc Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 1 Jan 2026 12:10:28 +0100 Subject: [PATCH 01/24] Improve kombu transport and JSON stubs - Fix kombu.utils.json.loads/dumps: make optional params have defaults - Fix kombu.utils.json.object_hook: return Any instead of None - Add missing attributes and methods to kombu.transport.base.Transport - Fix kombu.transport.base.StdChannel to match runtime - Add kombu.transport.virtual module stubs (Transport, Channel, QoS, etc.) - Add kombu.utils.objects.cached_property stub - Add kombu.utils.scheduling.FairCycle stub - Add missing amqp exceptions (ChannelError, RecoverableConnectionError, etc.) - Export ChannelError from kombu.exceptions - Add __pycache__ to .gitignore --- .gitignore | 2 + amqp-stubs/__init__.pyi | 12 +- amqp-stubs/exceptions.pyi | 6 + kombu-stubs/exceptions.pyi | 3 +- kombu-stubs/transport/base.pyi | 81 ++++++- kombu-stubs/transport/virtual/__init__.pyi | 38 +++ kombu-stubs/transport/virtual/base.pyi | 257 +++++++++++++++++++++ kombu-stubs/transport/virtual/exchange.pyi | 39 ++++ kombu-stubs/utils/json.pyi | 26 ++- kombu-stubs/utils/objects.pyi | 31 +++ kombu-stubs/utils/scheduling.pyi | 21 ++ 11 files changed, 496 insertions(+), 20 deletions(-) create mode 100644 kombu-stubs/transport/virtual/__init__.pyi create mode 100644 kombu-stubs/transport/virtual/base.pyi create mode 100644 kombu-stubs/transport/virtual/exchange.pyi create mode 100644 kombu-stubs/utils/objects.pyi create mode 100644 kombu-stubs/utils/scheduling.pyi diff --git a/.gitignore b/.gitignore index 9c58def..6ac1313 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ dist .idea node_modules .python-version +__pycache__ +*.pyc diff --git a/amqp-stubs/__init__.pyi b/amqp-stubs/__init__.pyi index 0d132ec..d66fa54 100644 --- a/amqp-stubs/__init__.pyi +++ b/amqp-stubs/__init__.pyi @@ -1,3 +1,11 @@ -from amqp.exceptions import ConnectionError +from amqp.exceptions import ( + ChannelError as ChannelError, +) +from amqp.exceptions import ( + ConnectionError as ConnectionError, +) +from amqp.exceptions import ( + ResourceError as ResourceError, +) -__all__ = ["ConnectionError"] +__all__ = ["ChannelError", "ConnectionError", "ResourceError"] diff --git a/amqp-stubs/exceptions.pyi b/amqp-stubs/exceptions.pyi index dba5899..0d25375 100644 --- a/amqp-stubs/exceptions.pyi +++ b/amqp-stubs/exceptions.pyi @@ -1,2 +1,8 @@ class AMQPError(Exception): ... class ConnectionError(AMQPError): ... +class ChannelError(AMQPError): ... +class RecoverableChannelError(ChannelError): ... +class IrrecoverableChannelError(ChannelError): ... +class RecoverableConnectionError(ConnectionError): ... +class IrrecoverableConnectionError(ConnectionError): ... +class ResourceError(RecoverableConnectionError): ... diff --git a/kombu-stubs/exceptions.pyi b/kombu-stubs/exceptions.pyi index e4e3e55..01102ce 100644 --- a/kombu-stubs/exceptions.pyi +++ b/kombu-stubs/exceptions.pyi @@ -1,4 +1,5 @@ -from amqp import ConnectionError +from amqp import ChannelError as ChannelError +from amqp import ConnectionError as ConnectionError class KombuError(Exception): ... class OperationalError(KombuError): ... diff --git a/kombu-stubs/transport/base.pyi b/kombu-stubs/transport/base.pyi index fc520ad..90e5bd4 100644 --- a/kombu-stubs/transport/base.pyi +++ b/kombu-stubs/transport/base.pyi @@ -1,11 +1,80 @@ -from typing import Any +import types +from typing import Any, Self from kombu.connection import Connection +from kombu.message import Message as Message +from kombu.messaging import Consumer, Producer +from kombu.utils.objects import cached_property -class Transport: ... +class Management: + transport: Transport + def __init__(self, transport: Transport) -> None: ... + def get_bindings(self) -> list[dict[str, Any]]: ... -class Channel: - def __init__(self, connection: Connection, **kwargs: Any) -> None: ... - def close(self) -> None: ... +class Transport: + client: Connection | None + can_parse_url: bool + default_port: int | None + connection_errors: tuple[type[BaseException], ...] + channel_errors: tuple[type[BaseException], ...] + driver_type: str + driver_name: str + recoverable_connection_errors: tuple[type[BaseException], ...] + recoverable_channel_errors: tuple[type[BaseException], ...] + implements: dict[str, Any] -StdChannel = Channel + def __init__(self, client: Connection, **kwargs: Any) -> None: ... + def establish_connection(self) -> Any: ... + def close_connection(self, connection: Any) -> None: ... + def create_channel(self, connection: Any) -> StdChannel: ... + def close_channel(self, connection: Any) -> None: ... + def drain_events(self, connection: Any, **kwargs: Any) -> None: ... + def heartbeat_check(self, connection: Any, rate: int = ...) -> None: ... + def driver_version(self) -> str: ... + def get_heartbeat_interval(self, connection: Any) -> int: ... + def verify_connection(self, connection: Any) -> bool: ... + def qos_semantics_matches_spec(self, connection: Any) -> bool: ... + def on_readable(self, connection: Any, loop: Any) -> None: ... + def as_uri( + self, + uri: str, + include_password: bool = ..., + mask: str = ..., + ) -> str: ... + def get_manager(self, *args: Any, **kwargs: Any) -> Management: ... + def register_with_event_loop( + self, connection: Any, loop: Any + ) -> None: ... + def unregister_from_event_loop( + self, connection: Any, loop: Any + ) -> None: ... + @property + def default_connection_params(self) -> dict[str, Any]: ... + @cached_property + def manager(self) -> Management: ... + @property + def supports_heartbeats(self) -> bool: ... + @property + def supports_ev(self) -> bool: ... + +class StdChannel: + no_ack_consumers: set[str] | None + + def Consumer(self, *args: Any, **kwargs: Any) -> Consumer: ... + def Producer(self, *args: Any, **kwargs: Any) -> Producer: ... + def get_bindings(self) -> list[dict[str, Any]]: ... + def after_reply_message_received(self, queue: str) -> None: ... + def prepare_queue_arguments( + self, arguments: dict[str, Any] | None, **kwargs: Any + ) -> dict[str, Any] | None: ... + def __enter__(self) -> Self: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: types.TracebackType | None, + ) -> None: ... + +# Alias for backwards compatibility - in reality, Channel doesn't exist at runtime +# but is commonly used in type annotations +Channel = StdChannel diff --git a/kombu-stubs/transport/virtual/__init__.pyi b/kombu-stubs/transport/virtual/__init__.pyi new file mode 100644 index 0000000..229cc76 --- /dev/null +++ b/kombu-stubs/transport/virtual/__init__.pyi @@ -0,0 +1,38 @@ +from queue import Empty as Empty + +from kombu.transport.virtual.base import ( + AbstractChannel as AbstractChannel, +) +from kombu.transport.virtual.base import ( + Base64 as Base64, +) +from kombu.transport.virtual.base import ( + BrokerState as BrokerState, +) +from kombu.transport.virtual.base import ( + Channel as Channel, +) +from kombu.transport.virtual.base import ( + Management as Management, +) +from kombu.transport.virtual.base import ( + Message as Message, +) +from kombu.transport.virtual.base import ( + NotEquivalentError as NotEquivalentError, +) +from kombu.transport.virtual.base import ( + QoS as QoS, +) +from kombu.transport.virtual.base import ( + Transport as Transport, +) +from kombu.transport.virtual.base import ( + UndeliverableWarning as UndeliverableWarning, +) +from kombu.transport.virtual.base import ( + binding_key_t as binding_key_t, +) +from kombu.transport.virtual.base import ( + queue_binding_t as queue_binding_t, +) diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi new file mode 100644 index 0000000..a2422ea --- /dev/null +++ b/kombu-stubs/transport/virtual/base.pyi @@ -0,0 +1,257 @@ +import types +from collections import OrderedDict +from collections.abc import Callable, Generator, Iterable +from typing import Any, NamedTuple, Self + +from kombu.connection import Connection +from kombu.message import Message as BaseMessage +from kombu.transport.base import Management as BaseManagement +from kombu.transport.base import StdChannel +from kombu.transport.base import Transport as BaseTransport +from kombu.transport.virtual.exchange import ExchangeType +from kombu.utils.scheduling import FairCycle + +class binding_key_t(NamedTuple): + queue: str + exchange: str + routing_key: str + +class queue_binding_t(NamedTuple): + exchange: str + routing_key: str + arguments: dict[str, Any] | None + +class Base64: + def encode(self, s: str | bytes) -> str: ... + def decode(self, s: str) -> bytes: ... + +class NotEquivalentError(Exception): ... + +class UndeliverableWarning(UserWarning): ... + +class BrokerState: + exchanges: dict[str, dict[str, Any]] + bindings: dict[binding_key_t, queue_binding_t] + queue_index: dict[str, set[binding_key_t]] + + def __init__( + self, exchanges: dict[str, dict[str, Any]] | None = ... + ) -> None: ... + def clear(self) -> None: ... + def has_binding( + self, queue: str, exchange: str, routing_key: str + ) -> bool: ... + def binding_declare( + self, + queue: str, + exchange: str, + routing_key: str, + arguments: dict[str, Any] | None, + ) -> None: ... + def binding_delete( + self, queue: str, exchange: str, routing_key: str + ) -> None: ... + def queue_bindings_delete(self, queue: str) -> None: ... + def queue_bindings(self, queue: str) -> Generator[queue_binding_t, None, None]: ... + +class QoS: + channel: AbstractChannel + prefetch_count: int + restore_at_shutdown: bool + + _delivered: OrderedDict[int, Any] + _dirty: set[int] + + def __init__( + self, channel: AbstractChannel, prefetch_count: int = ... + ) -> None: ... + def can_consume(self) -> bool: ... + def can_consume_max_estimate(self) -> int: ... + def append(self, message: Any, delivery_tag: int) -> None: ... + def get(self, delivery_tag: int) -> Any: ... + def ack(self, delivery_tag: int) -> None: ... + def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def restore_unacked(self) -> None: ... + def restore_unacked_once(self, stderr: Any | None = ...) -> None: ... + def restore_visible( + self, *args: Any, **kwargs: Any + ) -> None: ... + +class Message(BaseMessage): + def __init__( + self, + payload: dict[str, Any], + channel: AbstractChannel | None = ..., + **kwargs: Any, + ) -> None: ... + def serializable(self) -> dict[str, Any]: ... + +class AbstractChannel(StdChannel): + do_restore: bool + exchange_types: dict[str, type[ExchangeType]] + supports_fanout: bool + + codecs: dict[str, Base64] + body_encoding: str + + default_priority: int + min_priority: int + max_priority: int + deadletter_queue: str | None + + _delivery_tags: Iterable[int] + _consumers: dict[str, Any] + _cycle: FairCycle | None + _qos: QoS | None + _tag_to_queue: dict[str, str] + + def __init__(self, connection: Connection, **kwargs: Any) -> None: ... + def exchange_declare( + self, + exchange: str | None = ..., + type: str = ..., + durable: bool = ..., + auto_delete: bool = ..., + arguments: dict[str, Any] | None = ..., + nowait: bool = ..., + passive: bool = ..., + ) -> None: ... + def exchange_delete( + self, + exchange: str, + if_unused: bool = ..., + nowait: bool = ..., + ) -> None: ... + def queue_declare( + self, + queue: str | None = ..., + passive: bool = ..., + **kwargs: Any, + ) -> Any: ... + def queue_delete( + self, + queue: str, + if_unused: bool = ..., + if_empty: bool = ..., + **kwargs: Any, + ) -> int | None: ... + def queue_bind( + self, + queue: str, + exchange: str | None = ..., + routing_key: str = ..., + arguments: dict[str, Any] | None = ..., + **kwargs: Any, + ) -> None: ... + def queue_unbind( + self, + queue: str, + exchange: str | None = ..., + routing_key: str = ..., + arguments: dict[str, Any] | None = ..., + **kwargs: Any, + ) -> None: ... + def queue_purge(self, queue: str, **kwargs: Any) -> int | None: ... + def basic_publish( + self, + message: Any, + exchange: str = ..., + routing_key: str = ..., + **kwargs: Any, + ) -> None: ... + def basic_consume( + self, + queue: str, + no_ack: bool = ..., + callback: Callable[..., Any] | None = ..., + consumer_tag: str | None = ..., + **kwargs: Any, + ) -> str: ... + def basic_cancel(self, consumer_tag: str) -> None: ... + def basic_get( + self, + queue: str, + no_ack: bool = ..., + **kwargs: Any, + ) -> Message | None: ... + def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... + def basic_qos( + self, + prefetch_size: int = ..., + prefetch_count: int = ..., + apply_global: bool = ..., + ) -> None: ... + def basic_recover(self, requeue: bool = ...) -> None: ... + def basic_reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def close(self) -> None: ... + def encode_body( + self, body: bytes, encoding: str | None = ... + ) -> tuple[Any, str]: ... + def decode_body( + self, body: Any, encoding: str | None = ... + ) -> bytes: ... + def drain_events( + self, timeout: float | None = ..., callback: Callable[..., Any] | None = ... + ) -> None: ... + def get_exchanges(self) -> list[str]: ... + def get_table(self, exchange: str) -> list[tuple[str, str, str]]: ... + def typeof( + self, exchange: str, default: str = ... + ) -> ExchangeType: ... + def list_bindings(self) -> Generator[tuple[str, str, str], None, None]: ... + def message_to_python(self, raw_message: Any) -> Message: ... + def prepare_message( + self, + body: Any, + priority: int | None = ..., + content_type: str | None = ..., + content_encoding: str | None = ..., + headers: dict[str, Any] | None = ..., + properties: dict[str, Any] | None = ..., + ) -> dict[str, Any]: ... + def flow(self, active: bool) -> None: ... + def __enter__(self) -> Self: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: types.TracebackType | None, + ) -> None: ... + @property + def state(self) -> BrokerState: ... + @property + def qos(self) -> QoS: ... + @property + def cycle(self) -> FairCycle: ... + +Channel = AbstractChannel + +class Management(BaseManagement): + transport: Transport + channel: AbstractChannel | None + + def __init__(self, transport: Transport) -> None: ... + def get_bindings(self) -> list[dict[str, Any]]: ... + def close(self) -> None: ... + +class Transport(BaseTransport): + polling_interval: float + channel_max: int + channels: list[AbstractChannel] + cycle: FairCycle | None + + _callbacks: dict[str, Callable[..., Any]] + + def __init__(self, client: Connection, **kwargs: Any) -> None: ... + def create_channel(self, connection: Connection) -> AbstractChannel: ... + def close_channel(self, channel: StdChannel) -> None: ... + def establish_connection(self) -> Connection: ... + def close_connection(self, connection: Connection) -> None: ... + def drain_events( + self, connection: Connection, timeout: float | None = ..., **kwargs: Any + ) -> None: ... + def on_message_ready( + self, channel: AbstractChannel, message: Message, queue: str + ) -> None: ... + @property + def default_connection_params(self) -> dict[str, Any]: ... diff --git a/kombu-stubs/transport/virtual/exchange.pyi b/kombu-stubs/transport/virtual/exchange.pyi new file mode 100644 index 0000000..3e3b009 --- /dev/null +++ b/kombu-stubs/transport/virtual/exchange.pyi @@ -0,0 +1,39 @@ +from collections.abc import Iterable +from typing import Any + +class ExchangeType: + type: str + + def __init__(self, channel: Any) -> None: ... + def lookup( + self, + table: list[tuple[str, str, str]], + exchange: str, + routing_key: str, + default: str | None, + ) -> Iterable[str]: ... + def prepare_bind( + self, + queue: str, + exchange: str, + routing_key: str, + arguments: dict[str, Any] | None, + ) -> tuple[str, str, str, dict[str, Any] | None]: ... + def deliver( + self, + message: Any, + exchange: str, + routing_key: str, + **kwargs: Any, + ) -> None: ... + +class DirectExchange(ExchangeType): + type: str + +class TopicExchange(ExchangeType): + type: str + + def key_to_pattern(self, routing_key: str) -> Any: ... + +class FanoutExchange(ExchangeType): + type: str diff --git a/kombu-stubs/utils/json.pyi b/kombu-stubs/utils/json.pyi index a2edf5e..beb0bee 100644 --- a/kombu-stubs/utils/json.pyi +++ b/kombu-stubs/utils/json.pyi @@ -2,23 +2,27 @@ import json from collections.abc import Callable from typing import Any, TypeAlias, TypeVar -textual_types: tuple[Any] +# These TypeVars are exported by the runtime module, so they must be public +T = TypeVar("T") # noqa: PYI001 +EncodedT = TypeVar("EncodedT") # noqa: PYI001 + +textual_types: tuple[()] class JSONEncoder(json.JSONEncoder): ... def dumps( - s: str, - _dumps: Callable[..., str], - cls: JSONEncoder, - default_kwargs: dict[str, Any], + s: Any, + _dumps: Callable[..., str] = ..., + cls: type[json.JSONEncoder] = ..., + default_kwargs: dict[str, Any] | None = ..., **kwargs: Any, ) -> str: ... -def object_hook(o: dict[Any, Any]) -> None: ... +def object_hook(o: dict[Any, Any]) -> Any: ... def loads( - s: str, - _loads: Callable[[str], Any], - decode_bytes: bool, - object_hook: Callable[[dict[Any, Any]], None], + s: str | bytes | bytearray | memoryview, + _loads: Callable[[str], Any] = ..., + decode_bytes: bool = ..., + object_hook: Callable[[dict[Any, Any]], Any] | None = ..., ) -> Any: ... EncoderT: TypeAlias = Callable[[Any], Any] @@ -31,5 +35,5 @@ def register_type( t: type[_T], marker: str | None, encoder: Callable[[_T], _EncodedT], - decoder: Callable[[_EncodedT], _T], + decoder: Callable[[_EncodedT], _T] = ..., ) -> None: ... diff --git a/kombu-stubs/utils/objects.pyi b/kombu-stubs/utils/objects.pyi new file mode 100644 index 0000000..18c8062 --- /dev/null +++ b/kombu-stubs/utils/objects.pyi @@ -0,0 +1,31 @@ +from collections.abc import Callable +from typing import Any, Generic, TypeVar, overload + +_T = TypeVar("_T") +_S = TypeVar("_S") + +class cached_property(Generic[_T]): + fget: Callable[[Any], _T] | None + fset: Callable[[Any, _T], None] | None + fdel: Callable[[Any], None] | None + attrname: str | None + + def __init__( + self, + fget: Callable[[Any], _T] | None = ..., + fset: Callable[[Any, _T], None] | None = ..., + fdel: Callable[[Any], None] | None = ..., + ) -> None: ... + @overload + def __get__(self, instance: None, owner: type[Any]) -> cached_property[_T]: ... + @overload + def __get__(self, instance: _S, owner: type[_S]) -> _T: ... + def __set__(self, instance: Any, value: _T) -> None: ... + def __delete__(self, instance: Any) -> None: ... + def setter( + self, fset: Callable[[Any, _T], None] + ) -> cached_property[_T]: ... + def deleter( + self, fdel: Callable[[Any], None] + ) -> cached_property[_T]: ... + diff --git a/kombu-stubs/utils/scheduling.pyi b/kombu-stubs/utils/scheduling.pyi new file mode 100644 index 0000000..62061c7 --- /dev/null +++ b/kombu-stubs/utils/scheduling.pyi @@ -0,0 +1,21 @@ +from collections.abc import Callable, Sequence +from typing import Any, TypeVar + +_T = TypeVar("_T") + +class FairCycle: + fun: Callable[..., Any] + resources: Sequence[Any] + predicate: type[BaseException] + pos: int + + def __init__( + self, + fun: Callable[..., Any], + resources: Sequence[Any], + predicate: type[BaseException] = ..., + ) -> None: ... + def get( + self, callback: Callable[..., _T], **kwargs: Any + ) -> _T: ... + def close(self) -> None: ... From 094379c605e7ab4ca0d86a9a8a5360dc827f0d77 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 1 Jan 2026 13:06:22 +0100 Subject: [PATCH 02/24] Fix stubtest errors across kombu stubs - Add __all__ exports to all modules - Replace Channel alias with StdChannel throughout - Expand Connection, Producer, Consumer with full signatures - Add ConnectionPool, ChannelPool, Resource classes - Fix parameter defaults and types to match runtime - Add missing attributes and methods across all modules - Create simple.pyi for SimpleQueue/SimpleBuffer - Use TypeAlias for forward references to avoid class attribute collisions --- kombu-stubs/connection.pyi | 193 +++++++++++++++++++-- kombu-stubs/entity.pyi | 6 +- kombu-stubs/message.pyi | 7 +- kombu-stubs/messaging.pyi | 91 +++++++++- kombu-stubs/mixins.pyi | 16 +- kombu-stubs/simple.pyi | 76 ++++++++ kombu-stubs/transport/base.pyi | 17 +- kombu-stubs/transport/virtual/__init__.pyi | 16 ++ kombu-stubs/transport/virtual/base.pyi | 107 +++++++++--- kombu-stubs/transport/virtual/exchange.pyi | 38 +++- kombu-stubs/utils/objects.pyi | 6 +- kombu-stubs/utils/scheduling.pyi | 19 +- 12 files changed, 514 insertions(+), 78 deletions(-) create mode 100644 kombu-stubs/simple.pyi diff --git a/kombu-stubs/connection.pyi b/kombu-stubs/connection.pyi index d72ff36..38b3870 100644 --- a/kombu-stubs/connection.pyi +++ b/kombu-stubs/connection.pyi @@ -1,11 +1,57 @@ -from collections.abc import Callable +from collections.abc import Callable, Generator, Iterable, Iterator from types import TracebackType -from typing import Any +from typing import Any, TypeVar -from kombu.transport.base import Channel, Transport +from kombu.messaging import Consumer, Producer +from kombu.simple import SimpleBuffer, SimpleQueue +from kombu.transport.base import Management, StdChannel, Transport +from kombu.utils.objects import cached_property from typing_extensions import Self +__all__ = ("Connection", "ConnectionPool", "ChannelPool") + +_T = TypeVar("_T") + +class Resource: + LimitExceeded: type[Exception] + close_after_fork: bool + limit: int | None + preload: int | None + + def __init__(self, limit: int | None = ..., preload: int | None = ..., close_after_fork: bool | None = ...) -> None: ... + def setup(self) -> None: ... + def acquire(self, block: bool = ..., timeout: float | None = ...) -> Any: ... + def prepare(self, resource: Any) -> Any: ... + def close_resource(self, resource: Any) -> None: ... + def release_resource(self, resource: Any) -> None: ... + def release(self, resource: Any) -> None: ... + def collect_resource(self, resource: Any) -> None: ... + def replace(self, resource: Any) -> None: ... + def force_close_all(self, close_pool: bool = ...) -> None: ... + def resize(self, limit: int, force: bool = ..., ignore_errors: bool = ..., reset: bool = ...) -> None: ... + class Connection: + port: int | None + virtual_host: str + connect_timeout: float + uri_prefix: str | None + declared_entities: set[Any] | None + cycle: Iterator[str] | None + transport_options: dict[str, Any] | None + failover_strategy: str | Callable[[Iterable[str]], Iterator[str]] + heartbeat: float | None + resolve_aliases: dict[str, str] + failover_strategies: dict[str, Callable[[Iterable[str]], Iterator[str]]] + hostname: str | None + userid: str | None + password: str | None + ssl: bool | dict[str, Any] | None + login_method: str | None + alt: list[str] + insist: bool + transport_cls: str + credential_provider: Any | None + def __init__( self, hostname: str = ..., @@ -14,16 +60,28 @@ class Connection: virtual_host: str | None = ..., port: int | None = ..., insist: bool = ..., - ssl: bool = ..., - transport: Transport | None = ..., + ssl: bool | dict[str, Any] = ..., + transport: str | type[Transport] | None = ..., connect_timeout: float = ..., transport_options: dict[str, Any] | None = ..., login_method: str | None = ..., uri_prefix: str | None = ..., heartbeat: float = ..., - failover_strategy: str = ..., - alternates: list[Any] | None = ..., + failover_strategy: str | Callable[[Iterable[str]], Iterator[str]] = ..., + alternates: list[str] | None = ..., + credential_provider: Any | None = ..., + **kwargs: Any, ) -> None: ... + def switch(self, conn_str: str) -> None: ... + def maybe_switch_next(self) -> None: ... + def register_with_event_loop(self, loop: Any) -> None: ... + def connect(self) -> Self: ... + def channel(self) -> StdChannel: ... + def drain_events(self, **kwargs: Any) -> None: ... + def maybe_close_channel(self, channel: StdChannel | None) -> None: ... + def collect(self, socket_timeout: float | None = ...) -> None: ... + def release(self) -> None: ... + close = release def ensure_connection( self, errback: Callable[[Exception, float], None] | None = ..., @@ -34,21 +92,81 @@ class Connection: callback: Callable[[], None] | None = ..., reraise_as_library_errors: bool = ..., timeout: int | None = ..., - ) -> Connection: ... + ) -> Self: ... def _ensure_connection( self, errback: Callable[[Exception, float], None] | None = ..., - max_retries: int = ..., + max_retries: int | None = ..., interval_start: int = ..., interval_step: int = ..., interval_max: int = ..., callback: Callable[[], None] | None = ..., reraise_as_library_errors: bool = ..., timeout: int | None = ..., - ) -> Connection: ... - def connect(self) -> Connection: ... - def channel(self) -> Channel: ... - def release(self) -> None: ... + ) -> Self: ... + def autoretry( + self, fun: Callable[..., _T], channel: StdChannel | None = ..., **ensure_options: Any + ) -> _T: ... + def ensure( + self, + obj: Any, + fun: Callable[..., _T], + errback: Callable[[Exception, float], None] | None = ..., + max_retries: int | None = ..., + interval_start: int = ..., + interval_step: int = ..., + interval_max: int = ..., + on_revive: Callable[[StdChannel], None] | None = ..., + retry_errors: tuple[type[BaseException], ...] | None = ..., + ) -> Callable[..., _T]: ... + def revive(self, new_channel: StdChannel) -> None: ... + def completes_cycle(self, retries: int) -> bool: ... + def create_transport(self) -> Transport: ... + def get_transport_cls(self) -> type[Transport]: ... + def clone(self, **kwargs: Any) -> Connection: ... + def get_heartbeat_interval(self) -> int: ... + def heartbeat_check(self, rate: int = ...) -> None: ... + def get_manager(self, *args: Any, **kwargs: Any) -> Management: ... + def info(self) -> dict[str, Any]: ... + def as_uri( + self, + include_password: bool = ..., + mask: str = ..., + getfields: Callable[..., Any] | None = ..., + ) -> str: ... + def Pool(self, limit: int | None = ..., **kwargs: Any) -> ConnectionPool: ... + def ChannelPool(self, limit: int | None = ..., **kwargs: Any) -> ChannelPool: ... + def Producer(self, channel: StdChannel | None = ..., *args: Any, **kwargs: Any) -> Producer: ... + def Consumer( + self, + queues: Any | None = ..., + channel: StdChannel | None = ..., + *args: Any, + **kwargs: Any, + ) -> Consumer: ... + def SimpleQueue( + self, + name: str, + no_ack: bool | None = ..., + queue_opts: dict[str, Any] | None = ..., + queue_args: dict[str, Any] | None = ..., + exchange_opts: dict[str, Any] | None = ..., + channel: StdChannel | None = ..., + **kwargs: Any, + ) -> SimpleQueue: ... + def SimpleBuffer( + self, + name: str, + no_ack: bool | None = ..., + queue_opts: dict[str, Any] | None = ..., + queue_args: dict[str, Any] | None = ..., + exchange_opts: dict[str, Any] | None = ..., + channel: StdChannel | None = ..., + **kwargs: Any, + ) -> SimpleBuffer: ... + def supports_exchange_type(self, exchange_type: str) -> bool: ... + def __copy__(self) -> Connection: ... + def __eqhash__(self) -> tuple[str, ...]: ... def __enter__(self) -> Self: ... def __exit__( self, @@ -56,4 +174,51 @@ class Connection: exc_val: BaseException | None, exc_tb: TracebackType | None, ) -> None: ... - close = release + @property + def connected(self) -> bool: ... + @property + def connection(self) -> Any: ... + @cached_property + def connection_errors(self) -> tuple[type[BaseException], ...]: ... + @cached_property + def channel_errors(self) -> tuple[type[BaseException], ...]: ... + @cached_property + def recoverable_connection_errors(self) -> tuple[type[BaseException], ...]: ... + @cached_property + def recoverable_channel_errors(self) -> tuple[type[BaseException], ...]: ... + @property + def transport(self) -> Transport: ... + @property + def default_channel(self) -> StdChannel: ... + @property + def host(self) -> str: ... + @cached_property + def manager(self) -> Management: ... + @property + def supports_heartbeats(self) -> bool: ... + @property + def is_evented(self) -> bool: ... + @property + def qos_semantics_matches_spec(self) -> bool: ... + +class ConnectionPool(Resource): + LimitExceeded: type[Exception] + connection: Connection + + def __init__(self, connection: Connection, limit: int | None = ..., **kwargs: Any) -> None: ... + def new(self) -> Connection: ... + def prepare(self, resource: Connection) -> Connection: ... + def release_resource(self, resource: Connection) -> None: ... + def close_resource(self, resource: Connection) -> None: ... + def collect_resource(self, resource: Connection, socket_timeout: float | None = ...) -> None: ... + def acquire_channel(self, block: bool = ...) -> Generator[StdChannel, None, None]: ... + +class ChannelPool(Resource): + LimitExceeded: type[Exception] + connection: Connection + + def __init__(self, connection: Connection, limit: int | None = ..., **kwargs: Any) -> None: ... + def new(self) -> StdChannel: ... + def prepare(self, channel: StdChannel) -> StdChannel: ... + def release_resource(self, resource: StdChannel) -> None: ... + def close_resource(self, resource: StdChannel) -> None: ... diff --git a/kombu-stubs/entity.pyi b/kombu-stubs/entity.pyi index 51cc9d1..41f660a 100644 --- a/kombu-stubs/entity.pyi +++ b/kombu-stubs/entity.pyi @@ -1,14 +1,14 @@ from typing import Any from kombu.abstract import MaybeChannelBound -from kombu.transport.base import Channel +from kombu.transport.base import StdChannel class Exchange(MaybeChannelBound): def __init__( self, name: str = ..., type: str = ..., - channel: Channel | None = ..., + channel: StdChannel | None = ..., **kwargs: Any, ) -> None: ... @@ -21,7 +21,7 @@ class Queue(MaybeChannelBound): name: str = ..., exchange: Exchange | str | None = ..., routing_key: str = ..., - channel: Channel | None = ..., + channel: StdChannel | None = ..., bindings: Any = ..., on_declared: Any = ..., **kwargs: Any, diff --git a/kombu-stubs/message.pyi b/kombu-stubs/message.pyi index 9598888..88f7b9b 100644 --- a/kombu-stubs/message.pyi +++ b/kombu-stubs/message.pyi @@ -1,9 +1,14 @@ from typing import Any +from kombu.exceptions import MessageStateError + +__all__ = ("Message",) + ACK_STATES: set[str] class Message: - errors: list[Any] + MessageStateError: type[MessageStateError] + errors: list[Any] | None body: str | None content_encoding: str | None headers: dict[str, str] diff --git a/kombu-stubs/messaging.pyi b/kombu-stubs/messaging.pyi index 2b55373..e18a6c7 100644 --- a/kombu-stubs/messaging.pyi +++ b/kombu-stubs/messaging.pyi @@ -1,16 +1,31 @@ from collections.abc import Callable, Sequence from enum import Enum +from types import TracebackType from typing import Any from kombu.connection import Connection from kombu.entity import Exchange, Queue from kombu.message import Message -from kombu.transport.base import Channel +from kombu.transport.base import StdChannel +from typing_extensions import Self + +from kombu.entity import Exchange as Exchange +from kombu.entity import Queue as Queue + +__all__ = ("Exchange", "Queue", "Producer", "Consumer") class Producer: + channel: Connection | StdChannel | None + exchange: Exchange | None + routing_key: str + serializer: str | None + compression: str | None + auto_declare: bool + on_return: Callable[[Exception, Exchange | str, str, Message], None] | None + def __init__( self, - channel: Connection | Channel, + channel: Connection | StdChannel, exchange: Exchange | str | None = ..., routing_key: str | None = ..., serializer: str | None = ..., @@ -20,11 +35,15 @@ class Producer: Callable[[Exception, Exchange | str, str, Message], None] | None ) = ..., ) -> None: ... + def declare(self) -> None: ... + def maybe_declare( + self, entity: Exchange | Queue, retry: bool = ..., **retry_policy: Any + ) -> bool: ... def publish( self, body: Any, routing_key: str | None = ..., - delivery_mode: Enum | None = ..., + delivery_mode: Enum | int | None = ..., mandatory: bool = ..., immediate: bool = ..., priority: int = ..., @@ -36,20 +55,46 @@ class Producer: exchange: Exchange | str | None = ..., retry: bool = ..., retry_policy: dict[Any, Any] | None = ..., - declare: Sequence[Exchange | Queue] = ..., + declare: Sequence[Exchange | Queue] | None = ..., expiration: float | None = ..., timeout: float | None = ..., + confirm_timeout: float | None = ..., **properties: Any, ) -> None: ... + def revive(self, channel: StdChannel) -> None: ... + def close(self) -> None: ... + def release(self) -> None: ... + def __enter__(self) -> Self: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... + def __reduce_args__(self) -> tuple[Any, ...]: ... + @property + def __connection__(self) -> Connection | None: ... + @property + def connection(self) -> Connection | None: ... class Consumer: - channel: Connection | Channel - queues: Sequence[Queue] - accept: Sequence[str] | None + ContentDisallowed: type[Exception] + + channel: Connection | StdChannel | None + queues: list[Queue] + accept: set[str] | None + no_ack: bool | None + auto_declare: bool + callbacks: list[Callable[[Any, Message], None]] | None + on_decode_error: Callable[[Message, Exception], None] | None + on_message: Callable[[Message], None] | None + prefetch_count: int | None + tag_prefix: str + def __init__( self, - channel: Connection | Channel, - queues: Sequence[Queue] | None = ..., + channel: Connection | StdChannel, + queues: Sequence[Queue] | Queue | None = ..., no_ack: bool | None = ..., auto_declare: bool | None = ..., callbacks: Sequence[Callable[[Any, Message], None]] | None = ..., @@ -59,3 +104,31 @@ class Consumer: prefetch_count: int | None = ..., tag_prefix: str | None = ..., ) -> None: ... + def declare(self) -> None: ... + def register_callback(self, callback: Callable[[Any, Message], None]) -> None: ... + def add_queue(self, queue: Queue) -> Self: ... + def consume(self, no_ack: bool | None = ...) -> None: ... + def cancel(self) -> None: ... + close = cancel + def cancel_by_queue(self, queue: str | Queue) -> None: ... + def consuming_from(self, queue: str | Queue) -> bool: ... + def purge(self) -> int: ... + def flow(self, active: bool) -> None: ... + def qos( + self, + prefetch_size: int = ..., + prefetch_count: int = ..., + apply_global: bool = ..., + ) -> None: ... + def recover(self, requeue: bool = ...) -> None: ... + def receive(self, body: Any, message: Message) -> None: ... + def revive(self, channel: StdChannel) -> None: ... + def __enter__(self) -> Self: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... + @property + def connection(self) -> Connection | None: ... diff --git a/kombu-stubs/mixins.pyi b/kombu-stubs/mixins.pyi index 58a4108..1cdf81c 100644 --- a/kombu-stubs/mixins.pyi +++ b/kombu-stubs/mixins.pyi @@ -5,7 +5,7 @@ from kombu.connection import Connection from kombu.message import Message from kombu.messaging import Consumer as MessagingConsumer from kombu.messaging import Producer -from kombu.transport.base import Channel +from kombu.transport.base import StdChannel from kombu.utils.limits import TokenBucket from typing_extensions import override @@ -13,25 +13,25 @@ class ConsumerMixin: connect_max_retries: int | None should_stop: bool def get_consumers( - self, Consumer: Callable[..., MessagingConsumer], channel: Channel + self, Consumer: Callable[..., MessagingConsumer], channel: StdChannel ) -> Sequence[MessagingConsumer]: ... def on_connection_revived(self) -> None: ... def on_consume_ready( self, connection: Connection, - channel: Channel, + channel: StdChannel, consumers: Sequence[MessagingConsumer], **kwargs: Any, ) -> None: ... - def on_consume_end(self, connection: Connection, channel: Channel) -> None: ... + def on_consume_end(self, connection: Connection, channel: StdChannel) -> None: ... def on_iteration(self) -> None: ... def on_decode_error(self, message: Message, exc: Exception) -> None: ... def on_connection_error(self, exc: Exception, interval: int) -> None: ... - def extra_context(self, connection: Connection, channel: Channel) -> None: ... + def extra_context(self, connection: Connection, channel: StdChannel) -> None: ... def run(self, _tokens: int = ..., **kwargs: Any) -> None: ... def consumer_context( self, **kwargs: Any - ) -> tuple[Connection, Channel, Sequence[MessagingConsumer]]: ... + ) -> tuple[Connection, StdChannel, Sequence[MessagingConsumer]]: ... def consume( self, limit: int | None = ..., @@ -42,7 +42,7 @@ class ConsumerMixin: def maybe_conn_error(self, fun: Callable[..., Any] | None) -> Any: ... def create_connection(self) -> Connection: ... def establish_connection(self) -> Connection: ... - def Consumer(self) -> tuple[Connection, Channel, Sequence[MessagingConsumer]]: ... + def Consumer(self) -> tuple[Connection, StdChannel, Sequence[MessagingConsumer]]: ... @property def restart_limit(self) -> TokenBucket: ... @property @@ -52,7 +52,7 @@ class ConsumerMixin: class ConsumerProducerMixin(ConsumerMixin): @override - def on_consume_end(self, connection: Connection, channel: Channel) -> None: ... + def on_consume_end(self, connection: Connection, channel: StdChannel) -> None: ... @property def producer(self) -> Producer: ... @property diff --git a/kombu-stubs/simple.pyi b/kombu-stubs/simple.pyi new file mode 100644 index 0000000..844136f --- /dev/null +++ b/kombu-stubs/simple.pyi @@ -0,0 +1,76 @@ +from queue import Empty as Empty +from types import TracebackType +from typing import Any + +from kombu.entity import Exchange, Queue +from kombu.message import Message +from kombu.messaging import Consumer, Producer +from kombu.transport.base import StdChannel +from typing_extensions import Self + +__all__ = ("SimpleQueue", "SimpleBuffer") + +class SimpleBase: + Empty: type[Empty] + + channel: StdChannel + producer: Producer + consumer: Consumer + queue: Queue + exchange: Exchange + no_ack: bool + + def __init__( + self, + channel: StdChannel, + producer: Producer, + consumer: Consumer, + no_ack: bool = ..., + ) -> None: ... + def get(self, block: bool = ..., timeout: float | None = ...) -> Message: ... + def get_nowait(self) -> Message: ... + def put( + self, + message: Any, + serializer: str | None = ..., + headers: dict[str, Any] | None = ..., + compression: str | None = ..., + routing_key: str | None = ..., + **kwargs: Any, + ) -> None: ... + def clear(self) -> int: ... + def qsize(self) -> int: ... + def close(self) -> None: ... + def __enter__(self) -> Self: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... + def __len__(self) -> int: ... + def __bool__(self) -> bool: ... + @property + def __name__(self) -> str: ... + +class SimpleQueue(SimpleBase): + queue_opts: dict[str, Any] + queue_args: dict[str, Any] + exchange_opts: dict[str, Any] + + def __init__( + self, + channel: StdChannel, + name: str, + no_ack: bool | None = ..., + queue_opts: dict[str, Any] | None = ..., + queue_args: dict[str, Any] | None = ..., + exchange_opts: dict[str, Any] | None = ..., + serializer: str | None = ..., + compression: str | None = ..., + accept: list[str] | None = ..., + ) -> None: ... + +class SimpleBuffer(SimpleQueue): + queue_opts: dict[str, Any] + exchange_opts: dict[str, Any] diff --git a/kombu-stubs/transport/base.pyi b/kombu-stubs/transport/base.pyi index 90e5bd4..5e337a7 100644 --- a/kombu-stubs/transport/base.pyi +++ b/kombu-stubs/transport/base.pyi @@ -1,17 +1,24 @@ import types -from typing import Any, Self +from typing import Any, Self, TypeAlias from kombu.connection import Connection from kombu.message import Message as Message from kombu.messaging import Consumer, Producer from kombu.utils.objects import cached_property +__all__ = ("Message", "StdChannel", "Management", "Transport") + +# Forward reference for Management to avoid name collision with Transport.Management +_ManagementType: TypeAlias = "Management" + class Management: transport: Transport def __init__(self, transport: Transport) -> None: ... def get_bindings(self) -> list[dict[str, Any]]: ... class Transport: + Management: type[Management] + client: Connection | None can_parse_url: bool default_port: int | None @@ -41,7 +48,7 @@ class Transport: include_password: bool = ..., mask: str = ..., ) -> str: ... - def get_manager(self, *args: Any, **kwargs: Any) -> Management: ... + def get_manager(self, *args: Any, **kwargs: Any) -> _ManagementType: ... def register_with_event_loop( self, connection: Any, loop: Any ) -> None: ... @@ -51,7 +58,7 @@ class Transport: @property def default_connection_params(self) -> dict[str, Any]: ... @cached_property - def manager(self) -> Management: ... + def manager(self) -> _ManagementType: ... @property def supports_heartbeats(self) -> bool: ... @property @@ -74,7 +81,3 @@ class StdChannel: exc_val: BaseException | None, exc_tb: types.TracebackType | None, ) -> None: ... - -# Alias for backwards compatibility - in reality, Channel doesn't exist at runtime -# but is commonly used in type annotations -Channel = StdChannel diff --git a/kombu-stubs/transport/virtual/__init__.pyi b/kombu-stubs/transport/virtual/__init__.pyi index 229cc76..c937e99 100644 --- a/kombu-stubs/transport/virtual/__init__.pyi +++ b/kombu-stubs/transport/virtual/__init__.pyi @@ -1,5 +1,21 @@ from queue import Empty as Empty +__all__ = ( + "Base64", + "NotEquivalentError", + "UndeliverableWarning", + "BrokerState", + "QoS", + "Message", + "AbstractChannel", + "Channel", + "Management", + "Transport", + "Empty", + "binding_key_t", + "queue_binding_t", +) + from kombu.transport.virtual.base import ( AbstractChannel as AbstractChannel, ) diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi index a2422ea..4b7f735 100644 --- a/kombu-stubs/transport/virtual/base.pyi +++ b/kombu-stubs/transport/virtual/base.pyi @@ -1,7 +1,8 @@ +import logging import types from collections import OrderedDict from collections.abc import Callable, Generator, Iterable -from typing import Any, NamedTuple, Self +from typing import Any, NamedTuple, Self, TypeAlias from kombu.connection import Connection from kombu.message import Message as BaseMessage @@ -11,6 +12,20 @@ from kombu.transport.base import Transport as BaseTransport from kombu.transport.virtual.exchange import ExchangeType from kombu.utils.scheduling import FairCycle +ARRAY_TYPE_H: str +NOT_EQUIVALENT_FMT: str +RESTORE_PANIC_FMT: str +RESTORING_FMT: str +UNDELIVERABLE_FMT: str +W_NO_CONSUMERS: str + +logger: logging.Logger + +# Forward references for type annotations to avoid name collisions with class attributes +_QoSType: TypeAlias = "QoS" +_MessageType: TypeAlias = "Message" +_ChannelType: TypeAlias = "Channel" + class binding_key_t(NamedTuple): queue: str exchange: str @@ -30,9 +45,9 @@ class NotEquivalentError(Exception): ... class UndeliverableWarning(UserWarning): ... class BrokerState: - exchanges: dict[str, dict[str, Any]] - bindings: dict[binding_key_t, queue_binding_t] - queue_index: dict[str, set[binding_key_t]] + exchanges: dict[str, dict[str, Any]] | None + bindings: dict[binding_key_t, queue_binding_t] | None + queue_index: dict[str, set[binding_key_t]] | None def __init__( self, exchanges: dict[str, dict[str, Any]] | None = ... @@ -59,8 +74,8 @@ class QoS: prefetch_count: int restore_at_shutdown: bool - _delivered: OrderedDict[int, Any] - _dirty: set[int] + _delivered: OrderedDict[int, Any] | None + _dirty: set[int] | None def __init__( self, channel: AbstractChannel, prefetch_count: int = ... @@ -81,12 +96,27 @@ class Message(BaseMessage): def __init__( self, payload: dict[str, Any], - channel: AbstractChannel | None = ..., + channel: Channel | None = ..., **kwargs: Any, ) -> None: ... def serializable(self) -> dict[str, Any]: ... -class AbstractChannel(StdChannel): +# AbstractChannel is a base class with only internal methods +class AbstractChannel: + def _get(self, queue: str, timeout: float | None = ...) -> Any: ... + def _put(self, queue: str, message: Any) -> None: ... + def _purge(self, queue: str) -> int: ... + def _size(self, queue: str) -> int: ... + def _delete(self, queue: str, *args: Any, **kwargs: Any) -> None: ... + def _new_queue(self, queue: str, **kwargs: Any) -> None: ... + def _has_queue(self, queue: str, **kwargs: Any) -> bool: ... + def _poll(self, cycle: FairCycle, callback: Callable[..., Any], timeout: float | None = ...) -> None: ... + +# Channel inherits from AbstractChannel and StdChannel (multiple inheritance) +class Channel(AbstractChannel, StdChannel): + Message: type[Message] + QoS: type[QoS] + do_restore: bool exchange_types: dict[str, type[ExchangeType]] supports_fanout: bool @@ -99,12 +129,16 @@ class AbstractChannel(StdChannel): max_priority: int deadletter_queue: str | None + connection: Connection + _delivery_tags: Iterable[int] _consumers: dict[str, Any] _cycle: FairCycle | None - _qos: QoS | None + _qos: _QoSType | None _tag_to_queue: dict[str, str] + from_transport_options: tuple[str, ...] + def __init__(self, connection: Connection, **kwargs: Any) -> None: ... def exchange_declare( self, @@ -122,6 +156,22 @@ class AbstractChannel(StdChannel): if_unused: bool = ..., nowait: bool = ..., ) -> None: ... + def exchange_bind( + self, + destination: str, + source: str = ..., + routing_key: str = ..., + nowait: bool = ..., + arguments: dict[str, Any] | None = ..., + ) -> None: ... + def exchange_unbind( + self, + destination: str, + source: str = ..., + routing_key: str = ..., + nowait: bool = ..., + arguments: dict[str, Any] | None = ..., + ) -> None: ... def queue_declare( self, queue: str | None = ..., @@ -155,16 +205,16 @@ class AbstractChannel(StdChannel): def basic_publish( self, message: Any, - exchange: str = ..., - routing_key: str = ..., + exchange: str, + routing_key: str, **kwargs: Any, ) -> None: ... def basic_consume( self, queue: str, - no_ack: bool = ..., - callback: Callable[..., Any] | None = ..., - consumer_tag: str | None = ..., + no_ack: bool, + callback: Callable[..., Any] | None, + consumer_tag: str | None, **kwargs: Any, ) -> str: ... def basic_cancel(self, consumer_tag: str) -> None: ... @@ -173,7 +223,7 @@ class AbstractChannel(StdChannel): queue: str, no_ack: bool = ..., **kwargs: Any, - ) -> Message | None: ... + ) -> _MessageType | None: ... def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... def basic_qos( self, @@ -199,7 +249,7 @@ class AbstractChannel(StdChannel): self, exchange: str, default: str = ... ) -> ExchangeType: ... def list_bindings(self) -> Generator[tuple[str, str, str], None, None]: ... - def message_to_python(self, raw_message: Any) -> Message: ... + def message_to_python(self, raw_message: Any) -> _MessageType: ... def prepare_message( self, body: Any, @@ -209,7 +259,8 @@ class AbstractChannel(StdChannel): headers: dict[str, Any] | None = ..., properties: dict[str, Any] | None = ..., ) -> dict[str, Any]: ... - def flow(self, active: bool) -> None: ... + def flow(self, active: bool = ...) -> None: ... + def after_reply_message_received(self, queue: str) -> None: ... def __enter__(self) -> Self: ... def __exit__( self, @@ -220,38 +271,40 @@ class AbstractChannel(StdChannel): @property def state(self) -> BrokerState: ... @property - def qos(self) -> QoS: ... + def qos(self) -> _QoSType: ... @property def cycle(self) -> FairCycle: ... -Channel = AbstractChannel - class Management(BaseManagement): transport: Transport - channel: AbstractChannel | None + channel: _ChannelType | None def __init__(self, transport: Transport) -> None: ... def get_bindings(self) -> list[dict[str, Any]]: ... def close(self) -> None: ... class Transport(BaseTransport): + Channel: type[_ChannelType] + Cycle: type[FairCycle] + Management: type[Management] + polling_interval: float channel_max: int - channels: list[AbstractChannel] + channels: list[_ChannelType] | None cycle: FairCycle | None - _callbacks: dict[str, Callable[..., Any]] + _callbacks: dict[str, Callable[..., Any]] | None def __init__(self, client: Connection, **kwargs: Any) -> None: ... - def create_channel(self, connection: Connection) -> AbstractChannel: ... + def create_channel(self, connection: Connection) -> _ChannelType: ... def close_channel(self, channel: StdChannel) -> None: ... def establish_connection(self) -> Connection: ... def close_connection(self, connection: Connection) -> None: ... - def drain_events( - self, connection: Connection, timeout: float | None = ..., **kwargs: Any + def drain_events( # type: ignore[override] + self, connection: Connection, timeout: float | None = ... ) -> None: ... def on_message_ready( - self, channel: AbstractChannel, message: Message, queue: str + self, channel: _ChannelType, message: _MessageType, queue: str ) -> None: ... @property def default_connection_params(self) -> dict[str, Any]: ... diff --git a/kombu-stubs/transport/virtual/exchange.pyi b/kombu-stubs/transport/virtual/exchange.pyi index 3e3b009..f895274 100644 --- a/kombu-stubs/transport/virtual/exchange.pyi +++ b/kombu-stubs/transport/virtual/exchange.pyi @@ -1,8 +1,10 @@ from collections.abc import Iterable from typing import Any +STANDARD_EXCHANGE_TYPES: dict[str, type[ExchangeType]] + class ExchangeType: - type: str + type: str | None def __init__(self, channel: Any) -> None: ... def lookup( @@ -19,6 +21,19 @@ class ExchangeType: routing_key: str, arguments: dict[str, Any] | None, ) -> tuple[str, str, str, dict[str, Any] | None]: ... + def equivalent( + self, + prev: dict[str, Any], + exchange: str, + type: str, + durable: bool, + auto_delete: bool, + arguments: dict[str, Any] | None, + ) -> bool: ... + +class DirectExchange(ExchangeType): + type: str + def deliver( self, message: Any, @@ -27,13 +42,26 @@ class ExchangeType: **kwargs: Any, ) -> None: ... -class DirectExchange(ExchangeType): - type: str - class TopicExchange(ExchangeType): type: str + wildcards: dict[str, str] - def key_to_pattern(self, routing_key: str) -> Any: ... + def key_to_pattern(self, rkey: str) -> Any: ... + def deliver( + self, + message: Any, + exchange: str, + routing_key: str, + **kwargs: Any, + ) -> None: ... class FanoutExchange(ExchangeType): type: str + + def deliver( + self, + message: Any, + exchange: str, + routing_key: str, + **kwargs: Any, + ) -> None: ... diff --git a/kombu-stubs/utils/objects.pyi b/kombu-stubs/utils/objects.pyi index 18c8062..e1e0465 100644 --- a/kombu-stubs/utils/objects.pyi +++ b/kombu-stubs/utils/objects.pyi @@ -1,6 +1,8 @@ from collections.abc import Callable from typing import Any, Generic, TypeVar, overload +__all__ = ("cached_property",) + _T = TypeVar("_T") _S = TypeVar("_S") @@ -17,9 +19,9 @@ class cached_property(Generic[_T]): fdel: Callable[[Any], None] | None = ..., ) -> None: ... @overload - def __get__(self, instance: None, owner: type[Any]) -> cached_property[_T]: ... + def __get__(self, instance: None, owner: type[Any] | None = ...) -> cached_property[_T]: ... @overload - def __get__(self, instance: _S, owner: type[_S]) -> _T: ... + def __get__(self, instance: _S, owner: type[_S] | None = ...) -> _T: ... def __set__(self, instance: Any, value: _T) -> None: ... def __delete__(self, instance: Any) -> None: ... def setter( diff --git a/kombu-stubs/utils/scheduling.pyi b/kombu-stubs/utils/scheduling.pyi index 62061c7..94bd6e4 100644 --- a/kombu-stubs/utils/scheduling.pyi +++ b/kombu-stubs/utils/scheduling.pyi @@ -1,8 +1,23 @@ -from collections.abc import Callable, Sequence -from typing import Any, TypeVar +from collections.abc import Callable, Iterable, Iterator, Sequence +from typing import Any, Generic, TypeVar + +__all__ = ("FairCycle", "priority_cycle", "round_robin_cycle", "sorted_cycle") _T = TypeVar("_T") +class round_robin_cycle(Generic[_T]): + items: list[_T] | None + def __init__(self, it: Iterable[_T] | None = ...) -> None: ... + def update(self, it: Iterable[_T]) -> None: ... + def consume(self, n: int) -> Iterator[_T]: ... + def rotate(self, last_used: _T) -> None: ... + +class priority_cycle(round_robin_cycle[_T]): + ... + +class sorted_cycle(round_robin_cycle[_T]): + ... + class FairCycle: fun: Callable[..., Any] resources: Sequence[Any] From d7316a03c4ef3aa378a3e64f13706a0f7be942a3 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 1 Jan 2026 14:28:25 +0100 Subject: [PATCH 03/24] Fix kombu and amqp stubtest errors - Add missing amqp stubs: connection.pyi, channel.pyi, basic_message.pyi - Add __all__ exports to amqp modules - Fix amqp.promise class with full attributes and methods - Add AMQPError.method property - Fix Channel/Connection method signatures to match runtime - Use TypeAlias pattern to avoid class attribute name shadowing - Add missing kombu exports and __all__ declarations - Fix Mailbox.Node as method instead of class attribute - Fix PoolGroup, ProducerPool, set_limit signatures - Expand Entity, Resource, and exception stubs - Remove non-existent kombu.utils.encodings stub Remaining errors are internal modules without public API stubs and one kombu bug (reprkwargs in __all__ but undefined). --- amqp-stubs/__init__.pyi | 97 ++++++++++++++- amqp-stubs/basic_message.pyi | 44 +++++++ amqp-stubs/channel.pyi | 185 +++++++++++++++++++++++++++++ amqp-stubs/connection.pyi | 152 ++++++++++++++++++++++++ amqp-stubs/exceptions.pyi | 121 ++++++++++++++++++- kombu-stubs/__init__.pyi | 42 ++++++- kombu-stubs/abstract.pyi | 37 +++++- kombu-stubs/entity.pyi | 166 +++++++++++++++++++++++++- kombu-stubs/exceptions.pyi | 40 ++++++- kombu-stubs/mixins.pyi | 2 + kombu-stubs/pidbox.pyi | 155 +++++++++++++++++++++++- kombu-stubs/pools.pyi | 66 +++++++++- kombu-stubs/resource.pyi | 33 ++++- kombu-stubs/serialization.pyi | 2 + kombu-stubs/transport/__init__.pyi | 5 + kombu-stubs/utils/__init__.pyi | 71 +++++++++++ kombu-stubs/utils/encodings.pyi | 1 - kombu-stubs/utils/functional.pyi | 53 +++++++-- kombu-stubs/utils/limits.pyi | 16 ++- 19 files changed, 1246 insertions(+), 42 deletions(-) create mode 100644 amqp-stubs/basic_message.pyi create mode 100644 amqp-stubs/channel.pyi create mode 100644 amqp-stubs/connection.pyi delete mode 100644 kombu-stubs/utils/encodings.pyi diff --git a/amqp-stubs/__init__.pyi b/amqp-stubs/__init__.pyi index d66fa54..72b8676 100644 --- a/amqp-stubs/__init__.pyi +++ b/amqp-stubs/__init__.pyi @@ -1,11 +1,98 @@ +from collections.abc import Callable, Mapping, Sequence +from typing import Any + +from amqp.channel import Channel as Channel +from amqp.connection import Connection as Connection from amqp.exceptions import ( + AMQPError as AMQPError, + AMQPNotImplementedError as AMQPNotImplementedError, + AccessRefused as AccessRefused, ChannelError as ChannelError, -) -from amqp.exceptions import ( + ChannelNotOpen as ChannelNotOpen, ConnectionError as ConnectionError, -) -from amqp.exceptions import ( + ConnectionForced as ConnectionForced, + ConsumerCancelled as ConsumerCancelled, + ContentTooLarge as ContentTooLarge, + FrameError as FrameError, + FrameSyntaxError as FrameSyntaxError, + InternalError as InternalError, + InvalidCommand as InvalidCommand, + InvalidPath as InvalidPath, + IrrecoverableChannelError as IrrecoverableChannelError, + IrrecoverableConnectionError as IrrecoverableConnectionError, + NoConsumers as NoConsumers, + NotAllowed as NotAllowed, + NotFound as NotFound, + PreconditionFailed as PreconditionFailed, + RecoverableChannelError as RecoverableChannelError, + RecoverableConnectionError as RecoverableConnectionError, ResourceError as ResourceError, + ResourceLocked as ResourceLocked, + UnexpectedFrame as UnexpectedFrame, + error_for_code as error_for_code, +) +from amqp.basic_message import Message as Message + +__all__ = ( + "Connection", + "Channel", + "Message", + "promise", + "AMQPError", + "ConnectionError", + "RecoverableConnectionError", + "IrrecoverableConnectionError", + "ChannelError", + "RecoverableChannelError", + "IrrecoverableChannelError", + "ConsumerCancelled", + "ContentTooLarge", + "NoConsumers", + "ConnectionForced", + "InvalidPath", + "AccessRefused", + "NotFound", + "ResourceLocked", + "PreconditionFailed", + "FrameError", + "FrameSyntaxError", + "InvalidCommand", + "ChannelNotOpen", + "UnexpectedFrame", + "ResourceError", + "NotAllowed", + "AMQPNotImplementedError", + "InternalError", + "error_for_code", ) -__all__ = ["ChannelError", "ConnectionError", "ResourceError"] +class promise: + fun: Callable[..., Any] | None + args: Sequence[Any] + kwargs: Mapping[str, Any] + on_error: Callable[..., Any] | None + cancelled: bool + failed: bool + ready: bool + reason: BaseException | None + weak: bool + ignore_result: bool + value: Any + + def __init__( + self, + fun: Callable[..., Any] | None = ..., + args: Sequence[Any] | None = ..., + kwargs: Mapping[str, Any] | None = ..., + callback: Callable[..., Any] | None = ..., + on_error: Callable[..., Any] | None = ..., + weak: bool = ..., + ignore_result: bool = ..., + ) -> None: ... + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def then(self, callback: Callable[..., Any], on_error: Callable[..., Any] | None = ...) -> promise: ... + def throw(self, exc: BaseException | None = ..., tb: Any | None = ..., propagate: bool = ...) -> None: ... + def throw1(self, exc: BaseException | None = ...) -> None: ... + def cancel(self) -> None: ... + @property + def listeners(self) -> list[promise]: ... diff --git a/amqp-stubs/basic_message.pyi b/amqp-stubs/basic_message.pyi new file mode 100644 index 0000000..d9c16e1 --- /dev/null +++ b/amqp-stubs/basic_message.pyi @@ -0,0 +1,44 @@ +from typing import Any + +__all__ = ("Message",) + +class Message: + CLASS_ID: int + PROPERTIES: list[tuple[str, str]] + + body: bytes | str + body_size: int + body_received: int + channel: Any + delivery_info: dict[str, Any] + properties: dict[str, Any] + ready: bool + frame_method: tuple[int, int] | None + frame_args: bytes | None + + content_type: str | None + content_encoding: str | None + application_headers: dict[str, Any] | None + delivery_mode: int | None + priority: int | None + correlation_id: str | None + reply_to: str | None + expiration: str | None + message_id: str | None + timestamp: int | None + type: str | None + user_id: str | None + app_id: str | None + cluster_id: str | None + + def __init__( + self, + body: bytes | str = ..., + children: Any | None = ..., + channel: Any | None = ..., + **properties: Any, + ) -> None: ... + @property + def headers(self) -> dict[str, Any] | None: ... + @property + def delivery_tag(self) -> int | None: ... diff --git a/amqp-stubs/channel.pyi b/amqp-stubs/channel.pyi new file mode 100644 index 0000000..e4f6296 --- /dev/null +++ b/amqp-stubs/channel.pyi @@ -0,0 +1,185 @@ +from collections.abc import Callable, Mapping +from typing import Any, TypeAlias + +from amqp.basic_message import Message + +__all__ = ("Channel",) + +_MessageType: TypeAlias = Message + +class Channel: + Message: type[_MessageType] + + connection: Any + channel_id: int | None + auto_decode: bool + is_open: bool + + def __init__( + self, + connection: Any, + channel_id: int | None = ..., + auto_decode: bool = ..., + on_open: Callable[..., Any] | None = ..., + ) -> None: ... + def open(self) -> None: ... + def close( + self, + reply_code: int = ..., + reply_text: str = ..., + method_sig: tuple[int, int] = ..., + argsig: str = ..., + ) -> None: ... + def collect(self) -> None: ... + def flow(self, active: bool) -> None: ... + def exchange_declare( + self, + exchange: str, + type: str, + passive: bool = ..., + durable: bool = ..., + auto_delete: bool = ..., + nowait: bool = ..., + arguments: Mapping[str, Any] | None = ..., + argsig: str = ..., + ) -> None: ... + def exchange_delete( + self, + exchange: str, + if_unused: bool = ..., + nowait: bool = ..., + argsig: str = ..., + ) -> None: ... + def exchange_bind( + self, + destination: str, + source: str = ..., + routing_key: str = ..., + nowait: bool = ..., + arguments: Mapping[str, Any] | None = ..., + argsig: str = ..., + ) -> None: ... + def exchange_unbind( + self, + destination: str, + source: str = ..., + routing_key: str = ..., + nowait: bool = ..., + arguments: Mapping[str, Any] | None = ..., + argsig: str = ..., + ) -> None: ... + def queue_declare( + self, + queue: str = ..., + passive: bool = ..., + durable: bool = ..., + exclusive: bool = ..., + auto_delete: bool = ..., + nowait: bool = ..., + arguments: Mapping[str, Any] | None = ..., + argsig: str = ..., + ) -> tuple[str, int, int] | None: ... + def queue_delete( + self, + queue: str = ..., + if_unused: bool = ..., + if_empty: bool = ..., + nowait: bool = ..., + argsig: str = ..., + ) -> int | None: ... + def queue_bind( + self, + queue: str, + exchange: str = ..., + routing_key: str = ..., + nowait: bool = ..., + arguments: Mapping[str, Any] | None = ..., + argsig: str = ..., + ) -> None: ... + def queue_unbind( + self, + queue: str, + exchange: str, + routing_key: str = ..., + nowait: bool = ..., + arguments: Mapping[str, Any] | None = ..., + argsig: str = ..., + ) -> None: ... + def queue_purge( + self, queue: str = ..., nowait: bool = ..., argsig: str = ... + ) -> int | None: ... + def basic_qos( + self, + prefetch_size: int, + prefetch_count: int, + a_global: bool, + argsig: str = ..., + ) -> None: ... + def basic_consume( + self, + queue: str = ..., + consumer_tag: str = ..., + no_local: bool = ..., + no_ack: bool = ..., + exclusive: bool = ..., + nowait: bool = ..., + callback: Callable[..., Any] | None = ..., + arguments: Mapping[str, Any] | None = ..., + on_cancel: Callable[..., Any] | None = ..., + argsig: str = ..., + ) -> str: ... + def basic_cancel( + self, consumer_tag: str, nowait: bool = ..., argsig: str = ... + ) -> None: ... + def basic_get( + self, queue: str = ..., no_ack: bool = ..., argsig: str = ... + ) -> _MessageType | None: ... + def basic_ack( + self, delivery_tag: int, multiple: bool = ..., argsig: str = ... + ) -> None: ... + def basic_reject( + self, delivery_tag: int, requeue: bool, argsig: str = ... + ) -> None: ... + def basic_recover(self, requeue: bool = ...) -> None: ... + def basic_recover_async(self, requeue: bool = ...) -> None: ... + def basic_publish( + self, + msg: _MessageType, + exchange: str = ..., + routing_key: str = ..., + mandatory: bool = ..., + immediate: bool = ..., + timeout: float | None = ..., + confirm_timeout: float | None = ..., + argsig: str = ..., + ) -> None: ... + def basic_publish_confirm(self, *args: Any, **kwargs: Any) -> None: ... + def tx_select(self) -> None: ... + def tx_commit(self) -> None: ... + def tx_rollback(self) -> None: ... + def confirm_select(self, nowait: bool = ...) -> None: ... + def dispatch_method( + self, method_sig: tuple[int, int], payload: bytes, content: Any + ) -> None: ... + def send_method( + self, + sig: tuple[int, int], + format: str | None = ..., + args: tuple[Any, ...] | None = ..., + content: Any | None = ..., + wait: Any | None = ..., + callback: Callable[..., Any] | None = ..., + returns_tuple: bool = ..., + ) -> Any: ... + def wait( + self, + method: Any, + callback: Callable[..., Any] | None = ..., + timeout: float | None = ..., + returns_tuple: bool = ..., + ) -> Any: ... + def then( + self, + on_success: Callable[..., Any], + on_error: Callable[..., Any] | None = ..., + ) -> Any: ... diff --git a/amqp-stubs/connection.pyi b/amqp-stubs/connection.pyi new file mode 100644 index 0000000..2268b5f --- /dev/null +++ b/amqp-stubs/connection.pyi @@ -0,0 +1,152 @@ +from collections.abc import Callable, Mapping +from socket import socket +from typing import Any, TypeAlias + +from amqp.channel import Channel as _ChannelType + +__all__ = ("Connection",) + +_ChannelTypeAlias: TypeAlias = _ChannelType + +class Connection: + Channel: type[_ChannelTypeAlias] + + host: str + userid: str + password: str + login_method: str | None + virtual_host: str + locale: str + client_properties: dict[str, Any] + ssl: bool | dict[str, Any] + connect_timeout: float | None + channel_max: int | None + frame_max: int + heartbeat: int | None + confirm_publish: bool + read_timeout: float | None + write_timeout: float | None + + bytes_sent: int + bytes_recv: int + last_heartbeat_sent: int + last_heartbeat_received: int + channel_errors: tuple[type[Exception], ...] + connection_errors: tuple[type[Exception], ...] + recoverable_channel_errors: tuple[type[Exception], ...] + recoverable_connection_errors: tuple[type[Exception], ...] + + client_heartbeat: int | None + server_heartbeat: int | None + prev_recv: float | None + prev_sent: float | None + library_properties: dict[str, Any] + negotiate_capabilities: dict[str, bool] + + auto_decode: bool + channel_id: int | None + connection: Any + is_closing: bool + method_queue: list[Any] + + def __init__( + self, + host: str = ..., + userid: str = ..., + password: str = ..., + login_method: str | None = ..., + login_response: Any | None = ..., + authentication: tuple[Any, ...] = ..., + virtual_host: str = ..., + locale: str = ..., + client_properties: dict[str, Any] | None = ..., + ssl: bool | dict[str, Any] = ..., + connect_timeout: float | None = ..., + channel_max: int | None = ..., + frame_max: int | None = ..., + heartbeat: int = ..., + on_open: Callable[..., Any] | None = ..., + on_blocked: Callable[..., Any] | None = ..., + on_unblocked: Callable[..., Any] | None = ..., + confirm_publish: bool = ..., + on_tune_ok: Callable[..., Any] | None = ..., + read_timeout: float | None = ..., + write_timeout: float | None = ..., + socket_settings: Mapping[str, Any] | None = ..., + frame_handler: Callable[..., Any] = ..., + frame_writer: Callable[..., Any] = ..., + **kwargs: Any, + ) -> None: ... + def __enter__(self) -> Connection: ... + def __exit__(self, *eargs: Any) -> None: ... + def Transport( + self, + host: str, + connect_timeout: float | None, + ssl: bool | dict[str, Any] = ..., + read_timeout: float | None = ..., + write_timeout: float | None = ..., + socket_settings: Mapping[str, Any] | None = ..., + **kwargs: Any, + ) -> Any: ... + def connect(self, callback: Callable[..., Any] | None = ...) -> None: ... + def close( + self, + reply_code: int = ..., + reply_text: str = ..., + method_sig: tuple[int, int] = ..., + argsig: str = ..., + ) -> None: ... + def channel( + self, channel_id: int | None = ..., callback: Callable[..., Any] | None = ... + ) -> _ChannelTypeAlias: ... + def drain_events(self, timeout: float | None = ...) -> None: ... + def blocking_read(self, timeout: float | None = ...) -> None: ... + def collect(self) -> None: ... + def heartbeat_tick(self, rate: int = ...) -> None: ... + def send_heartbeat(self) -> None: ... + def is_alive(self) -> bool: ... + def dispatch_method( + self, method_sig: tuple[int, int], payload: bytes, content: Any + ) -> None: ... + def on_inbound_method( + self, + channel_id: int, + method_sig: tuple[int, int], + payload: bytes, + content: Any, + ) -> None: ... + def send_method( + self, + sig: tuple[int, int], + format: str | None = ..., + args: tuple[Any, ...] | None = ..., + content: Any | None = ..., + wait: Any | None = ..., + callback: Callable[..., Any] | None = ..., + returns_tuple: bool = ..., + ) -> Any: ... + def wait( + self, + method: Any, + callback: Callable[..., Any] | None = ..., + timeout: float | None = ..., + returns_tuple: bool = ..., + ) -> Any: ... + def then( + self, + on_success: Callable[..., Any], + on_error: Callable[..., Any] | None = ..., + ) -> Any: ... + @property + def connected(self) -> bool: ... + @property + def sock(self) -> socket | None: ... + @property + def server_capabilities(self) -> dict[str, Any]: ... + @property + def transport(self) -> Any: ... + @property + def frame_writer(self) -> Callable[..., Any]: ... + @property + def on_inbound_frame(self) -> Callable[..., Any]: ... diff --git a/amqp-stubs/exceptions.pyi b/amqp-stubs/exceptions.pyi index 0d25375..13f74dc 100644 --- a/amqp-stubs/exceptions.pyi +++ b/amqp-stubs/exceptions.pyi @@ -1,8 +1,121 @@ -class AMQPError(Exception): ... +from typing import Any + +__all__ = ( + "AMQPError", + "ConnectionError", + "ChannelError", + "RecoverableConnectionError", + "IrrecoverableConnectionError", + "RecoverableChannelError", + "IrrecoverableChannelError", + "ConsumerCancelled", + "ContentTooLarge", + "NoConsumers", + "ConnectionForced", + "InvalidPath", + "AccessRefused", + "NotFound", + "ResourceLocked", + "PreconditionFailed", + "FrameError", + "FrameSyntaxError", + "InvalidCommand", + "ChannelNotOpen", + "UnexpectedFrame", + "ResourceError", + "NotAllowed", + "AMQPNotImplementedError", + "InternalError", + "MessageNacked", + "AMQPDeprecationWarning", +) + +class AMQPError(Exception): + code: int + recoverable: bool + reply_text: str | None + method_sig: tuple[int, int] | None + method_name: str | None + reply_code: int | None + + def __init__( + self, + reply_text: str | None = ..., + method_sig: tuple[int, int] | None = ..., + method_name: str | None = ..., + reply_code: int | None = ..., + ) -> None: ... + @property + def method(self) -> tuple[int, int] | None: ... + class ConnectionError(AMQPError): ... class ChannelError(AMQPError): ... -class RecoverableChannelError(ChannelError): ... -class IrrecoverableChannelError(ChannelError): ... class RecoverableConnectionError(ConnectionError): ... class IrrecoverableConnectionError(ConnectionError): ... -class ResourceError(RecoverableConnectionError): ... +class RecoverableChannelError(ChannelError): ... +class IrrecoverableChannelError(ChannelError): ... + +class ConsumerCancelled(RecoverableConnectionError): + code: int + +class ContentTooLarge(RecoverableChannelError): + code: int + +class NoConsumers(RecoverableChannelError): + code: int + +class ConnectionForced(RecoverableConnectionError): + code: int + +class InvalidPath(IrrecoverableConnectionError): + code: int + +class AccessRefused(IrrecoverableChannelError): + code: int + +class NotFound(IrrecoverableChannelError): + code: int + +class ResourceLocked(RecoverableChannelError): + code: int + +class PreconditionFailed(IrrecoverableChannelError): + code: int + +class FrameError(IrrecoverableConnectionError): + code: int + +class FrameSyntaxError(IrrecoverableConnectionError): + code: int + +class InvalidCommand(IrrecoverableConnectionError): + code: int + +class ChannelNotOpen(IrrecoverableConnectionError): + code: int + +class UnexpectedFrame(IrrecoverableConnectionError): + code: int + +class ResourceError(RecoverableConnectionError): + code: int + +class NotAllowed(IrrecoverableConnectionError): + code: int + +class AMQPNotImplementedError(IrrecoverableConnectionError): + code: int + +class InternalError(IrrecoverableConnectionError): + code: int + +class MessageNacked(Exception): ... + +class AMQPDeprecationWarning(UserWarning): ... + +def error_for_code( + code: int, + text: str, + method: tuple[int, int], + default: type[AMQPError], +) -> AMQPError: ... diff --git a/kombu-stubs/__init__.pyi b/kombu-stubs/__init__.pyi index 77b754e..47b5594 100644 --- a/kombu-stubs/__init__.pyi +++ b/kombu-stubs/__init__.pyi @@ -1,17 +1,47 @@ -from kombu import pools as pools +from collections.abc import Callable, Generator +from typing import Any +from uuid import UUID + from kombu.connection import Connection as Connection from kombu.entity import Exchange as Exchange from kombu.entity import Queue as Queue +from kombu.entity import binding as binding from kombu.message import Message as Message from kombu.messaging import Consumer as Consumer from kombu.messaging import Producer as Producer +from kombu.pools import Connections as _Connections +from kombu.pools import Producers as _Producers -__all__ = [ +__all__ = ( "Connection", - "Consumer", + "BrokerConnection", "Exchange", + "Queue", + "binding", "Message", + "Consumer", "Producer", - "Queue", - "pools", -] + "connections", + "producers", + "parse_url", + "eventloop", + "uuid", + "enable_insecure_serializers", + "disable_insecure_serializers", +) + +BrokerConnection = Connection + +connections: _Connections +producers: _Producers + +def parse_url(url: str) -> dict[str, Any]: ... +def eventloop( + conn: Connection, + limit: int | None = ..., + timeout: float | None = ..., + ignore_timeouts: bool = ..., +) -> Generator[Any, None, None]: ... +def uuid(_uuid: Callable[[], UUID] = ...) -> str: ... +def enable_insecure_serializers(choices: Any = ...) -> None: ... +def disable_insecure_serializers(allowed: Any = ...) -> None: ... diff --git a/kombu-stubs/abstract.pyi b/kombu-stubs/abstract.pyi index 9ec8f8d..e23d3da 100644 --- a/kombu-stubs/abstract.pyi +++ b/kombu-stubs/abstract.pyi @@ -1,2 +1,35 @@ -class Object: ... -class MaybeChannelBound(Object): ... +from typing import Any, TypeVar + +from kombu.connection import Connection +from kombu.transport.base import StdChannel + +__all__ = ("Object", "MaybeChannelBound") + +_MaybeChannelBoundT = TypeVar("_MaybeChannelBoundT", bound="MaybeChannelBound") + +class Object: + attrs: tuple[tuple[str, Any], ...] + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def __copy__(self) -> Object: ... + def as_dict(self, recurse: bool = ...) -> dict[str, Any]: ... + +class MaybeChannelBound(Object): + @property + def can_cache_declaration(self) -> bool: ... + + def __call__( + self: _MaybeChannelBoundT, channel: StdChannel | Connection + ) -> _MaybeChannelBoundT: ... + def bind( + self: _MaybeChannelBoundT, channel: StdChannel | Connection + ) -> _MaybeChannelBoundT: ... + def maybe_bind( + self: _MaybeChannelBoundT, channel: StdChannel | Connection + ) -> _MaybeChannelBoundT: ... + def revive(self, channel: StdChannel) -> None: ... + def when_bound(self) -> None: ... + @property + def channel(self) -> StdChannel: ... + @property + def is_bound(self) -> bool: ... diff --git a/kombu-stubs/entity.pyi b/kombu-stubs/entity.pyi index 41f660a..f814689 100644 --- a/kombu-stubs/entity.pyi +++ b/kombu-stubs/entity.pyi @@ -1,9 +1,29 @@ +from collections.abc import Callable, Mapping, Sequence from typing import Any -from kombu.abstract import MaybeChannelBound +from kombu.abstract import MaybeChannelBound, Object +from kombu.message import Message as _Message from kombu.transport.base import StdChannel +__all__ = ("Exchange", "Queue", "binding", "maybe_delivery_mode") + +def maybe_delivery_mode( + v: Any, modes: Mapping[str, int] | None = ..., default: int = ... +) -> int | None: ... + class Exchange(MaybeChannelBound): + PERSISTENT_DELIVERY_MODE: int + TRANSIENT_DELIVERY_MODE: int + + name: str + type: str + durable: bool + auto_delete: bool + delivery_mode: int | None + no_declare: bool + passive: bool + arguments: dict[str, Any] | None + def __init__( self, name: str = ..., @@ -11,18 +31,154 @@ class Exchange(MaybeChannelBound): channel: StdChannel | None = ..., **kwargs: Any, ) -> None: ... + def Message( + self, + body: Any, + delivery_mode: int | None = ..., + properties: dict[str, Any] | None = ..., + **kwargs: Any, + ) -> _Message: ... + def declare( + self, + nowait: bool = ..., + passive: bool | None = ..., + channel: StdChannel | None = ..., + ) -> None: ... + def delete(self, if_unused: bool = ..., nowait: bool = ...) -> None: ... + def bind_to( + self, + exchange: str | Exchange = ..., + routing_key: str = ..., + arguments: dict[str, Any] | None = ..., + nowait: bool = ..., + channel: StdChannel | None = ..., + **kwargs: Any, + ) -> None: ... + def unbind_from( + self, + source: str | Exchange = ..., + routing_key: str = ..., + nowait: bool = ..., + arguments: dict[str, Any] | None = ..., + channel: StdChannel | None = ..., + ) -> None: ... + def publish( + self, + message: Any, + routing_key: str | None = ..., + mandatory: bool = ..., + immediate: bool = ..., + exchange: str | None = ..., + ) -> None: ... + def binding( + self, + routing_key: str = ..., + arguments: dict[str, Any] | None = ..., + unbind_arguments: dict[str, Any] | None = ..., + ) -> binding: ... class Queue(MaybeChannelBound): - routing_key: str - exchange: Exchange + ContentDisallowed: type[Exception] + name: str + exchange: Exchange + routing_key: str + durable: bool + exclusive: bool + auto_delete: bool + no_ack: bool + queue_arguments: dict[str, Any] | None + binding_arguments: dict[str, Any] | None + consumer_arguments: dict[str, Any] | None + bindings: Sequence[binding] + on_declared: Callable[..., Any] | None + def __init__( self, name: str = ..., exchange: Exchange | str | None = ..., routing_key: str = ..., channel: StdChannel | None = ..., - bindings: Any = ..., - on_declared: Any = ..., + bindings: Sequence[binding] | None = ..., + on_declared: Callable[..., Any] | None = ..., **kwargs: Any, ) -> None: ... + @classmethod + def from_dict(cls, queue: str, **options: Any) -> Queue: ... + def declare( + self, nowait: bool = ..., channel: StdChannel | None = ... + ) -> str | None: ... + def queue_declare( + self, nowait: bool = ..., passive: bool = ..., channel: StdChannel | None = ... + ) -> str | None: ... + def queue_bind( + self, nowait: bool = ..., channel: StdChannel | None = ... + ) -> None: ... + def queue_unbind( + self, + arguments: dict[str, Any] | None = ..., + nowait: bool = ..., + channel: StdChannel | None = ..., + ) -> None: ... + def delete( + self, + if_unused: bool = ..., + if_empty: bool = ..., + nowait: bool = ..., + ) -> int | None: ... + def bind_to( + self, + exchange: str | Exchange = ..., + routing_key: str = ..., + arguments: dict[str, Any] | None = ..., + nowait: bool = ..., + channel: StdChannel | None = ..., + ) -> None: ... + def unbind_from( + self, + exchange: str | Exchange = ..., + routing_key: str = ..., + arguments: dict[str, Any] | None = ..., + nowait: bool = ..., + channel: StdChannel | None = ..., + ) -> None: ... + def get( + self, no_ack: bool | None = ..., accept: Sequence[str] | None = ... + ) -> _Message | None: ... + def purge(self, nowait: bool = ...) -> int | None: ... + def consume( + self, + consumer_tag: str = ..., + callback: Callable[[Any, _Message], None] | None = ..., + no_ack: bool | None = ..., + nowait: bool = ..., + on_cancel: Callable[[str], None] | None = ..., + ) -> str: ... + def cancel(self, consumer_tag: str) -> None: ... + +class binding(Object): + exchange: Exchange | None + routing_key: str + arguments: dict[str, Any] | None + unbind_arguments: dict[str, Any] | None + + def __init__( + self, + exchange: Exchange | None = ..., + routing_key: str = ..., + arguments: dict[str, Any] | None = ..., + unbind_arguments: dict[str, Any] | None = ..., + ) -> None: ... + def declare(self, channel: StdChannel, nowait: bool = ...) -> None: ... + def bind( + self, + entity: Exchange | Queue, + nowait: bool = ..., + channel: StdChannel | None = ..., + ) -> None: ... + def unbind( + self, + entity: Exchange | Queue, + nowait: bool = ..., + channel: StdChannel | None = ..., + ) -> None: ... diff --git a/kombu-stubs/exceptions.pyi b/kombu-stubs/exceptions.pyi index 01102ce..14f2581 100644 --- a/kombu-stubs/exceptions.pyi +++ b/kombu-stubs/exceptions.pyi @@ -1,6 +1,31 @@ +from types import TracebackType +from typing import Any + from amqp import ChannelError as ChannelError from amqp import ConnectionError as ConnectionError +__all__ = ( + "reraise", + "KombuError", + "OperationalError", + "NotBoundError", + "MessageStateError", + "TimeoutError", + "LimitExceeded", + "ConnectionLimitExceeded", + "ChannelLimitExceeded", + "ConnectionError", + "ChannelError", + "VersionMismatch", + "SerializerNotInstalled", + "ResourceError", + "SerializationError", + "EncodeError", + "DecodeError", + "HttpError", + "InconsistencyError", +) + class KombuError(Exception): ... class OperationalError(KombuError): ... class SerializationError(KombuError): ... @@ -8,15 +33,28 @@ class EncodeError(SerializationError): ... class DecodeError(SerializationError): ... class NotBoundError(KombuError): ... class MessageStateError(KombuError): ... +class TimeoutError(KombuError): ... class LimitExceeded(KombuError): ... class ConnectionLimitExceeded(LimitExceeded): ... class ChannelLimitExceeded(LimitExceeded): ... class VersionMismatch(KombuError): ... class SerializerNotInstalled(KombuError): ... class ContentDisallowed(SerializerNotInstalled): ... +class ResourceError(KombuError): + code: int class InconsistencyError(ConnectionError): ... class HttpError(Exception): + code: int + message: str | None + response: Any | None + def __init__( - self, code: int, message: str | None = ..., response: object | None = ... + self, code: int, message: str | None = ..., response: Any | None = ... ) -> None: ... + +def reraise( + tp: type[BaseException] | None, + value: BaseException | None, + tb: TracebackType | None = ..., +) -> None: ... diff --git a/kombu-stubs/mixins.pyi b/kombu-stubs/mixins.pyi index 1cdf81c..49d491f 100644 --- a/kombu-stubs/mixins.pyi +++ b/kombu-stubs/mixins.pyi @@ -9,6 +9,8 @@ from kombu.transport.base import StdChannel from kombu.utils.limits import TokenBucket from typing_extensions import override +__all__ = ("ConsumerMixin", "ConsumerProducerMixin") + class ConsumerMixin: connect_max_retries: int | None should_stop: bool diff --git a/kombu-stubs/pidbox.pyi b/kombu-stubs/pidbox.pyi index b46f428..9af4658 100644 --- a/kombu-stubs/pidbox.pyi +++ b/kombu-stubs/pidbox.pyi @@ -1,2 +1,153 @@ -class Node: ... -class Mailbox: ... +from collections.abc import Callable, Sequence +from contextlib import contextmanager +from typing import Any, Generator, Type, TypeAlias + +from kombu.connection import Connection +from kombu.entity import Exchange, Queue +from kombu.message import Message +from kombu.messaging import Consumer, Producer +from kombu.transport.base import StdChannel +from kombu.utils.objects import cached_property + +__all__ = ("Node", "Mailbox") + +_ConsumerType: TypeAlias = Consumer +_NodeType: TypeAlias = "Node" + +class Node: + hostname: str | None + state: Any | None + channel: StdChannel | None + handlers: dict[str, Callable[..., Any]] | None + mailbox: Mailbox | None + + def __init__( + self, + hostname: str | None, + state: Any | None = ..., + channel: StdChannel | None = ..., + handlers: dict[str, Callable[..., Any]] | None = ..., + mailbox: Mailbox | None = ..., + ) -> None: ... + def Consumer( + self, + channel: StdChannel | None = ..., + no_ack: bool = ..., + accept: Sequence[str] | None = ..., + **options: Any, + ) -> _ConsumerType: ... + def handler(self, fun: Callable[..., Any]) -> Callable[..., Any]: ... + def listen( + self, channel: StdChannel | None = ..., callback: Callable[..., Any] | None = ... + ) -> _ConsumerType: ... + def dispatch( + self, + method: str, + arguments: dict[str, Any] | None = ..., + reply_to: dict[str, Any] | None = ..., + ticket: str | None = ..., + **kwargs: Any, + ) -> Any: ... + def dispatch_from_message( + self, body: Any, message: Message | None = ... + ) -> None: ... + def handle_message(self, body: Any, message: Message | None = ...) -> None: ... + def handle( + self, method: str, arguments: dict[str, Any] | None = ... + ) -> Any: ... + def handle_call( + self, method: str, arguments: dict[str, Any] | None + ) -> Any: ... + def handle_cast( + self, method: str, arguments: dict[str, Any] | None + ) -> Any: ... + def reply( + self, + data: Any, + exchange: Exchange | str, + routing_key: str, + ticket: str | None, + **kwargs: Any, + ) -> None: ... + def on_decode_error(self, message: Message, exc: Exception) -> None: ... + +class Mailbox: + namespace: str | None + connection: Connection | None + type: str + exchange: Exchange | None + exchange_fmt: str + reply_exchange: Exchange | None + reply_exchange_fmt: str + accept: list[str] + serializer: str | None + producer_pool: Any | None + queue_ttl: float | None + queue_expires: float | None + queue_durable: bool + queue_exclusive: bool + reply_queue_ttl: float | None + reply_queue_expires: float | None + node_cls: Type[_NodeType] + + def __init__( + self, + namespace: str, + type: str = ..., + connection: Connection | None = ..., + clock: Any | None = ..., + accept: Sequence[str] | None = ..., + serializer: str | None = ..., + producer_pool: Any | None = ..., + queue_ttl: float | None = ..., + queue_expires: float | None = ..., + queue_durable: bool = ..., + queue_exclusive: bool = ..., + reply_queue_ttl: float | None = ..., + reply_queue_expires: float | None = ..., + ) -> None: ... + def __call__(self, connection: Connection) -> _NodeType: ... + def Node( + self, + hostname: str | None = ..., + state: Any | None = ..., + channel: StdChannel | None = ..., + handlers: dict[str, Callable[..., Any]] | None = ..., + ) -> _NodeType: ... + def get_queue(self, hostname: str) -> Queue: ... + def get_reply_queue(self) -> Queue: ... + @contextmanager + def producer_or_acquire( + self, producer: Producer | None = ..., channel: StdChannel | None = ... + ) -> Generator[Producer, None, None]: ... + def call( + self, + destination: Sequence[str], + command: str, + kwargs: dict[str, Any] | None = ..., + timeout: float | None = ..., + callback: Callable[..., Any] | None = ..., + channel: StdChannel | None = ..., + ) -> list[Any] | None: ... + def cast( + self, + destination: Sequence[str], + command: str, + kwargs: dict[str, Any] | None = ..., + ) -> None: ... + def abcast( + self, command: str, kwargs: dict[str, Any] | None = ... + ) -> None: ... + def multi_call( + self, + command: str, + kwargs: dict[str, Any] | None = ..., + timeout: float = ..., + limit: int | None = ..., + callback: Callable[..., Any] | None = ..., + channel: StdChannel | None = ..., + ) -> list[Any] | None: ... + @property + def oid(self) -> str: ... + @cached_property + def reply_queue(self) -> Queue: ... diff --git a/kombu-stubs/pools.pyi b/kombu-stubs/pools.pyi index 5bd7494..7577916 100644 --- a/kombu-stubs/pools.pyi +++ b/kombu-stubs/pools.pyi @@ -1,3 +1,65 @@ -from kombu.resource import Resource +from typing import Any, TypeAlias -class ProducerPool(Resource): ... +from kombu.connection import Connection, ConnectionPool +from kombu.messaging import Producer + +__all__ = ( + "ProducerPool", + "PoolGroup", + "register_group", + "connections", + "producers", + "get_limit", + "set_limit", + "reset", +) + +_ProducerType: TypeAlias = Producer + +class PoolGroup(dict[Any, Any]): + def __init__( + self, limit: int | None = ..., close_after_fork: bool = ... + ) -> None: ... + def __missing__(self, resource: Any) -> Any: ... + def create(self, resource: Any, limit: int | None) -> Any: ... + +class Connections(PoolGroup): + def create(self, connection: Connection, limit: int | None) -> ConnectionPool: ... + +class Producers(PoolGroup): + def create(self, connection: Connection, limit: int | None) -> ProducerPool: ... + +class ProducerPool: + Producer: type[_ProducerType] + connections: ConnectionPool + limit: int | None + close_after_fork: bool + + def __init__( + self, + connections: ConnectionPool, + Producer: type[_ProducerType] = ..., + limit: int | None = ..., + *args: Any, + **kwargs: Any, + ) -> None: ... + def setup(self) -> None: ... + def create_producer(self) -> _ProducerType: ... + def new(self) -> _ProducerType: ... + def acquire(self, block: bool = ..., timeout: float | None = ...) -> _ProducerType: ... + def prepare(self, p: _ProducerType) -> _ProducerType: ... + def release(self, resource: _ProducerType) -> None: ... + def close_resource(self, resource: _ProducerType) -> None: ... + +connections: Connections +producers: Producers + +def register_group(group: PoolGroup) -> PoolGroup: ... +def get_limit() -> int | None: ... +def set_limit( + limit: int, + force: bool = ..., + reset_after: bool = ..., + ignore_errors: bool = ..., +) -> int | None: ... +def reset(*args: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/resource.pyi b/kombu-stubs/resource.pyi index 8e43ea9..8ee8a0d 100644 --- a/kombu-stubs/resource.pyi +++ b/kombu-stubs/resource.pyi @@ -1 +1,32 @@ -class Resource: ... +from typing import Any + +from kombu.exceptions import LimitExceeded + +class Resource: + LimitExceeded: type[LimitExceeded] + close_after_fork: bool + + def __init__( + self, + limit: int | None = ..., + preload: int | None = ..., + close_after_fork: bool | None = ..., + ) -> None: ... + def setup(self) -> None: ... + def acquire(self, block: bool = ..., timeout: float | None = ...) -> Any: ... + def prepare(self, resource: Any) -> Any: ... + def close_resource(self, resource: Any) -> None: ... + def release_resource(self, resource: Any) -> None: ... + def release(self, resource: Any) -> None: ... + def collect_resource(self, resource: Any) -> None: ... + def replace(self, resource: Any) -> None: ... + def force_close_all(self, close_pool: bool = ...) -> None: ... + def resize( + self, + limit: int, + force: bool = ..., + ignore_errors: bool = ..., + reset: bool = ..., + ) -> None: ... + @property + def limit(self) -> int | None: ... diff --git a/kombu-stubs/serialization.pyi b/kombu-stubs/serialization.pyi index 24fdc78..943ae59 100644 --- a/kombu-stubs/serialization.pyi +++ b/kombu-stubs/serialization.pyi @@ -2,6 +2,8 @@ import pickle as pickle from collections.abc import Callable, Container, Iterable, Mapping from typing import Any, NamedTuple, TypeAlias +__all__ = ("pickle", "loads", "dumps", "register", "unregister") + pickle_load = pickle.load _Encoder: TypeAlias = Callable[[Any], str] diff --git a/kombu-stubs/transport/__init__.pyi b/kombu-stubs/transport/__init__.pyi index e69de29..37525a6 100644 --- a/kombu-stubs/transport/__init__.pyi +++ b/kombu-stubs/transport/__init__.pyi @@ -0,0 +1,5 @@ +TRANSPORT_ALIASES: dict[str, str] + +def get_transport_cls(transport: str | None = ...) -> str | None: ... +def resolve_transport(transport: str | None = ...) -> str | None: ... +def supports_librabbitmq() -> bool | None: ... diff --git a/kombu-stubs/utils/__init__.pyi b/kombu-stubs/utils/__init__.pyi index e69de29..929e75b 100644 --- a/kombu-stubs/utils/__init__.pyi +++ b/kombu-stubs/utils/__init__.pyi @@ -0,0 +1,71 @@ +from collections.abc import Callable, Generator, Iterable, Mapping +from contextlib import contextmanager +from typing import Any, BinaryIO, TextIO, TypeVar +from uuid import UUID + +from kombu.utils.functional import retry_over_time as retry_over_time +from kombu.utils.objects import cached_property as cached_property + +__all__ = ( + "EqualityDict", + "uuid", + "maybe_list", + "fxrange", + "fxrangemax", + "retry_over_time", + "emergency_dump_state", + "cached_property", + "register_after_fork", + "reprcall", + "symbol_by_name", + "nested", + "fileno", + "maybe_fileno", +) + +_T = TypeVar("_T") + +class EqualityDict(dict[Any, Any]): ... + +def uuid(_uuid: Callable[[], UUID] = ...) -> str: ... +def maybe_list( + obj: Any, scalars: tuple[type[Any], ...] = ... +) -> list[Any] | None: ... +def fxrange( + start: float = ..., + stop: float | None = ..., + step: float = ..., + repeatlast: bool = ..., +) -> Generator[float, None, None]: ... +def fxrangemax( + start: float = ..., + stop: float | None = ..., + step: float = ..., + max: float = ..., +) -> Generator[float, None, None]: ... +def emergency_dump_state( + state: Any, + open_file: Callable[..., BinaryIO | TextIO] = ..., + dump: Callable[..., None] | None = ..., + stderr: TextIO | None = ..., +) -> None: ... +def register_after_fork(obj: Any, func: Callable[..., Any]) -> None: ... +def reprcall( + name: str, + args: Iterable[Any] = ..., + kwargs: Mapping[str, Any] | None = ..., + sep: str = ..., +) -> str: ... +def symbol_by_name( + name: str, + aliases: Mapping[str, str] | None = ..., + imp: Callable[[str], Any] | None = ..., + package: str | None = ..., + sep: str = ..., + default: _T | None = ..., + **kwargs: Any, +) -> Any: ... +@contextmanager +def nested(*managers: Any) -> Generator[tuple[Any, ...], None, None]: ... +def fileno(f: Any) -> int: ... +def maybe_fileno(f: Any) -> int | None: ... diff --git a/kombu-stubs/utils/encodings.pyi b/kombu-stubs/utils/encodings.pyi deleted file mode 100644 index 88d8c09..0000000 --- a/kombu-stubs/utils/encodings.pyi +++ /dev/null @@ -1 +0,0 @@ -def safe_repr(o: object, errors: str = "replace") -> str: ... diff --git a/kombu-stubs/utils/functional.pyi b/kombu-stubs/utils/functional.pyi index f4a3037..de5a2cb 100644 --- a/kombu-stubs/utils/functional.pyi +++ b/kombu-stubs/utils/functional.pyi @@ -1,33 +1,49 @@ from collections import UserDict -from collections.abc import Callable, Hashable, Mapping -from typing import Any +from collections.abc import Callable, Hashable, Iterable, Iterator +from typing import Any, TypeVar __all__ = ( "LRUCache", - "dictfilter", - "is_list", + "memoize", "lazy", "maybe_evaluate", + "is_list", "maybe_list", - "memoize", + "dictfilter", + "retry_over_time", ) -KEYWORD_MARK = object() +_T = TypeVar("_T") +_KT = TypeVar("_KT") +_VT = TypeVar("_VT") + +KEYWORD_MARK: object class ChannelPromise: def __init__(self, contract: Any) -> None: ... def __call__(self) -> Any: ... -class LRUCache(UserDict[str, Any]): ... +class LRUCache(UserDict[_KT, _VT]): + limit: int | None + + def __init__(self, limit: int | None = ...) -> None: ... + def incr(self, key: _KT, delta: int = ...) -> int: ... + def iteritems(self) -> Iterator[tuple[_KT, _VT]]: ... + def iterkeys(self) -> Iterator[_KT]: ... + def itervalues(self) -> Iterator[_VT]: ... + def popitem(self, last: bool = ...) -> tuple[_KT, _VT]: ... def memoize( - maxsize: int | None = None, - keyfun: Callable[..., Any] | None = None, - Cache: type[Mapping[Hashable, Any]] = ..., -) -> Callable[..., Callable[..., Any]]: ... + maxsize: int | None = ..., + keyfun: Callable[..., Any] | None = ..., + Cache: type[LRUCache[Any, Any]] = ..., +) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ... class lazy: def __init__(self, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... + def __call__(self) -> Any: ... + def __deepcopy__(self, memo: dict[int, Any]) -> lazy: ... + def evaluate(self) -> Any: ... def maybe_evaluate(value: Any) -> Any: ... def is_list( @@ -37,8 +53,21 @@ def is_list( ) -> bool: ... def maybe_list(obj: Any, scalars: tuple[type[Any], ...] = ...) -> list[Any]: ... def dictfilter( - d: dict[Hashable, Any] | None = None, **kw: Any + d: dict[Hashable, Any] | None = ..., **kw: Any ) -> dict[Hashable, Any]: ... +def retry_over_time( + fun: Callable[..., _T], + catch: type[BaseException] | tuple[type[BaseException], ...], + args: Iterable[Any] | None = ..., + kwargs: dict[str, Any] | None = ..., + errback: Callable[[BaseException, float], None] | None = ..., + max_retries: int | None = ..., + interval_start: float = ..., + interval_step: float = ..., + interval_max: float = ..., + callback: Callable[[], None] | None = ..., + timeout: float | None = ..., +) -> _T: ... promise = lazy maybe_promise = maybe_evaluate diff --git a/kombu-stubs/utils/limits.pyi b/kombu-stubs/utils/limits.pyi index 0d9590d..fdd83b5 100644 --- a/kombu-stubs/utils/limits.pyi +++ b/kombu-stubs/utils/limits.pyi @@ -1 +1,15 @@ -class TokenBucket: ... +from typing import Any + +__all__ = ("TokenBucket",) + +class TokenBucket: + fill_rate: float | None + capacity: int + timestamp: float | None + + def __init__(self, fill_rate: float, capacity: int = ...) -> None: ... + def add(self, item: Any) -> None: ... + def pop(self) -> Any: ... + def clear_pending(self) -> None: ... + def can_consume(self, tokens: int = ...) -> bool: ... + def expected_time(self, tokens: int = ...) -> float: ... From eb7e3f68a931373c96aac78cdd9d527a9ad9eea1 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 1 Jan 2026 18:36:59 +0100 Subject: [PATCH 04/24] Add reprkwargs to kombu.utils stub kombu.utils.__all__ includes reprkwargs but forgot to import it from kombu.utils.functional. The stub correctly re-exports it, fixing what kombu intended but failed to do. --- kombu-stubs/utils/__init__.pyi | 3 +++ kombu-stubs/utils/functional.pyi | 3 +++ 2 files changed, 6 insertions(+) diff --git a/kombu-stubs/utils/__init__.pyi b/kombu-stubs/utils/__init__.pyi index 929e75b..aef543d 100644 --- a/kombu-stubs/utils/__init__.pyi +++ b/kombu-stubs/utils/__init__.pyi @@ -3,9 +3,11 @@ from contextlib import contextmanager from typing import Any, BinaryIO, TextIO, TypeVar from uuid import UUID +from kombu.utils.functional import reprkwargs as reprkwargs from kombu.utils.functional import retry_over_time as retry_over_time from kombu.utils.objects import cached_property as cached_property +# Note: runtime __all__ includes reprkwargs but it's not actually exported (kombu bug) __all__ = ( "EqualityDict", "uuid", @@ -16,6 +18,7 @@ __all__ = ( "emergency_dump_state", "cached_property", "register_after_fork", + "reprkwargs", "reprcall", "symbol_by_name", "nested", diff --git a/kombu-stubs/utils/functional.pyi b/kombu-stubs/utils/functional.pyi index de5a2cb..2414844 100644 --- a/kombu-stubs/utils/functional.pyi +++ b/kombu-stubs/utils/functional.pyi @@ -68,6 +68,9 @@ def retry_over_time( callback: Callable[[], None] | None = ..., timeout: float | None = ..., ) -> _T: ... +def reprkwargs( + kwargs: dict[str, Any], sep: str = ..., fmt: str = ... +) -> str: ... promise = lazy maybe_promise = maybe_evaluate From 28a69e14991d2c5e7237e4078289838d3583e9ae Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 1 Jan 2026 19:00:45 +0100 Subject: [PATCH 05/24] Add comprehensive stubs for amqp and kombu modules AMQP (0 stubtest errors): - abstract_channel: AbstractChannel base class - method_framing: frame_handler/frame_writer functions - platform: LINUX_VERSION, SOL_TCP, KNOWN_TCP_OPTS - protocol: basic_return_t, queue_declare_ok_t namedtuples - sasl: SASL, PLAIN, AMQPLAIN, EXTERNAL, RAW, GSSAPI classes - serialization: GenericContent, Basic, dumps/loads functions - spec: Connection, Channel, Exchange, Queue, Basic, Tx, Confirm specs - transport: TCPTransport, SSLTransport, Transport factory - utils: promise, NullHandler, utility functions KOMBU (new module stubs): - asynchronous: Hub, Timer, Entry, semaphores, http client - clocks: LamportClock, timetuple - common: Broadcast, QoS, maybe_declare, eventloop, etc. - compat: Publisher, Consumer, ConsumerSet compatibility - compression: register, compress, decompress - log: LogMixin, Log, setup_logging - matcher: MatcherRegistry, match functions - transport backends: pyamqp, memory, redis, SQS, etc. - utils submodules: encoding, url, text, time, imports, debug, div, compat, collections, amq_manager, eventio 10 transport modules fail to import due to optional dependencies (botocore, azure, google, pymongo, etc.) - expected behavior. --- amqp-stubs/abstract_channel.pyi | 49 ++++++++ amqp-stubs/method_framing.pyi | 29 +++++ amqp-stubs/platform.pyi | 8 ++ amqp-stubs/protocol.pyi | 13 +++ amqp-stubs/sasl.pyi | 50 +++++++++ amqp-stubs/serialization.pyi | 36 ++++++ amqp-stubs/spec.pyi | 93 +++++++++++++++ amqp-stubs/transport.pyi | 67 +++++++++++ amqp-stubs/utils.pyi | 17 +++ kombu-stubs/asynchronous/__init__.pyi | 9 ++ kombu-stubs/asynchronous/aws.pyi | 4 + kombu-stubs/asynchronous/debug.pyi | 6 + kombu-stubs/asynchronous/http/__init__.pyi | 7 ++ kombu-stubs/asynchronous/http/base.pyi | 55 +++++++++ kombu-stubs/asynchronous/http/curl.pyi | 6 + kombu-stubs/asynchronous/hub.pyi | 53 +++++++++ kombu-stubs/asynchronous/semaphore.pyi | 23 ++++ kombu-stubs/asynchronous/timer.pyi | 72 ++++++++++++ kombu-stubs/clocks.pyi | 20 ++++ kombu-stubs/common.pyi | 106 ++++++++++++++++++ kombu-stubs/compat.pyi | 20 ++++ kombu-stubs/compression.pyi | 23 ++++ kombu-stubs/log.pyi | 27 +++++ kombu-stubs/matcher.pyi | 27 +++++ kombu-stubs/transport/SLMQ.pyi | 11 ++ kombu-stubs/transport/SQS.pyi | 11 ++ kombu-stubs/transport/azureservicebus.pyi | 11 ++ kombu-stubs/transport/azurestoragequeues.pyi | 11 ++ kombu-stubs/transport/confluentkafka.pyi | 11 ++ kombu-stubs/transport/consul.pyi | 11 ++ kombu-stubs/transport/etcd.pyi | 11 ++ kombu-stubs/transport/filesystem.pyi | 11 ++ kombu-stubs/transport/gcpubsub.pyi | 11 ++ kombu-stubs/transport/librabbitmq.pyi | 11 ++ kombu-stubs/transport/memory.pyi | 12 ++ kombu-stubs/transport/mongodb.pyi | 11 ++ .../transport/native_delayed_delivery.pyi | 11 ++ kombu-stubs/transport/pyamqp.pyi | 16 +++ kombu-stubs/transport/pyro.pyi | 11 ++ kombu-stubs/transport/qpid.pyi | 11 ++ kombu-stubs/transport/redis.pyi | 11 ++ kombu-stubs/transport/sqlalchemy.pyi | 11 ++ kombu-stubs/transport/zookeeper.pyi | 11 ++ kombu-stubs/utils/amq_manager.pyi | 9 ++ kombu-stubs/utils/collections.pyi | 12 ++ kombu-stubs/utils/compat.pyi | 21 ++++ kombu-stubs/utils/debug.pyi | 18 +++ kombu-stubs/utils/div.pyi | 10 ++ kombu-stubs/utils/encoding.pyi | 14 +++ kombu-stubs/utils/eventio.pyi | 8 ++ kombu-stubs/utils/imports.pyi | 19 ++++ kombu-stubs/utils/text.pyi | 18 +++ kombu-stubs/utils/time.pyi | 3 + kombu-stubs/utils/url.pyi | 31 +++++ 54 files changed, 1198 insertions(+) create mode 100644 amqp-stubs/abstract_channel.pyi create mode 100644 amqp-stubs/method_framing.pyi create mode 100644 amqp-stubs/platform.pyi create mode 100644 amqp-stubs/protocol.pyi create mode 100644 amqp-stubs/sasl.pyi create mode 100644 amqp-stubs/serialization.pyi create mode 100644 amqp-stubs/spec.pyi create mode 100644 amqp-stubs/transport.pyi create mode 100644 amqp-stubs/utils.pyi create mode 100644 kombu-stubs/asynchronous/__init__.pyi create mode 100644 kombu-stubs/asynchronous/aws.pyi create mode 100644 kombu-stubs/asynchronous/debug.pyi create mode 100644 kombu-stubs/asynchronous/http/__init__.pyi create mode 100644 kombu-stubs/asynchronous/http/base.pyi create mode 100644 kombu-stubs/asynchronous/http/curl.pyi create mode 100644 kombu-stubs/asynchronous/hub.pyi create mode 100644 kombu-stubs/asynchronous/semaphore.pyi create mode 100644 kombu-stubs/asynchronous/timer.pyi create mode 100644 kombu-stubs/clocks.pyi create mode 100644 kombu-stubs/common.pyi create mode 100644 kombu-stubs/compat.pyi create mode 100644 kombu-stubs/compression.pyi create mode 100644 kombu-stubs/log.pyi create mode 100644 kombu-stubs/matcher.pyi create mode 100644 kombu-stubs/transport/SLMQ.pyi create mode 100644 kombu-stubs/transport/SQS.pyi create mode 100644 kombu-stubs/transport/azureservicebus.pyi create mode 100644 kombu-stubs/transport/azurestoragequeues.pyi create mode 100644 kombu-stubs/transport/confluentkafka.pyi create mode 100644 kombu-stubs/transport/consul.pyi create mode 100644 kombu-stubs/transport/etcd.pyi create mode 100644 kombu-stubs/transport/filesystem.pyi create mode 100644 kombu-stubs/transport/gcpubsub.pyi create mode 100644 kombu-stubs/transport/librabbitmq.pyi create mode 100644 kombu-stubs/transport/memory.pyi create mode 100644 kombu-stubs/transport/mongodb.pyi create mode 100644 kombu-stubs/transport/native_delayed_delivery.pyi create mode 100644 kombu-stubs/transport/pyamqp.pyi create mode 100644 kombu-stubs/transport/pyro.pyi create mode 100644 kombu-stubs/transport/qpid.pyi create mode 100644 kombu-stubs/transport/redis.pyi create mode 100644 kombu-stubs/transport/sqlalchemy.pyi create mode 100644 kombu-stubs/transport/zookeeper.pyi create mode 100644 kombu-stubs/utils/amq_manager.pyi create mode 100644 kombu-stubs/utils/collections.pyi create mode 100644 kombu-stubs/utils/compat.pyi create mode 100644 kombu-stubs/utils/debug.pyi create mode 100644 kombu-stubs/utils/div.pyi create mode 100644 kombu-stubs/utils/encoding.pyi create mode 100644 kombu-stubs/utils/eventio.pyi create mode 100644 kombu-stubs/utils/imports.pyi create mode 100644 kombu-stubs/utils/text.pyi create mode 100644 kombu-stubs/utils/time.pyi create mode 100644 kombu-stubs/utils/url.pyi diff --git a/amqp-stubs/abstract_channel.pyi b/amqp-stubs/abstract_channel.pyi new file mode 100644 index 0000000..8dc1a29 --- /dev/null +++ b/amqp-stubs/abstract_channel.pyi @@ -0,0 +1,49 @@ +from collections.abc import Callable +from logging import Logger +from typing import Any + +from vine import promise + +from amqp.exceptions import AMQPNotImplementedError as AMQPNotImplementedError +from amqp.exceptions import RecoverableConnectionError as RecoverableConnectionError + +__all__ = ("AbstractChannel",) + +AMQP_LOGGER: Logger +IGNORED_METHOD_DURING_CHANNEL_CLOSE: str + +class AbstractChannel: + auto_decode: bool + channel_id: int | None + connection: Any + is_closing: bool + method_queue: list[Any] + + def __init__(self, connection: Any, channel_id: int | None) -> None: ... + def __enter__(self) -> AbstractChannel: ... + def __exit__(self, *args: Any) -> None: ... + def close(self) -> None: ... + def dispatch_method( + self, method_sig: tuple[int, int], payload: bytes, content: Any + ) -> None: ... + def send_method( + self, + sig: tuple[int, int], + format: str | None = ..., + args: tuple[Any, ...] | None = ..., + content: Any | None = ..., + wait: Any | None = ..., + callback: Callable[..., Any] | None = ..., + returns_tuple: bool = ..., + ) -> Any: ... + def wait( + self, + method: Any, + callback: Callable[..., Any] | None = ..., + timeout: float | None = ..., + returns_tuple: bool = ..., + ) -> Any: ... + +def dumps(format: str, values: tuple[Any, ...]) -> bytes: ... +def loads(format: str, buf: bytes, offset: int) -> tuple[Any, ...]: ... +def ensure_promise(p: promise | Callable[..., Any] | None) -> promise: ... diff --git a/amqp-stubs/method_framing.pyi b/amqp-stubs/method_framing.pyi new file mode 100644 index 0000000..e10c4fe --- /dev/null +++ b/amqp-stubs/method_framing.pyi @@ -0,0 +1,29 @@ +from collections.abc import Callable +from io import BytesIO as Buffer +from typing import Any + +from amqp.basic_message import Message as Message +from amqp.exceptions import UnexpectedFrame as UnexpectedFrame + +__all__ = ("frame_handler", "frame_writer") + +FRAME_OVERHEAD: int + +def frame_handler( + connection: Any, + callback: Callable[..., Any], + unpack_from: Callable[..., tuple[Any, ...]] = ..., + content_methods: frozenset[tuple[int, int]] = ..., +) -> Callable[..., Any]: ... +def frame_writer( + connection: Any, + transport: Any, + pack: Callable[..., bytes] = ..., + pack_into: Callable[..., None] = ..., + range: type[range] = ..., + len: Callable[[Any], int] = ..., + bytes: type[bytes] = ..., + str_to_bytes: Callable[[str], bytes] = ..., + text_t: type[str] = ..., +) -> Callable[..., Any]: ... +def str_to_bytes(s: str) -> bytes: ... diff --git a/amqp-stubs/platform.pyi b/amqp-stubs/platform.pyi new file mode 100644 index 0000000..02ca76a --- /dev/null +++ b/amqp-stubs/platform.pyi @@ -0,0 +1,8 @@ +import re + +__all__ = ("LINUX_VERSION", "SOL_TCP", "KNOWN_TCP_OPTS") + +LINUX_VERSION: tuple[int, int, int] +SOL_TCP: int +KNOWN_TCP_OPTS: set[str] +RE_NUM: re.Pattern[str] diff --git a/amqp-stubs/protocol.pyi b/amqp-stubs/protocol.pyi new file mode 100644 index 0000000..628660a --- /dev/null +++ b/amqp-stubs/protocol.pyi @@ -0,0 +1,13 @@ +from typing import Any, NamedTuple + +class basic_return_t(NamedTuple): + reply_code: int + reply_text: str + exchange: str + routing_key: str + message: Any + +class queue_declare_ok_t(NamedTuple): + queue: str + message_count: int + consumer_count: int diff --git a/amqp-stubs/sasl.pyi b/amqp-stubs/sasl.pyi new file mode 100644 index 0000000..33e933d --- /dev/null +++ b/amqp-stubs/sasl.pyi @@ -0,0 +1,50 @@ +from typing import Any + +class SASL: + @property + def mechanism(self) -> bytes | None: ... + def start(self, connection: Any) -> bytes | None: ... + +class PLAIN(SASL): + mechanism: bytes + username: str + password: str + + def __init__(self, username: str, password: str) -> None: ... + def start(self, connection: Any) -> bytes: ... + +class AMQPLAIN(SASL): + mechanism: bytes + username: str + password: str + + def __init__(self, username: str, password: str) -> None: ... + def start(self, connection: Any) -> bytes: ... + +class EXTERNAL(SASL): + mechanism: bytes + + def start(self, connection: Any) -> bytes: ... + +class RAW(SASL): + mechanism: bytes | None + response: bytes | None + + def __init__(self, mechanism: bytes | None, response: bytes | None) -> None: ... + def start(self, connection: Any) -> bytes | None: ... + +class GSSAPI(SASL): + mechanism: bytes | None + client_name: str | None + service: bytes + rdns: bool + fail_soft: bool + + def __init__( + self, + client_name: str | None = ..., + service: bytes = ..., + rdns: bool = ..., + fail_soft: bool = ..., + ) -> None: ... + def start(self) -> bytes | None: ... # type: ignore[override] diff --git a/amqp-stubs/serialization.pyi b/amqp-stubs/serialization.pyi new file mode 100644 index 0000000..2faa54d --- /dev/null +++ b/amqp-stubs/serialization.pyi @@ -0,0 +1,36 @@ +from decimal import Decimal as Decimal +from typing import Any + +from amqp.exceptions import FrameSyntaxError as FrameSyntaxError +from amqp.spec import Basic as Basic + +ILLEGAL_TABLE_TYPE: str +ILLEGAL_TABLE_TYPE_WITH_KEY: str +ILLEGAL_TABLE_TYPE_WITH_VALUE: str +PROPERTY_CLASSES: dict[int, type[Any]] + +class GenericContent: + CLASS_ID: int | None + PROPERTIES: list[tuple[str, str]] + + body_size: int + body_received: int + properties: dict[str, Any] + ready: bool + frame_method: tuple[int, int] | None + frame_args: bytes | None + + def __init__( + self, + frame_method: tuple[int, int] | None = ..., + frame_args: bytes | None = ..., + **props: Any, + ) -> None: ... + def inbound_header(self, buf: bytes, offset: int = ...) -> None: ... + def inbound_body(self, buf: bytes) -> None: ... + +def dumps(format: str, values: tuple[Any, ...]) -> bytes: ... +def loads(format: str, buf: bytes, offset: int) -> tuple[Any, ...]: ... +def decode_properties_basic(buf: bytes, offset: int) -> tuple[dict[str, Any], int]: ... +def pstr_t(s: str) -> bytes: ... +def str_to_bytes(s: str) -> bytes: ... diff --git a/amqp-stubs/spec.pyi b/amqp-stubs/spec.pyi new file mode 100644 index 0000000..eaa45a0 --- /dev/null +++ b/amqp-stubs/spec.pyi @@ -0,0 +1,93 @@ +from typing import NamedTuple + +class method_t(NamedTuple): + method_sig: tuple[int, int] + args: str | None + content: bool + +def method( + method_sig: tuple[int, int], args: str | None = ..., content: bool = ... +) -> method_t: ... + +class Connection: + CLASS_ID: int + Start: tuple[int, int] + StartOk: tuple[int, int] + Secure: tuple[int, int] + SecureOk: tuple[int, int] + Tune: tuple[int, int] + TuneOk: tuple[int, int] + Open: tuple[int, int] + OpenOk: tuple[int, int] + Close: tuple[int, int] + CloseOk: tuple[int, int] + Blocked: tuple[int, int] + Unblocked: tuple[int, int] + +class Channel: + CLASS_ID: int + Open: tuple[int, int] + OpenOk: tuple[int, int] + Flow: tuple[int, int] + FlowOk: tuple[int, int] + Close: tuple[int, int] + CloseOk: tuple[int, int] + +class Exchange: + CLASS_ID: int + Declare: tuple[int, int] + DeclareOk: tuple[int, int] + Delete: tuple[int, int] + DeleteOk: tuple[int, int] + Bind: tuple[int, int] + BindOk: tuple[int, int] + Unbind: tuple[int, int] + UnbindOk: tuple[int, int] + +class Queue: + CLASS_ID: int + Declare: tuple[int, int] + DeclareOk: tuple[int, int] + Bind: tuple[int, int] + BindOk: tuple[int, int] + Unbind: tuple[int, int] + UnbindOk: tuple[int, int] + Purge: tuple[int, int] + PurgeOk: tuple[int, int] + Delete: tuple[int, int] + DeleteOk: tuple[int, int] + +class Basic: + CLASS_ID: int + Qos: tuple[int, int] + QosOk: tuple[int, int] + Consume: tuple[int, int] + ConsumeOk: tuple[int, int] + Cancel: tuple[int, int] + CancelOk: tuple[int, int] + Publish: tuple[int, int] + Return: tuple[int, int] + Deliver: tuple[int, int] + Get: tuple[int, int] + GetOk: tuple[int, int] + GetEmpty: tuple[int, int] + Ack: tuple[int, int] + Reject: tuple[int, int] + RecoverAsync: tuple[int, int] + Recover: tuple[int, int] + RecoverOk: tuple[int, int] + Nack: tuple[int, int] + +class Tx: + CLASS_ID: int + Select: tuple[int, int] + SelectOk: tuple[int, int] + Commit: tuple[int, int] + CommitOk: tuple[int, int] + Rollback: tuple[int, int] + RollbackOk: tuple[int, int] + +class Confirm: + CLASS_ID: int + Select: tuple[int, int] + SelectOk: tuple[int, int] diff --git a/amqp-stubs/transport.pyi b/amqp-stubs/transport.pyi new file mode 100644 index 0000000..06a075a --- /dev/null +++ b/amqp-stubs/transport.pyi @@ -0,0 +1,67 @@ +import re +from collections.abc import Callable, Mapping +from contextlib import contextmanager +from socket import socket +from ssl import SSLError as SSLError +from typing import Any, Generator + +from amqp.exceptions import UnexpectedFrame as UnexpectedFrame + +AMQP_PORT: int +AMQP_PROTOCOL_HEADER: bytes +DEFAULT_SOCKET_SETTINGS: dict[str, Any] +EMPTY_BUFFER: bytes +IPV6_LITERAL: re.Pattern[str] +KNOWN_TCP_OPTS: set[str] +SIGNED_INT_MAX: int +SOL_TCP: int + +class TCPTransport: + host: str + port: int + connect_timeout: float | None + read_timeout: float | None + write_timeout: float | None + socket_settings: Mapping[str, Any] | None + sock: socket | None + connection: Any + raise_on_initial_eintr: bool + + def __init__( + self, + host: str, + connect_timeout: float | None = ..., + read_timeout: float | None = ..., + write_timeout: float | None = ..., + socket_settings: Mapping[str, Any] | None = ..., + raise_on_initial_eintr: bool = ..., + **kwargs: Any, + ) -> None: ... + def connect(self) -> None: ... + def close(self) -> None: ... + def read_frame( + self, unpack: Callable[[str, bytes], tuple[Any, ...]] = ... + ) -> tuple[int, int, bytes]: ... + def write(self, s: bytes) -> None: ... + @contextmanager + def having_timeout(self, timeout: float | None) -> Generator[None, None, None]: ... + +class SSLTransport(TCPTransport): + sslopts: dict[str, Any] | bool | None + + def __init__( + self, + host: str, + connect_timeout: float | None = ..., + ssl: bool | dict[str, Any] | None = ..., + **kwargs: Any, + ) -> None: ... + +def Transport( + host: str, + connect_timeout: float | None = ..., + ssl: bool | dict[str, Any] = ..., + **kwargs: Any, +) -> TCPTransport | SSLTransport: ... +def to_host_port(host: str, default: int = ...) -> tuple[str, int]: ... +def set_cloexec(fd: int, cloexec: bool) -> None: ... diff --git a/amqp-stubs/utils.pyi b/amqp-stubs/utils.pyi new file mode 100644 index 0000000..e16bd60 --- /dev/null +++ b/amqp-stubs/utils.pyi @@ -0,0 +1,17 @@ +from collections.abc import Callable, Generator +from logging import Handler, Logger +from typing import Any, TypeVar + +from amqp import promise as promise + +_T = TypeVar("_T") +_F = TypeVar("_F", bound=Callable[..., Any]) + +class NullHandler(Handler): + def emit(self, record: Any) -> None: ... + +def bytes_to_str(s: bytes | str) -> str: ... +def str_to_bytes(s: str | bytes) -> bytes: ... +def get_logger(logger: Logger | str) -> Logger: ... +def set_cloexec(fd: int, cloexec: bool) -> None: ... +def coro(gen: Callable[..., Generator[_T, Any, Any]]) -> Callable[..., _T]: ... diff --git a/kombu-stubs/asynchronous/__init__.pyi b/kombu-stubs/asynchronous/__init__.pyi new file mode 100644 index 0000000..4c01560 --- /dev/null +++ b/kombu-stubs/asynchronous/__init__.pyi @@ -0,0 +1,9 @@ +from kombu.asynchronous.hub import Hub as Hub +from kombu.asynchronous.hub import get_event_loop as get_event_loop +from kombu.asynchronous.hub import set_event_loop as set_event_loop + +__all__ = ("READ", "WRITE", "ERR", "Hub", "get_event_loop", "set_event_loop") + +READ: int +WRITE: int +ERR: int diff --git a/kombu-stubs/asynchronous/aws.pyi b/kombu-stubs/asynchronous/aws.pyi new file mode 100644 index 0000000..10629d4 --- /dev/null +++ b/kombu-stubs/asynchronous/aws.pyi @@ -0,0 +1,4 @@ +from typing import Any + +class AsyncConnection: + def __init__(self, *args: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/asynchronous/debug.pyi b/kombu-stubs/asynchronous/debug.pyi new file mode 100644 index 0000000..de2d1ad --- /dev/null +++ b/kombu-stubs/asynchronous/debug.pyi @@ -0,0 +1,6 @@ +from kombu.asynchronous.hub import Hub + +def callback_for(h: Hub, fd: int, flag: int) -> str: ... +def repr_flag(flag: int) -> str: ... +def repr_active(h: Hub) -> str: ... +def repr_events(h: Hub, events: list[tuple[int, int]]) -> str: ... diff --git a/kombu-stubs/asynchronous/http/__init__.pyi b/kombu-stubs/asynchronous/http/__init__.pyi new file mode 100644 index 0000000..0e38dbb --- /dev/null +++ b/kombu-stubs/asynchronous/http/__init__.pyi @@ -0,0 +1,7 @@ +from typing import Any + +from kombu.asynchronous.http.base import Headers as Headers +from kombu.asynchronous.http.base import Request as Request +from kombu.asynchronous.http.base import Response as Response + +def get_client(hub: Any = ..., **kwargs: Any) -> Any: ... diff --git a/kombu-stubs/asynchronous/http/base.pyi b/kombu-stubs/asynchronous/http/base.pyi new file mode 100644 index 0000000..4728189 --- /dev/null +++ b/kombu-stubs/asynchronous/http/base.pyi @@ -0,0 +1,55 @@ +from collections.abc import Callable, Mapping +from typing import Any + +class Headers(dict[str, str]): + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + +class Request: + url: str + method: str + headers: Headers + body: bytes | None + connect_timeout: float | None + request_timeout: float | None + on_ready: Callable[[Response], None] | None + + def __init__( + self, + url: str, + method: str = ..., + on_ready: Callable[[Response], None] | None = ..., + on_timeout: Callable[[], None] | None = ..., + on_stream: Callable[[bytes], None] | None = ..., + headers: Mapping[str, str] | None = ..., + body: bytes | str | None = ..., + connect_timeout: float | None = ..., + request_timeout: float | None = ..., + **kwargs: Any, + ) -> None: ... + def then(self, callback: Callable[[Response], None]) -> Request: ... + +class Response: + request: Request + code: int + headers: Headers + body: bytes | None + effective_url: str + error: Exception | None + + def __init__( + self, + request: Request, + code: int, + headers: Headers | None = ..., + body: bytes | None = ..., + effective_url: str | None = ..., + error: Exception | None = ..., + ) -> None: ... + def raise_for_error(self) -> None: ... + +class BaseClient: + hub: Any + + def __init__(self, hub: Any = ..., **kwargs: Any) -> None: ... + def add_request(self, request: Request) -> Request: ... + def close(self) -> None: ... diff --git a/kombu-stubs/asynchronous/http/curl.pyi b/kombu-stubs/asynchronous/http/curl.pyi new file mode 100644 index 0000000..592d5b0 --- /dev/null +++ b/kombu-stubs/asynchronous/http/curl.pyi @@ -0,0 +1,6 @@ +from typing import Any + +from kombu.asynchronous.http.base import BaseClient + +class CurlClient(BaseClient): + def __init__(self, hub: Any = ..., **kwargs: Any) -> None: ... diff --git a/kombu-stubs/asynchronous/hub.pyi b/kombu-stubs/asynchronous/hub.pyi new file mode 100644 index 0000000..fc64592 --- /dev/null +++ b/kombu-stubs/asynchronous/hub.pyi @@ -0,0 +1,53 @@ +from collections.abc import Callable, Generator +from typing import Any + +from kombu.asynchronous.timer import Timer + +__all__ = ("Hub", "get_event_loop", "set_event_loop") + +class Hub: + timer: Timer + readers: dict[int, Callable[..., Any]] + writers: dict[int, Callable[..., Any]] + on_tick: list[Callable[..., Any]] + on_close: list[Callable[..., Any]] | None + + def __init__(self, timer: Timer | None = ...) -> None: ... + def __enter__(self) -> Hub: ... + def __exit__(self, *exc_info: Any) -> None: ... + def add( + self, + fd: int | Any, + callback: Callable[..., Any], + flags: int, + args: tuple[Any, ...] = ..., + consolidate: bool = ..., + ) -> None: ... + def add_reader( + self, fd: int | Any, callback: Callable[..., Any], *args: Any + ) -> None: ... + def add_writer( + self, fd: int | Any, callback: Callable[..., Any], *args: Any + ) -> None: ... + def remove(self, fd: int | Any) -> None: ... + def remove_reader(self, fd: int | Any) -> None: ... + def remove_writer(self, fd: int | Any) -> None: ... + def run_forever(self) -> None: ... + def run_once(self, timeout: float | None = ...) -> None: ... + def call_soon(self, callback: Callable[..., Any], *args: Any) -> Any: ... + def call_later( + self, delay: float, callback: Callable[..., Any], *args: Any + ) -> Any: ... + def call_at( + self, when: float, callback: Callable[..., Any], *args: Any + ) -> Any: ... + def call_repeatedly( + self, interval: float, callback: Callable[..., Any], *args: Any + ) -> Any: ... + def close(self) -> None: ... + def stop(self) -> None: ... + def fire_timers(self, min_delay: float = ..., max_delay: float = ...) -> float: ... + def create_loop(self) -> Generator[None, None, None]: ... + +def get_event_loop() -> Hub | None: ... +def set_event_loop(loop: Hub | None) -> Hub | None: ... diff --git a/kombu-stubs/asynchronous/semaphore.pyi b/kombu-stubs/asynchronous/semaphore.pyi new file mode 100644 index 0000000..f9af95a --- /dev/null +++ b/kombu-stubs/asynchronous/semaphore.pyi @@ -0,0 +1,23 @@ +from collections.abc import Callable +from typing import Any + +__all__ = ("DummyLock", "LaxBoundedSemaphore") + +class DummyLock: + def __enter__(self) -> DummyLock: ... + def __exit__(self, *exc_info: Any) -> None: ... + def acquire(self) -> bool: ... + def release(self) -> None: ... + +class LaxBoundedSemaphore: + initial_value: int + value: int + + def __init__(self, value: int) -> None: ... + def acquire( + self, callback: Callable[..., Any], *partial_args: Any, **partial_kwargs: Any + ) -> bool: ... + def release(self) -> None: ... + def grow(self, n: int = ...) -> None: ... + def shrink(self, n: int = ...) -> None: ... + def clear(self) -> None: ... diff --git a/kombu-stubs/asynchronous/timer.pyi b/kombu-stubs/asynchronous/timer.pyi new file mode 100644 index 0000000..08cba01 --- /dev/null +++ b/kombu-stubs/asynchronous/timer.pyi @@ -0,0 +1,72 @@ +from collections.abc import Callable +from datetime import datetime +from typing import Any, NamedTuple +from zoneinfo import ZoneInfo + +__all__ = ("Entry", "Timer", "to_timestamp") + +class scheduled(NamedTuple): + eta: float + priority: int + entry: Entry + +class Entry: + fun: Callable[..., Any] + args: tuple[Any, ...] + kwargs: dict[str, Any] + tref: Any + cancelled: bool + + def __init__( + self, + fun: Callable[..., Any], + args: tuple[Any, ...] = ..., + kwargs: dict[str, Any] | None = ..., + ) -> None: ... + def __call__(self) -> Any: ... + def cancel(self) -> None: ... + +class Timer: + queue: list[scheduled] + on_error: Callable[[Exception], None] | None + + def __init__(self, on_error: Callable[[Exception], None] | None = ...) -> None: ... + def __len__(self) -> int: ... + def call_at( + self, + eta: float, + fun: Callable[..., Any], + args: tuple[Any, ...] = ..., + kwargs: dict[str, Any] | None = ..., + priority: int = ..., + ) -> Entry: ... + def call_after( + self, + secs: float, + fun: Callable[..., Any], + args: tuple[Any, ...] = ..., + kwargs: dict[str, Any] | None = ..., + priority: int = ..., + ) -> Entry: ... + def call_repeatedly( + self, + secs: float, + fun: Callable[..., Any], + args: tuple[Any, ...] = ..., + kwargs: dict[str, Any] | None = ..., + priority: int = ..., + ) -> Entry: ... + def apply_at(self, eta: float, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> Entry: ... + def apply_after(self, secs: float, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> Entry: ... + def apply_interval(self, secs: float, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> Entry: ... + def enter_at(self, entry: Entry, eta: float, priority: int = ...) -> Entry: ... + def enter_after(self, entry: Entry, secs: float, priority: int = ...) -> Entry: ... + def cancel(self, tref: Entry) -> None: ... + def clear(self) -> None: ... + def empty(self) -> bool: ... + +def to_timestamp( + d: datetime | float, + default_timezone: ZoneInfo = ..., + time: Callable[[], float] = ..., +) -> float: ... diff --git a/kombu-stubs/clocks.pyi b/kombu-stubs/clocks.pyi new file mode 100644 index 0000000..273b61d --- /dev/null +++ b/kombu-stubs/clocks.pyi @@ -0,0 +1,20 @@ +from threading import Lock +from typing import Any, NamedTuple + +__all__ = ("LamportClock", "timetuple") + +class timetuple(NamedTuple): + clock: int + timestamp: float + id: str + obj: Any + +class LamportClock: + counter: int + mutex: Lock + + def __init__(self, initial_value: int = ..., Lock: type[Lock] = ...) -> None: ... + def adjust(self, other: int) -> int: ... + def forward(self) -> int: ... + def sort_heap(self, h: list[timetuple]) -> list[timetuple]: ... + def __repr__(self) -> str: ... diff --git a/kombu-stubs/common.pyi b/kombu-stubs/common.pyi new file mode 100644 index 0000000..2bb7902 --- /dev/null +++ b/kombu-stubs/common.pyi @@ -0,0 +1,106 @@ +from collections.abc import Callable, Generator, Iterable +from typing import Any +from uuid import UUID + +from kombu.connection import Connection +from kombu.entity import Exchange, Queue +from kombu.messaging import Consumer, Producer +from kombu.transport.base import StdChannel + +__all__ = ( + "Broadcast", + "maybe_declare", + "uuid", + "itermessages", + "send_reply", + "collect_replies", + "insured", + "drain_consumer", + "eventloop", +) + +class Broadcast(Queue): + def __init__( + self, + name: str | None = ..., + queue: str | None = ..., + unique: bool = ..., + auto_delete: bool = ..., + exchange: Exchange | None = ..., + alias: str | None = ..., + **kwargs: Any, + ) -> None: ... + +class QoS: + channel: StdChannel + prev: int + value: int + + def __init__(self, callback: Callable[[int], None], initial_value: int = ...) -> None: ... + def update(self) -> int: ... + def decrement_eventually(self, n: int = ...) -> int: ... + def increment_eventually(self, n: int = ...) -> int: ... + def set(self, pcount: int) -> int: ... + +def maybe_declare( + entity: Any, channel: StdChannel | None = ..., retry: bool = ..., **retry_policy: Any +) -> bool: ... +def uuid(_uuid: Callable[[], UUID] = ...) -> str: ... +def itermessages( + conn: Connection, + channel: StdChannel, + queue: Queue, + limit: int = ..., + timeout: float | None = ..., + callbacks: Iterable[Callable[..., Any]] | None = ..., + **kwargs: Any, +) -> Generator[tuple[Any, Any], None, None]: ... +def send_reply( + exchange: Exchange, + req: Any, + msg: Any, + producer: Producer | None = ..., + retry: bool = ..., + retry_policy: dict[str, Any] | None = ..., + **props: Any, +) -> None: ... +def collect_replies( + conn: Connection, + channel: StdChannel, + queue: Queue, + *args: Any, + **kwargs: Any, +) -> Generator[Any, None, None]: ... +def insured( + pool: Any, + fun: Callable[..., Any], + args: tuple[Any, ...], + kwargs: dict[str, Any], + errback: Callable[..., Any] | None = ..., + on_revive: Callable[..., Any] | None = ..., + **opts: Any, +) -> Any: ... +def drain_consumer( + consumer: Consumer, + limit: int = ..., + timeout: float | None = ..., + callbacks: Iterable[Callable[..., Any]] | None = ..., +) -> Generator[tuple[Any, Any], None, None]: ... +def eventloop( + conn: Connection, + limit: int | None = ..., + timeout: float | None = ..., + ignore_timeouts: bool = ..., +) -> Generator[Any, None, None]: ... +def ignore_errors( + conn: Connection, fun: Callable[..., Any] | None = ..., *args: Any, **kwargs: Any +) -> Any: ... +def revive_connection( + connection: Connection, channel: StdChannel, on_revive: Callable[..., Any] | None = ... +) -> StdChannel: ... +def declaration_cached(entity: Any, channel: StdChannel) -> bool: ... +def oid_from(instance: Any, threads: bool = ...) -> str: ... +def get_node_id() -> str: ... +def generate_oid( + node_id: str, process_id: int, thread_id: int, instance: Any +) -> str: ... diff --git a/kombu-stubs/compat.pyi b/kombu-stubs/compat.pyi new file mode 100644 index 0000000..545f8fe --- /dev/null +++ b/kombu-stubs/compat.pyi @@ -0,0 +1,20 @@ +from typing import Any + +from kombu.entity import Exchange, Queue +from kombu.messaging import Consumer as _Consumer +from kombu.messaging import Producer + +__all__ = ("Publisher", "Consumer") + +class Publisher(Producer): ... + +class Consumer(_Consumer): ... + +class ConsumerSet: + def __init__(self, connection: Any, *args: Any, **kwargs: Any) -> None: ... + def add_consumer(self, consumer: _Consumer) -> None: ... + def iterconsume(self, limit: int | None = ..., no_ack: bool = ...) -> Any: ... + def discard_all(self) -> int: ... + def close(self) -> None: ... + +def entry_to_queue(queue: str, **options: Any) -> Queue: ... diff --git a/kombu-stubs/compression.pyi b/kombu-stubs/compression.pyi new file mode 100644 index 0000000..fddeed0 --- /dev/null +++ b/kombu-stubs/compression.pyi @@ -0,0 +1,23 @@ +from collections.abc import Callable, Iterable +from typing import Any + +__all__ = ( + "register", + "encoders", + "get_encoder", + "get_decoder", + "compress", + "decompress", +) + +def register( + encoder: Callable[[bytes], bytes], + decoder: Callable[[bytes], bytes], + content_type: str, + aliases: Iterable[str] | None = ..., +) -> None: ... +def encoders() -> list[str]: ... +def get_encoder(t: str) -> Callable[[bytes], bytes]: ... +def get_decoder(t: str) -> Callable[[bytes], bytes]: ... +def compress(body: bytes, content_type: str) -> tuple[bytes, str]: ... +def decompress(body: bytes, content_type: str) -> bytes: ... diff --git a/kombu-stubs/log.pyi b/kombu-stubs/log.pyi new file mode 100644 index 0000000..fed58c3 --- /dev/null +++ b/kombu-stubs/log.pyi @@ -0,0 +1,27 @@ +from logging import Handler, Logger +from typing import Any + +__all__ = ("LogMixin", "LOG_LEVELS", "get_loglevel", "setup_logging") + +LOG_LEVELS: dict[str, int] + +class Log: + logger: Logger + _logger: Logger | None + + def __init__(self, name: str | None = ..., logger: Logger | None = ...) -> None: ... + def debug(self, *args: Any, **kwargs: Any) -> None: ... + def info(self, *args: Any, **kwargs: Any) -> None: ... + def warning(self, *args: Any, **kwargs: Any) -> None: ... + def error(self, *args: Any, **kwargs: Any) -> None: ... + def critical(self, *args: Any, **kwargs: Any) -> None: ... + +class LogMixin: + @property + def logger(self) -> Logger: ... + +def get_loglevel(level: str | int) -> int: ... +def setup_logging( + loglevel: int | str | None = ..., logfile: str | None = ... +) -> None: ... +def get_logger(logger: str | Logger) -> Logger: ... diff --git a/kombu-stubs/matcher.pyi b/kombu-stubs/matcher.pyi new file mode 100644 index 0000000..4bd08c5 --- /dev/null +++ b/kombu-stubs/matcher.pyi @@ -0,0 +1,27 @@ +from collections.abc import Callable +from typing import Any + +class MatcherNotInstalled(Exception): ... + +class MatcherRegistry: + def __init__(self) -> None: ... + def register(self, name: str, matcher: Callable[..., bool]) -> None: ... + def unregister(self, name: str) -> None: ... + def match( + self, + data: bytes, + pattern: bytes, + matcher: str | None = ..., + matcher_kwargs: dict[str, str] | None = ..., + ) -> bool: ... + +def match( + data: bytes, + pattern: bytes, + matcher: str | None = ..., + matcher_kwargs: dict[str, str] | None = ..., +) -> bool: ... +def register(name: str, matcher: Callable[..., bool]) -> None: ... +def unregister(name: str) -> None: ... +def register_glob() -> None: ... +def register_pcre() -> None: ... diff --git a/kombu-stubs/transport/SLMQ.pyi b/kombu-stubs/transport/SLMQ.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/SLMQ.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/SQS.pyi b/kombu-stubs/transport/SQS.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/SQS.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/azureservicebus.pyi b/kombu-stubs/transport/azureservicebus.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/azureservicebus.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/azurestoragequeues.pyi b/kombu-stubs/transport/azurestoragequeues.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/azurestoragequeues.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/confluentkafka.pyi b/kombu-stubs/transport/confluentkafka.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/confluentkafka.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/consul.pyi b/kombu-stubs/transport/consul.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/consul.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/etcd.pyi b/kombu-stubs/transport/etcd.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/etcd.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/filesystem.pyi b/kombu-stubs/transport/filesystem.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/filesystem.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/gcpubsub.pyi b/kombu-stubs/transport/gcpubsub.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/gcpubsub.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/librabbitmq.pyi b/kombu-stubs/transport/librabbitmq.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/librabbitmq.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/memory.pyi b/kombu-stubs/transport/memory.pyi new file mode 100644 index 0000000..3afd02f --- /dev/null +++ b/kombu-stubs/transport/memory.pyi @@ -0,0 +1,12 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + default_port: int | None + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/mongodb.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/native_delayed_delivery.pyi b/kombu-stubs/transport/native_delayed_delivery.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/native_delayed_delivery.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/pyamqp.pyi b/kombu-stubs/transport/pyamqp.pyi new file mode 100644 index 0000000..7973241 --- /dev/null +++ b/kombu-stubs/transport/pyamqp.pyi @@ -0,0 +1,16 @@ +from typing import Any + +from kombu.transport.base import Transport as BaseTransport + +class Transport(BaseTransport): + default_port: int + default_ssl_port: int + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] + +class Channel: + connection: Any + def __init__(self, connection: Any, channel_id: int | None = ...) -> None: ... + +class Connection: + def __init__(self, *args: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/pyro.pyi b/kombu-stubs/transport/pyro.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/pyro.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/qpid.pyi b/kombu-stubs/transport/qpid.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/qpid.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/redis.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/sqlalchemy.pyi b/kombu-stubs/transport/sqlalchemy.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/sqlalchemy.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/zookeeper.pyi b/kombu-stubs/transport/zookeeper.pyi new file mode 100644 index 0000000..f20d448 --- /dev/null +++ b/kombu-stubs/transport/zookeeper.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.transport.virtual import Transport as VirtualTransport + +class Transport(VirtualTransport): + driver_type: str + driver_name: str + +class Channel: + connection: Any + def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/utils/amq_manager.pyi b/kombu-stubs/utils/amq_manager.pyi new file mode 100644 index 0000000..3917fe1 --- /dev/null +++ b/kombu-stubs/utils/amq_manager.pyi @@ -0,0 +1,9 @@ +from typing import Any + +def get_manager( + client: Any, + hostname: str | None = ..., + port: int | None = ..., + userid: str | None = ..., + password: str | None = ..., +) -> Any: ... diff --git a/kombu-stubs/utils/collections.pyi b/kombu-stubs/utils/collections.pyi new file mode 100644 index 0000000..7bb1ffb --- /dev/null +++ b/kombu-stubs/utils/collections.pyi @@ -0,0 +1,12 @@ +from collections.abc import Hashable +from typing import Any + +class EqualityDict(dict[Any, Any]): ... + +class HashedSeq(list[Any]): + hashvalue: int + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def __hash__(self) -> int: ... # type: ignore[override] + +def eqhash(o: Any) -> Hashable: ... diff --git a/kombu-stubs/utils/compat.pyi b/kombu-stubs/utils/compat.pyi new file mode 100644 index 0000000..d701682 --- /dev/null +++ b/kombu-stubs/utils/compat.pyi @@ -0,0 +1,21 @@ +from collections.abc import Callable, Generator, Iterable +from contextlib import contextmanager +from types import TracebackType +from typing import Any, TypeVar + +_T = TypeVar("_T") +_ExcT = TypeVar("_ExcT", bound=BaseException) + +class UnsupportedOperation(Exception): ... + +def detect_environment() -> str: ... +def entrypoints(namespace: str) -> Iterable[Any]: ... +def fileno(f: Any) -> int: ... +def maybe_fileno(f: Any) -> int | None: ... +@contextmanager +def nested(*managers: Any) -> Generator[tuple[Any, ...], None, None]: ... +def register_after_fork(obj: Any, func: Callable[..., Any]) -> None: ... +def reraise( + tp: type[_ExcT], value: _ExcT, tb: TracebackType | None = ... +) -> _ExcT: ... +def coro(gen: Callable[..., Generator[_T, Any, Any]]) -> Callable[..., _T]: ... diff --git a/kombu-stubs/utils/debug.pyi b/kombu-stubs/utils/debug.pyi new file mode 100644 index 0000000..f488ca1 --- /dev/null +++ b/kombu-stubs/utils/debug.pyi @@ -0,0 +1,18 @@ +from logging import Logger +from typing import Any + +__all__ = ("setup_logging", "Logwrapped") + +class Logwrapped: + obj: Any + logger: Logger + ident: str + + def __init__( + self, obj: Any, logger: Logger | None = ..., ident: str | None = ... + ) -> None: ... + def __getattr__(self, key: str) -> Any: ... + +def setup_logging( + loglevel: int | None = ..., loggers: list[str] | None = ... +) -> None: ... diff --git a/kombu-stubs/utils/div.pyi b/kombu-stubs/utils/div.pyi new file mode 100644 index 0000000..cd27ef0 --- /dev/null +++ b/kombu-stubs/utils/div.pyi @@ -0,0 +1,10 @@ +from collections.abc import Callable +from typing import Any, BinaryIO, TextIO + +def default_encode(obj: Any) -> bytes: ... +def emergency_dump_state( + state: Any, + open_file: Callable[..., BinaryIO | TextIO] = ..., + dump: Callable[..., None] | None = ..., + stderr: TextIO | None = ..., +) -> None: ... diff --git a/kombu-stubs/utils/encoding.pyi b/kombu-stubs/utils/encoding.pyi new file mode 100644 index 0000000..32945b9 --- /dev/null +++ b/kombu-stubs/utils/encoding.pyi @@ -0,0 +1,14 @@ +from typing import Any, TextIO + +default_encoding_file: TextIO | None + +def bytes_to_str(s: bytes | str) -> str: ... +def str_to_bytes(s: str | bytes) -> bytes: ... +def ensure_bytes(s: str | bytes) -> bytes: ... +def from_utf8(s: str | bytes, *args: Any, **kwargs: Any) -> str: ... +def default_encode(obj: Any) -> bytes: ... +def default_encoding(file: TextIO | None = ...) -> str: ... +def get_default_encoding_file() -> TextIO | None: ... +def set_default_encoding_file(file: TextIO | None) -> None: ... +def safe_str(s: Any, errors: str = ...) -> str: ... +def safe_repr(o: Any, errors: str = ...) -> str: ... diff --git a/kombu-stubs/utils/eventio.pyi b/kombu-stubs/utils/eventio.pyi new file mode 100644 index 0000000..0f7ab89 --- /dev/null +++ b/kombu-stubs/utils/eventio.pyi @@ -0,0 +1,8 @@ +from collections.abc import Callable +from typing import Any + +READ: int +WRITE: int +ERR: int + +def poll() -> Any: ... diff --git a/kombu-stubs/utils/imports.pyi b/kombu-stubs/utils/imports.pyi new file mode 100644 index 0000000..d8e88bf --- /dev/null +++ b/kombu-stubs/utils/imports.pyi @@ -0,0 +1,19 @@ +from collections.abc import Callable, Mapping +from types import TracebackType +from typing import Any, TypeVar + +_T = TypeVar("_T") +_ExcT = TypeVar("_ExcT", bound=BaseException) + +def symbol_by_name( + name: str, + aliases: Mapping[str, str] | None = ..., + imp: Callable[[str], Any] | None = ..., + package: str | None = ..., + sep: str = ..., + default: _T | None = ..., + **kwargs: Any, +) -> Any: ... +def reraise( + tp: type[_ExcT], value: _ExcT, tb: TracebackType | None = ... +) -> _ExcT: ... diff --git a/kombu-stubs/utils/text.pyi b/kombu-stubs/utils/text.pyi new file mode 100644 index 0000000..8d96f70 --- /dev/null +++ b/kombu-stubs/utils/text.pyi @@ -0,0 +1,18 @@ +from collections.abc import Iterable, Iterator +from typing import NamedTuple + +class version_info_t(NamedTuple): + major: int + minor: int + micro: int + releaselevel: str + serial: str + +def version_string_as_tuple(s: str) -> version_info_t: ... +def fmatch_iter( + needle: str, haystack: Iterable[str], min_ratio: float = ... +) -> Iterator[tuple[float, str]]: ... +def fmatch_best( + needle: str, haystack: Iterable[str], min_ratio: float = ... +) -> str | None: ... +def escape_regex(p: str, white: str = ...) -> str: ... diff --git a/kombu-stubs/utils/time.pyi b/kombu-stubs/utils/time.pyi new file mode 100644 index 0000000..a03c195 --- /dev/null +++ b/kombu-stubs/utils/time.pyi @@ -0,0 +1,3 @@ +__all__ = ("maybe_s_to_ms",) + +def maybe_s_to_ms(v: int | float | None) -> int | None: ... diff --git a/kombu-stubs/utils/url.pyi b/kombu-stubs/utils/url.pyi new file mode 100644 index 0000000..51e16bc --- /dev/null +++ b/kombu-stubs/utils/url.pyi @@ -0,0 +1,31 @@ +from typing import Any, NamedTuple +from urllib.parse import ParseResult + +class urlparts(NamedTuple): + scheme: str + hostname: str | None + port: int | None + username: str | None + password: str | None + path: str + query: dict[str, Any] + +def parse_url(url: str) -> dict[str, Any]: ... +def url_to_parts(url: str) -> urlparts: ... +def as_url( + scheme: str, + host: str | None = ..., + port: int | None = ..., + user: str | None = ..., + password: str | None = ..., + path: str | None = ..., + query: dict[str, Any] | None = ..., + sanitize: bool = ..., + mask: str = ..., +) -> str: ... +def sanitize_url(url: str, mask: str = ...) -> str: ... +def maybe_sanitize_url(url: str, mask: str = ...) -> str: ... +def safequote( + string: str, *, safe: str = ..., encoding: str | None = ..., errors: str | None = ... +) -> str: ... +def parse_ssl_cert_reqs(query_value: str | None) -> int | None: ... From 8d0656432c785d6008b9f88d7da8139ebd9d8ee5 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Fri, 2 Jan 2026 12:03:19 +0100 Subject: [PATCH 06/24] Fix kombu type stubs for stubtest compliance This commit significantly improves the kombu type stubs by fixing signature mismatches and missing exports identified by mypy stubtest. Key changes: - Fix asynchronous module stubs (hub, timer, semaphore, http) - Fix common module (QoS class signature) - Fix compat module (Publisher, Consumer, ConsumerSet classes) - Fix log module (LogMixin, Log classes) - Fix matcher module (MatcherRegistry class, MatcherFunction type) - Fix transport module stubs: - pyamqp: Proper inheritance from amqp classes - SLMQ, consul, etcd, filesystem, memory, pyro, zookeeper: Proper Channel inheritance from virtual.Channel - qpid: Override methods with different signatures - native_delayed_delivery: Now properly typed as utility module - Fix utils module stubs (collections, compat, debug, eventio, url) - Add missing exports and constants across modules Results: - AMQP stubs: 0 errors (previously 70) - Kombu stubs: 28 real errors + 10 import failures from optional deps (previously 430+ errors) The 10 import failures are expected - they're from optional transport backends (redis, mongodb, SQS, azure, etc.) that require additional dependencies not installed. --- kombu-stubs/asynchronous/debug.pyi | 4 +- kombu-stubs/asynchronous/http/__init__.pyi | 7 +- kombu-stubs/asynchronous/http/base.pyi | 80 +++++++++++-- kombu-stubs/asynchronous/http/curl.pyi | 19 ++- kombu-stubs/asynchronous/hub.pyi | 53 +++++++-- kombu-stubs/asynchronous/semaphore.pyi | 12 +- kombu-stubs/asynchronous/timer.pyi | 84 +++++++++++--- kombu-stubs/clocks.pyi | 34 ++++-- kombu-stubs/common.pyi | 13 ++- kombu-stubs/compat.pyi | 108 ++++++++++++++++-- kombu-stubs/log.pyi | 43 ++++--- kombu-stubs/matcher.pyi | 15 ++- kombu-stubs/transport/SLMQ.pyi | 36 +++++- kombu-stubs/transport/consul.pyi | 24 +++- kombu-stubs/transport/etcd.pyi | 23 +++- kombu-stubs/transport/filesystem.pyi | 30 ++++- kombu-stubs/transport/memory.pyi | 17 ++- .../transport/native_delayed_delivery.pyi | 23 ++-- kombu-stubs/transport/pyamqp.pyi | 65 ++++++++++- kombu-stubs/transport/pyro.pyi | 19 ++- kombu-stubs/transport/qpid.pyi | 74 +++++++++++- kombu-stubs/transport/zookeeper.pyi | 15 ++- kombu-stubs/utils/__init__.pyi | 7 +- kombu-stubs/utils/collections.pyi | 3 +- kombu-stubs/utils/compat.pyi | 2 + kombu-stubs/utils/debug.pyi | 6 +- kombu-stubs/utils/eventio.pyi | 4 +- kombu-stubs/utils/url.pyi | 14 ++- 28 files changed, 694 insertions(+), 140 deletions(-) diff --git a/kombu-stubs/asynchronous/debug.pyi b/kombu-stubs/asynchronous/debug.pyi index de2d1ad..9be458a 100644 --- a/kombu-stubs/asynchronous/debug.pyi +++ b/kombu-stubs/asynchronous/debug.pyi @@ -1,6 +1,8 @@ from kombu.asynchronous.hub import Hub -def callback_for(h: Hub, fd: int, flag: int) -> str: ... +def callback_for(h: Hub, fd: int, flag: int, *default: str) -> str: ... def repr_flag(flag: int) -> str: ... def repr_active(h: Hub) -> str: ... def repr_events(h: Hub, events: list[tuple[int, int]]) -> str: ... +def repr_readers(h: Hub) -> list[str]: ... +def repr_writers(h: Hub) -> list[str]: ... diff --git a/kombu-stubs/asynchronous/http/__init__.pyi b/kombu-stubs/asynchronous/http/__init__.pyi index 0e38dbb..e5bb49f 100644 --- a/kombu-stubs/asynchronous/http/__init__.pyi +++ b/kombu-stubs/asynchronous/http/__init__.pyi @@ -3,5 +3,10 @@ from typing import Any from kombu.asynchronous.http.base import Headers as Headers from kombu.asynchronous.http.base import Request as Request from kombu.asynchronous.http.base import Response as Response +from kombu.asynchronous.http.curl import CurlClient +from kombu.asynchronous.hub import Hub -def get_client(hub: Any = ..., **kwargs: Any) -> Any: ... +__all__ = ("Client", "Headers", "Response", "Request") + +def Client(hub: Hub | None = ..., **kwargs: int) -> CurlClient: ... +def get_client(hub: Hub | None = ..., **kwargs: int) -> CurlClient: ... diff --git a/kombu-stubs/asynchronous/http/base.pyi b/kombu-stubs/asynchronous/http/base.pyi index 4728189..34fe1ec 100644 --- a/kombu-stubs/asynchronous/http/base.pyi +++ b/kombu-stubs/asynchronous/http/base.pyi @@ -1,17 +1,44 @@ from collections.abc import Callable, Mapping +from io import BytesIO +from types import TracebackType from typing import Any +__all__ = ("Headers", "Response", "Request") + class Headers(dict[str, str]): + complete: bool + _prev_key: str | None + def __init__(self, *args: Any, **kwargs: Any) -> None: ... class Request: url: str method: str headers: Headers - body: bytes | None - connect_timeout: float | None - request_timeout: float | None - on_ready: Callable[[Response], None] | None + body: bytes | str | None + connect_timeout: float + request_timeout: float + on_ready: Any # promise + on_timeout: Any | None + on_stream: Any | None + on_prepare: Any | None + on_header: Any | None + auth_username: str | None + auth_password: str | None + auth_mode: str | None + user_agent: str | None + network_interface: str | None + use_gzip: bool + validate_cert: bool + ca_certs: str | None + client_key: str | None + client_cert: str | None + proxy_host: str | None + proxy_port: int | None + proxy_username: str | None + proxy_password: str | None + follow_redirects: bool + max_redirects: int def __init__( self, @@ -20,36 +47,65 @@ class Request: on_ready: Callable[[Response], None] | None = ..., on_timeout: Callable[[], None] | None = ..., on_stream: Callable[[bytes], None] | None = ..., + on_prepare: Callable[[Request], None] | None = ..., + on_header: Callable[[Headers], None] | None = ..., headers: Mapping[str, str] | None = ..., - body: bytes | str | None = ..., - connect_timeout: float | None = ..., - request_timeout: float | None = ..., **kwargs: Any, ) -> None: ... - def then(self, callback: Callable[[Response], None]) -> Request: ... + def then( + self, + callback: Callable[[Response], None], + errback: Callable[[Exception], None] | None = ..., + ) -> None: ... class Response: request: Request code: int headers: Headers - body: bytes | None + buffer: BytesIO | None effective_url: str error: Exception | None + status: str + _body: bytes | None def __init__( self, request: Request, code: int, headers: Headers | None = ..., - body: bytes | None = ..., + buffer: BytesIO | None = ..., effective_url: str | None = ..., error: Exception | None = ..., + status: str | None = ..., ) -> None: ... def raise_for_error(self) -> None: ... + @property + def body(self) -> bytes | None: ... + @property + def status_code(self) -> int: ... + @property + def content(self) -> bytes | None: ... + +_Headers = Headers +_Request = Request +_Response = Response class BaseClient: + Headers: type[_Headers] + Request: type[_Request] + Response: type[_Response] hub: Any + _header_parser: Any - def __init__(self, hub: Any = ..., **kwargs: Any) -> None: ... - def add_request(self, request: Request) -> Request: ... + def __init__(self, hub: Any, **kwargs: Any) -> None: ... + def perform(self, request: _Request | str, **kwargs: Any) -> None: ... + def add_request(self, request: _Request) -> _Request: ... def close(self) -> None: ... + def on_header(self, headers: _Headers, line: bytes | str) -> None: ... + def __enter__(self) -> BaseClient: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... diff --git a/kombu-stubs/asynchronous/http/curl.pyi b/kombu-stubs/asynchronous/http/curl.pyi index 592d5b0..2696c1f 100644 --- a/kombu-stubs/asynchronous/http/curl.pyi +++ b/kombu-stubs/asynchronous/http/curl.pyi @@ -1,6 +1,23 @@ from typing import Any from kombu.asynchronous.http.base import BaseClient +from kombu.asynchronous.hub import Hub + +__all__ = ("CurlClient",) class CurlClient(BaseClient): - def __init__(self, hub: Any = ..., **kwargs: Any) -> None: ... + Curl: type[Any] | None + max_clients: int + _multi: Any + _curls: list[Any] + _free_list: list[Any] + _pending: Any + _fds: dict[int, int] + _socket_action: Any + _timeout_check_tref: Any + + def __init__(self, hub: Hub | None = ..., max_clients: int = ...) -> None: ... + def close(self) -> None: ... + def add_request(self, request: Any) -> Any: ... + def on_readable(self, fd: int, _pycurl: Any = ...) -> Any: ... + def on_writable(self, fd: int, _pycurl: Any = ...) -> Any: ... diff --git a/kombu-stubs/asynchronous/hub.pyi b/kombu-stubs/asynchronous/hub.pyi index fc64592..0848c63 100644 --- a/kombu-stubs/asynchronous/hub.pyi +++ b/kombu-stubs/asynchronous/hub.pyi @@ -2,10 +2,19 @@ from collections.abc import Callable, Generator from typing import Any from kombu.asynchronous.timer import Timer +from kombu.utils.objects import cached_property __all__ = ("Hub", "get_event_loop", "set_event_loop") +READ: int +WRITE: int +ERR: int + class Hub: + READ: int + WRITE: int + ERR: int + timer: Timer readers: dict[int, Callable[..., Any]] writers: dict[int, Callable[..., Any]] @@ -13,8 +22,6 @@ class Hub: on_close: list[Callable[..., Any]] | None def __init__(self, timer: Timer | None = ...) -> None: ... - def __enter__(self) -> Hub: ... - def __exit__(self, *exc_info: Any) -> None: ... def add( self, fd: int | Any, @@ -24,16 +31,16 @@ class Hub: consolidate: bool = ..., ) -> None: ... def add_reader( - self, fd: int | Any, callback: Callable[..., Any], *args: Any + self, fds: int | Any, callback: Callable[..., Any], *args: Any ) -> None: ... def add_writer( - self, fd: int | Any, callback: Callable[..., Any], *args: Any + self, fds: int | Any, callback: Callable[..., Any], *args: Any ) -> None: ... def remove(self, fd: int | Any) -> None: ... def remove_reader(self, fd: int | Any) -> None: ... def remove_writer(self, fd: int | Any) -> None: ... def run_forever(self) -> None: ... - def run_once(self, timeout: float | None = ...) -> None: ... + def run_once(self) -> None: ... def call_soon(self, callback: Callable[..., Any], *args: Any) -> Any: ... def call_later( self, delay: float, callback: Callable[..., Any], *args: Any @@ -42,12 +49,40 @@ class Hub: self, when: float, callback: Callable[..., Any], *args: Any ) -> Any: ... def call_repeatedly( - self, interval: float, callback: Callable[..., Any], *args: Any + self, delay: float, callback: Callable[..., Any], *args: Any ) -> Any: ... - def close(self) -> None: ... + def close(self, *args: Any) -> None: ... def stop(self) -> None: ... - def fire_timers(self, min_delay: float = ..., max_delay: float = ...) -> float: ... - def create_loop(self) -> Generator[None, None, None]: ... + def reset(self) -> None: ... + def fire_timers( + self, + min_delay: float = ..., + max_delay: float = ..., + max_timers: int = ..., + propagate: tuple[type[Exception], ...] = ..., + ) -> float: ... + def create_loop( + self, + generator: type[Generator[Any, Any, Any]] = ..., + sleep: Callable[[float], None] = ..., + min: Callable[..., Any] = ..., + next: Callable[..., Any] = ..., + Empty: type[Exception] = ..., + StopIteration: type[BaseException] = ..., + KeyError: type[Exception] = ..., + READ: int = ..., + WRITE: int = ..., + ERR: int = ..., + ) -> Generator[None, None, None]: ... + def on_callback_error(self, callback: Callable[..., Any], exc: BaseException) -> None: ... + def repr_active(self) -> str: ... + def repr_events(self, events: list[tuple[int, int]]) -> str: ... + @property + def loop(self) -> Generator[None, None, None]: ... + @property + def poller(self) -> Any: ... + @cached_property + def scheduler(self) -> Timer: ... def get_event_loop() -> Hub | None: ... def set_event_loop(loop: Hub | None) -> Hub | None: ... diff --git a/kombu-stubs/asynchronous/semaphore.pyi b/kombu-stubs/asynchronous/semaphore.pyi index f9af95a..9b686af 100644 --- a/kombu-stubs/asynchronous/semaphore.pyi +++ b/kombu-stubs/asynchronous/semaphore.pyi @@ -1,13 +1,17 @@ from collections.abc import Callable +from types import TracebackType from typing import Any __all__ = ("DummyLock", "LaxBoundedSemaphore") class DummyLock: def __enter__(self) -> DummyLock: ... - def __exit__(self, *exc_info: Any) -> None: ... - def acquire(self) -> bool: ... - def release(self) -> None: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... class LaxBoundedSemaphore: initial_value: int @@ -15,7 +19,7 @@ class LaxBoundedSemaphore: def __init__(self, value: int) -> None: ... def acquire( - self, callback: Callable[..., Any], *partial_args: Any, **partial_kwargs: Any + self, callback: Callable[..., None], *partial_args: Any, **partial_kwargs: Any ) -> bool: ... def release(self) -> None: ... def grow(self, n: int = ...) -> None: ... diff --git a/kombu-stubs/asynchronous/timer.pyi b/kombu-stubs/asynchronous/timer.pyi index 08cba01..ebf7da1 100644 --- a/kombu-stubs/asynchronous/timer.pyi +++ b/kombu-stubs/asynchronous/timer.pyi @@ -1,5 +1,7 @@ -from collections.abc import Callable +from collections.abc import Callable, Iterator from datetime import datetime +from time import monotonic +from types import TracebackType from typing import Any, NamedTuple from zoneinfo import ZoneInfo @@ -12,34 +14,67 @@ class scheduled(NamedTuple): class Entry: fun: Callable[..., Any] - args: tuple[Any, ...] + args: list[Any] kwargs: dict[str, Any] tref: Any - cancelled: bool + canceled: bool + _last_run: float | None def __init__( self, fun: Callable[..., Any], - args: tuple[Any, ...] = ..., + args: list[Any] | None = ..., kwargs: dict[str, Any] | None = ..., ) -> None: ... def __call__(self) -> Any: ... def cancel(self) -> None: ... + def __lt__(self, other: Entry) -> bool: ... + def __le__(self, other: Entry) -> bool: ... + def __gt__(self, other: Entry) -> bool: ... + def __ge__(self, other: Entry) -> bool: ... + @property + def cancelled(self) -> bool: ... + @cancelled.setter + def cancelled(self, value: bool) -> None: ... + +_Entry = Entry class Timer: - queue: list[scheduled] + Entry: type[_Entry] + max_interval: float on_error: Callable[[Exception], None] | None + _queue: list[scheduled] - def __init__(self, on_error: Callable[[Exception], None] | None = ...) -> None: ... + def __init__( + self, + max_interval: float | None = ..., + on_error: Callable[[Exception], None] | None = ..., + **kwargs: Any, + ) -> None: ... + def __enter__(self) -> Timer: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... def __len__(self) -> int: ... + def __nonzero__(self) -> bool: ... + def __iter__( + self, + min: Callable[..., Any] = ..., + nowfun: Callable[[], float] = ..., + pop: Callable[..., Any] = ..., + push: Callable[..., Any] = ..., + ) -> Iterator[tuple[float | None, _Entry | None]]: ... def call_at( self, - eta: float, + eta: float | datetime, fun: Callable[..., Any], args: tuple[Any, ...] = ..., kwargs: dict[str, Any] | None = ..., priority: int = ..., - ) -> Entry: ... + ) -> _Entry: ... def call_after( self, secs: float, @@ -47,7 +82,7 @@ class Timer: args: tuple[Any, ...] = ..., kwargs: dict[str, Any] | None = ..., priority: int = ..., - ) -> Entry: ... + ) -> _Entry: ... def call_repeatedly( self, secs: float, @@ -55,15 +90,30 @@ class Timer: args: tuple[Any, ...] = ..., kwargs: dict[str, Any] | None = ..., priority: int = ..., - ) -> Entry: ... - def apply_at(self, eta: float, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> Entry: ... - def apply_after(self, secs: float, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> Entry: ... - def apply_interval(self, secs: float, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> Entry: ... - def enter_at(self, entry: Entry, eta: float, priority: int = ...) -> Entry: ... - def enter_after(self, entry: Entry, secs: float, priority: int = ...) -> Entry: ... - def cancel(self, tref: Entry) -> None: ... + ) -> _Entry: ... + def enter_at( + self, + entry: _Entry, + eta: float | datetime | None = ..., + priority: int = ..., + time: Callable[[], float] = ..., + ) -> _Entry | None: ... + def enter_after( + self, + secs: float, + entry: _Entry, + priority: int = ..., + time: Callable[[], float] = ..., + ) -> _Entry: ... + def apply_entry(self, entry: _Entry) -> None: ... + def handle_error(self, exc_info: Exception) -> bool | None: ... + def stop(self) -> None: ... + def cancel(self, tref: _Entry) -> None: ... def clear(self) -> None: ... - def empty(self) -> bool: ... + @property + def queue(self) -> list[scheduled]: ... + @property + def schedule(self) -> Timer: ... def to_timestamp( d: datetime | float, diff --git a/kombu-stubs/clocks.pyi b/kombu-stubs/clocks.pyi index 273b61d..f207a0f 100644 --- a/kombu-stubs/clocks.pyi +++ b/kombu-stubs/clocks.pyi @@ -1,20 +1,38 @@ +from operator import itemgetter from threading import Lock -from typing import Any, NamedTuple +from typing import Any __all__ = ("LamportClock", "timetuple") -class timetuple(NamedTuple): - clock: int - timestamp: float - id: str - obj: Any +class timetuple(tuple[int | None, float, str, Any]): + __slots__: tuple[()] + + def __new__( + cls, clock: int | None, timestamp: float, id: str, obj: Any = ... + ) -> timetuple: ... + def __repr__(self) -> str: ... + def __getnewargs__(self) -> tuple[int | None, float, str, Any]: ... + def __lt__(self, other: tuple[Any, ...]) -> bool: ... + def __gt__(self, other: tuple[Any, ...]) -> bool: ... + def __le__(self, other: tuple[Any, ...]) -> bool: ... + def __ge__(self, other: tuple[Any, ...]) -> bool: ... + + @property + def clock(self) -> int | None: ... + @property + def timestamp(self) -> float: ... + @property + def id(self) -> str: ... + @property + def obj(self) -> Any: ... class LamportClock: - counter: int + value: int mutex: Lock def __init__(self, initial_value: int = ..., Lock: type[Lock] = ...) -> None: ... def adjust(self, other: int) -> int: ... def forward(self) -> int: ... - def sort_heap(self, h: list[timetuple]) -> list[timetuple]: ... + def sort_heap(self, h: list[tuple[int, str]]) -> tuple[int, str]: ... + def __str__(self) -> str: ... def __repr__(self) -> str: ... diff --git a/kombu-stubs/common.pyi b/kombu-stubs/common.pyi index 2bb7902..d7488a9 100644 --- a/kombu-stubs/common.pyi +++ b/kombu-stubs/common.pyi @@ -32,11 +32,18 @@ class Broadcast(Queue): ) -> None: ... class QoS: - channel: StdChannel - prev: int + callback: Callable[..., None] + prev: int | None value: int + max_prefetch: int | None + _mutex: Any - def __init__(self, callback: Callable[[int], None], initial_value: int = ...) -> None: ... + def __init__( + self, + callback: Callable[..., None], + initial_value: int, + max_prefetch: int | None = ..., + ) -> None: ... def update(self) -> int: ... def decrement_eventually(self, n: int = ...) -> int: ... def increment_eventually(self, n: int = ...) -> int: ... diff --git a/kombu-stubs/compat.pyi b/kombu-stubs/compat.pyi index 545f8fe..b1045ee 100644 --- a/kombu-stubs/compat.pyi +++ b/kombu-stubs/compat.pyi @@ -1,20 +1,112 @@ +from collections.abc import Generator, Iterable +from types import TracebackType from typing import Any +from kombu.connection import Connection from kombu.entity import Exchange, Queue +from kombu.message import Message from kombu.messaging import Consumer as _Consumer from kombu.messaging import Producer +from kombu.transport.base import StdChannel __all__ = ("Publisher", "Consumer") -class Publisher(Producer): ... +def entry_to_queue(queue: str, **options: Any) -> Queue: ... -class Consumer(_Consumer): ... +class Publisher(Producer): + exchange: Exchange | str # type: ignore[assignment] + exchange_type: str + routing_key: str + durable: bool + auto_delete: bool + _closed: bool -class ConsumerSet: - def __init__(self, connection: Any, *args: Any, **kwargs: Any) -> None: ... - def add_consumer(self, consumer: _Consumer) -> None: ... - def iterconsume(self, limit: int | None = ..., no_ack: bool = ...) -> Any: ... - def discard_all(self) -> int: ... + def __init__( + self, + connection: Connection | StdChannel, + exchange: str | Exchange | None = ..., + routing_key: str | None = ..., + exchange_type: str | None = ..., + durable: bool | None = ..., + auto_delete: bool | None = ..., + channel: StdChannel | None = ..., + **kwargs: Any, + ) -> None: ... + def send(self, *args: Any, **kwargs: Any) -> Any: ... def close(self) -> None: ... + def __enter__(self) -> Publisher: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... + @property + def backend(self) -> StdChannel: ... -def entry_to_queue(queue: str, **options: Any) -> Queue: ... +class Consumer(_Consumer): + queue: str + exchange: str + routing_key: str + exchange_type: str + durable: bool + exclusive: bool + auto_delete: bool + backend: StdChannel + _closed: bool + + def __init__( + self, + connection: Connection, + queue: str | None = ..., + exchange: str | None = ..., + routing_key: str | None = ..., + exchange_type: str | None = ..., + durable: bool | None = ..., + exclusive: bool | None = ..., + auto_delete: bool | None = ..., + **kwargs: Any, + ) -> None: ... + def revive(self, channel: StdChannel) -> None: ... + def close(self) -> None: ... + def __enter__(self) -> Consumer: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... + def __iter__(self) -> Generator[Message | None, None, None]: ... + def fetch( + self, no_ack: bool | None = ..., enable_callbacks: bool = ... + ) -> Message | None: ... + def process_next(self) -> None: ... + def discard_all(self, filterfunc: Any = ...) -> int: ... + def iterconsume( + self, limit: int | None = ..., no_ack: bool | None = ... + ) -> Generator[Any, None, None]: ... + def wait(self, limit: int | None = ...) -> list[Any]: ... + def iterqueue( + self, limit: int | None = ..., infinite: bool = ... + ) -> Generator[Message | None, None, None]: ... + +class ConsumerSet(_Consumer): + backend: StdChannel + _provided_channel: bool + + def __init__( + self, + connection: Connection, + from_dict: dict[str, dict[str, Any]] | None = ..., + consumers: Iterable[_Consumer] | None = ..., + channel: StdChannel | None = ..., + **kwargs: Any, + ) -> None: ... + def iterconsume( + self, limit: int | None = ..., no_ack: bool = ... + ) -> Generator[Any, None, None]: ... + def discard_all(self) -> int: ... + def add_consumer_from_dict(self, queue: str, **options: Any) -> Queue: ... + def add_consumer(self, consumer: _Consumer) -> None: ... + def revive(self, channel: StdChannel) -> None: ... + def close(self) -> None: ... diff --git a/kombu-stubs/log.pyi b/kombu-stubs/log.pyi index fed58c3..ec0f9f2 100644 --- a/kombu-stubs/log.pyi +++ b/kombu-stubs/log.pyi @@ -1,27 +1,44 @@ -from logging import Handler, Logger -from typing import Any +from logging import Logger +from typing import Any, TextIO -__all__ = ("LogMixin", "LOG_LEVELS", "get_loglevel", "setup_logging") +from kombu.utils.objects import cached_property -LOG_LEVELS: dict[str, int] +__all__ = ("LogMixin", "LOG_LEVELS", "get_loglevel", "setup_logging") -class Log: - logger: Logger - _logger: Logger | None +LOG_LEVELS: dict[str | int, int | str] +DISABLE_TRACEBACKS: str | None - def __init__(self, name: str | None = ..., logger: Logger | None = ...) -> None: ... +class LogMixin: def debug(self, *args: Any, **kwargs: Any) -> None: ... def info(self, *args: Any, **kwargs: Any) -> None: ... - def warning(self, *args: Any, **kwargs: Any) -> None: ... + def warn(self, *args: Any, **kwargs: Any) -> None: ... def error(self, *args: Any, **kwargs: Any) -> None: ... def critical(self, *args: Any, **kwargs: Any) -> None: ... + def annotate(self, text: str) -> str: ... + def log(self, severity: int, *args: Any, **kwargs: Any) -> None: ... + def get_logger(self) -> Logger: ... + def is_enabled_for(self, level: int | str) -> bool: ... + def get_loglevel(self, level: int | str) -> int: ... + @cached_property + def logger(self) -> Logger: ... + @property + def logger_name(self) -> str: ... -class LogMixin: +class Log(LogMixin): + _logger_name: str + _logger: Logger | None + + def __init__(self, name: str, logger: Logger | None = ...) -> None: ... + def get_logger(self) -> Logger: ... @property - def logger(self) -> Logger: ... + def logger_name(self) -> str: ... def get_loglevel(level: str | int) -> int: ... def setup_logging( - loglevel: int | str | None = ..., logfile: str | None = ... -) -> None: ... + loglevel: int | str | None = ..., logfile: str | TextIO | None = ... +) -> Logger: ... def get_logger(logger: str | Logger) -> Logger: ... +def naive_format_parts(fmt: str) -> Any: ... +def safeify_format( + fmt: str, args: tuple[Any, ...], filters: dict[str, Any] | None = ... +) -> Any: ... diff --git a/kombu-stubs/matcher.pyi b/kombu-stubs/matcher.pyi index 4bd08c5..b830e24 100644 --- a/kombu-stubs/matcher.pyi +++ b/kombu-stubs/matcher.pyi @@ -1,12 +1,19 @@ from collections.abc import Callable -from typing import Any + +MatcherFunction = Callable[[str, str], bool] class MatcherNotInstalled(Exception): ... class MatcherRegistry: + MatcherNotInstalled: type[MatcherNotInstalled] + matcher_pattern_first: list[str] + _matchers: dict[str, MatcherFunction] + _default_matcher: MatcherFunction | None + def __init__(self) -> None: ... - def register(self, name: str, matcher: Callable[..., bool]) -> None: ... + def register(self, name: str, matcher: MatcherFunction) -> None: ... def unregister(self, name: str) -> None: ... + def _set_default_matcher(self, name: str) -> None: ... def match( self, data: bytes, @@ -15,13 +22,15 @@ class MatcherRegistry: matcher_kwargs: dict[str, str] | None = ..., ) -> bool: ... +registry: MatcherRegistry + def match( data: bytes, pattern: bytes, matcher: str | None = ..., matcher_kwargs: dict[str, str] | None = ..., ) -> bool: ... -def register(name: str, matcher: Callable[..., bool]) -> None: ... +def register(name: str, matcher: MatcherFunction) -> None: ... def unregister(name: str) -> None: ... def register_glob() -> None: ... def register_pcre() -> None: ... diff --git a/kombu-stubs/transport/SLMQ.pyi b/kombu-stubs/transport/SLMQ.pyi index f20d448..1d9d777 100644 --- a/kombu-stubs/transport/SLMQ.pyi +++ b/kombu-stubs/transport/SLMQ.pyi @@ -1,11 +1,39 @@ from typing import Any +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +CHARS_REPLACE_TABLE: dict[int, int] + +class Channel(VirtualChannel): + default_visibility_timeout: int + domain_format: str + _slmq: Any + _queue_cache: dict[str, str] + _noack_queues: set[str] + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def basic_consume( + self, queue: str, no_ack: bool, *args: Any, **kwargs: Any + ) -> str: ... + def basic_cancel(self, consumer_tag: str) -> None: ... + def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... + def basic_ack(self, delivery_tag: int) -> None: ... # type: ignore[override] + def delete_message(self, queue: str, message_id: str) -> None: ... + @property + def visibility_timeout(self) -> int: ... + @cached_property + def queue_name_prefix(self) -> str: ... + @property + def slmq(self) -> Any: ... + @property + def conninfo(self) -> Any: ... + @property + def transport_options(self) -> dict[str, Any]: ... class Transport(VirtualTransport): + Channel: type[Channel] driver_type: str driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + connection_errors: tuple[type[Exception], ...] diff --git a/kombu-stubs/transport/consul.pyi b/kombu-stubs/transport/consul.pyi index f20d448..6291ff4 100644 --- a/kombu-stubs/transport/consul.pyi +++ b/kombu-stubs/transport/consul.pyi @@ -1,11 +1,27 @@ +from logging import Logger from typing import Any +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +logger: Logger +DEFAULT_PORT: int +DEFAULT_HOST: str + +class LockError(Exception): ... + +class Channel(VirtualChannel): + prefix: str + index: int | None + timeout: str + session_ttl: int + + @cached_property + def lock_name(self) -> str: ... + def __init__(self, *args: Any, **kwargs: Any) -> None: ... class Transport(VirtualTransport): + Channel: type[Channel] driver_type: str driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/etcd.pyi b/kombu-stubs/transport/etcd.pyi index f20d448..cbd174e 100644 --- a/kombu-stubs/transport/etcd.pyi +++ b/kombu-stubs/transport/etcd.pyi @@ -1,11 +1,26 @@ +from logging import Logger from typing import Any +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +logger: Logger +DEFAULT_PORT: int +DEFAULT_HOST: str + +class Channel(VirtualChannel): + prefix: str + index: int | None + timeout: int + session_ttl: int + lock_ttl: int + + @cached_property + def lock_value(self) -> str: ... + def __init__(self, *args: Any, **kwargs: Any) -> None: ... class Transport(VirtualTransport): + Channel: type[Channel] driver_type: str driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/filesystem.pyi b/kombu-stubs/transport/filesystem.pyi index f20d448..be0e929 100644 --- a/kombu-stubs/transport/filesystem.pyi +++ b/kombu-stubs/transport/filesystem.pyi @@ -1,11 +1,31 @@ -from typing import Any +from io import FileIO +from typing import Any, NamedTuple +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +VERSION: tuple[int, int, int] + +def lock(file: FileIO, flags: int) -> None: ... +def unlock(file: FileIO) -> None: ... + +class exchange_queue_t(NamedTuple): + routing_key: str + pattern: str + queue: str + +class Channel(VirtualChannel): + supports_fanout: bool + data_folder_in: Any + data_folder_out: Any + control_folder: Any + processed_folder: Any + store_processed: bool + transport_options: dict[str, Any] + + def __init__(self, connection: Any, **kwargs: Any) -> None: ... + class Transport(VirtualTransport): + Channel: type[Channel] driver_type: str driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/memory.pyi b/kombu-stubs/transport/memory.pyi index 3afd02f..4d50e1d 100644 --- a/kombu-stubs/transport/memory.pyi +++ b/kombu-stubs/transport/memory.pyi @@ -1,12 +1,21 @@ +from collections import defaultdict +from queue import Queue from typing import Any +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +class Channel(VirtualChannel): + events: defaultdict[str, set[Any]] + queues: dict[str, Queue[Any]] + do_restore: bool + supports_fanout: bool + + def __init__(self, connection: Any, **kwargs: Any) -> None: ... + def close(self) -> None: ... + class Transport(VirtualTransport): + Channel: type[Channel] default_port: int | None driver_type: str driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/native_delayed_delivery.pyi b/kombu-stubs/transport/native_delayed_delivery.pyi index f20d448..fa031de 100644 --- a/kombu-stubs/transport/native_delayed_delivery.pyi +++ b/kombu-stubs/transport/native_delayed_delivery.pyi @@ -1,11 +1,18 @@ -from typing import Any +from logging import Logger -from kombu.transport.virtual import Transport as VirtualTransport +from kombu.connection import Connection +from kombu.entity import Queue -class Transport(VirtualTransport): - driver_type: str - driver_name: str +logger: Logger +MAX_NUMBER_OF_BITS_TO_USE: int +MAX_LEVEL: int +CELERY_DELAYED_DELIVERY_EXCHANGE: str -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... +def level_name(level: int) -> str: ... +def declare_native_delayed_delivery_exchanges_and_queues( + connection: Connection, queue_type: str +) -> None: ... +def bind_queue_to_native_delayed_delivery_exchange( + connection: Connection, queue: Queue +) -> None: ... +def calculate_routing_key(countdown_in_seconds: int) -> str: ... diff --git a/kombu-stubs/transport/pyamqp.pyi b/kombu-stubs/transport/pyamqp.pyi index 7973241..1512bfa 100644 --- a/kombu-stubs/transport/pyamqp.pyi +++ b/kombu-stubs/transport/pyamqp.pyi @@ -1,16 +1,73 @@ from typing import Any +import amqp + +from kombu.transport.base import Message as BaseMessage +from kombu.transport.base import StdChannel from kombu.transport.base import Transport as BaseTransport +DEFAULT_PORT: int +DEFAULT_SSL_PORT: int + +class Message(BaseMessage): + def __init__(self, msg: Any, channel: Any = ..., **kwargs: Any) -> None: ... + +_Message = Message + +class Channel(amqp.Channel, StdChannel): + Message: type[_Message] # type: ignore[assignment] + + def prepare_message( + self, + body: bytes | str, + priority: int | None = ..., + content_type: str | None = ..., + content_encoding: str | None = ..., + headers: dict[str, Any] | None = ..., + properties: dict[str, Any] | None = ..., + _Message: type[amqp.Message] = ..., + ) -> amqp.Message: ... + def prepare_queue_arguments( # type: ignore[override] + self, arguments: dict[str, Any], **kwargs: Any + ) -> dict[str, Any]: ... + def message_to_python(self, raw_message: Any) -> _Message: ... + +_Connection = amqp.Connection + +class Connection(amqp.Connection): + Channel: type[Channel] + class Transport(BaseTransport): + Connection: type[_Connection] default_port: int default_ssl_port: int connection_errors: tuple[type[Exception], ...] channel_errors: tuple[type[Exception], ...] + recoverable_connection_errors: tuple[type[Exception], ...] + recoverable_channel_errors: tuple[type[Exception], ...] + driver_name: str + driver_type: str -class Channel: - connection: Any - def __init__(self, connection: Any, channel_id: int | None = ...) -> None: ... + def __init__( + self, + client: Any, + default_port: int | None = ..., + default_ssl_port: int | None = ..., + **kwargs: Any, + ) -> None: ... + def driver_version(self) -> str: ... + def create_channel(self, connection: _Connection) -> Channel: ... + def drain_events(self, connection: _Connection, **kwargs: Any) -> Any: ... + def establish_connection(self) -> _Connection: ... + def verify_connection(self, connection: _Connection) -> bool: ... + def close_connection(self, connection: _Connection) -> None: ... + def get_heartbeat_interval(self, connection: _Connection) -> int: ... + def register_with_event_loop(self, connection: _Connection, loop: Any) -> None: ... + def heartbeat_check(self, connection: _Connection, rate: int = ...) -> Any: ... + def qos_semantics_matches_spec(self, connection: _Connection) -> bool: ... + @property + def default_connection_params(self) -> dict[str, Any]: ... + def get_manager(self, *args: Any, **kwargs: Any) -> Any: ... -class Connection: +class SSLTransport(Transport): def __init__(self, *args: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/pyro.pyi b/kombu-stubs/transport/pyro.pyi index f20d448..79bee85 100644 --- a/kombu-stubs/transport/pyro.pyi +++ b/kombu-stubs/transport/pyro.pyi @@ -1,11 +1,22 @@ +from logging import Logger from typing import Any +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +DEFAULT_PORT: int +E_NAMESERVER: str +E_LOOKUP: str +logger: Logger + +class Channel(VirtualChannel): + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def close(self) -> None: ... + def queues(self) -> list[str]: ... + class Transport(VirtualTransport): + Channel: type[Channel] driver_type: str driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] diff --git a/kombu-stubs/transport/qpid.pyi b/kombu-stubs/transport/qpid.pyi index f20d448..b71e94f 100644 --- a/kombu-stubs/transport/qpid.pyi +++ b/kombu-stubs/transport/qpid.pyi @@ -1,11 +1,73 @@ +from logging import Logger from typing import Any -from kombu.transport.virtual import Transport as VirtualTransport +from kombu.transport.base import Transport as BaseTransport +from kombu.transport.virtual import Channel as VirtualChannel +from kombu.transport.virtual import Message +from kombu.transport.virtual import QoS as VirtualQoS -class Transport(VirtualTransport): +logger: Logger +buffer: type[bytes] +OBJECT_ALREADY_EXISTS_STRING: str +VERSION: tuple[int, int, int] + +def dependency_is_none(dependency: Any) -> bool: ... + +class AuthenticationFailure(Exception): ... + +class QoS(VirtualQoS): + def __init__(self, session: Any, prefetch_count: int = ...) -> None: ... + +class Connection: + def __init__(self, **conn_info: Any) -> None: ... + def close(self) -> None: ... + def get_qpid_connection(self) -> Any: ... + +_Message = Message +_QoS = QoS + +class Channel(VirtualChannel): + Message: type[_Message] + QoS: type[_QoS] + + def __init__(self, connection: Any, transport: Any) -> None: ... + def close(self) -> None: ... + def queue_declare( # type: ignore[override] + self, + queue: str, + passive: bool = ..., + durable: bool = ..., + exclusive: bool = ..., + auto_delete: bool = ..., + nowait: bool = ..., + arguments: dict[str, Any] | None = ..., + ) -> Any: ... + def exchange_declare( # type: ignore[override] + self, + exchange: str = ..., + type: str = ..., + durable: bool = ..., + **kwargs: Any, + ) -> None: ... + def exchange_delete( # type: ignore[override] + self, exchange_name: str, **kwargs: Any + ) -> None: ... + def queue_bind( # type: ignore[override] + self, queue: str, exchange: str, routing_key: str, **kwargs: Any + ) -> None: ... + def queue_unbind( # type: ignore[override] + self, queue: str, exchange: str, routing_key: str, **kwargs: Any + ) -> None: ... + def basic_qos( # type: ignore[override] + self, prefetch_count: int, *args: Any + ) -> None: ... + +_Connection = Connection + +class Transport(BaseTransport): + Channel: type[Channel] + Connection: type[_Connection] driver_type: str driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] diff --git a/kombu-stubs/transport/zookeeper.pyi b/kombu-stubs/transport/zookeeper.pyi index f20d448..bbbdede 100644 --- a/kombu-stubs/transport/zookeeper.pyi +++ b/kombu-stubs/transport/zookeeper.pyi @@ -1,11 +1,18 @@ from typing import Any +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +DEFAULT_PORT: int +KZ_CONNECTION_ERRORS: tuple[type[Exception], ...] +KZ_CHANNEL_ERRORS: tuple[type[Exception], ...] + +class Channel(VirtualChannel): + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + class Transport(VirtualTransport): + Channel: type[Channel] driver_type: str driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] diff --git a/kombu-stubs/utils/__init__.pyi b/kombu-stubs/utils/__init__.pyi index aef543d..93caeb8 100644 --- a/kombu-stubs/utils/__init__.pyi +++ b/kombu-stubs/utils/__init__.pyi @@ -3,11 +3,11 @@ from contextlib import contextmanager from typing import Any, BinaryIO, TextIO, TypeVar from uuid import UUID -from kombu.utils.functional import reprkwargs as reprkwargs from kombu.utils.functional import retry_over_time as retry_over_time from kombu.utils.objects import cached_property as cached_property -# Note: runtime __all__ includes reprkwargs but it's not actually exported (kombu bug) +# Note: runtime __all__ includes reprkwargs but it's not actually importable (kombu bug) +# We match the runtime __all__ exactly to avoid stubtest errors __all__ = ( "EqualityDict", "uuid", @@ -26,6 +26,9 @@ __all__ = ( "maybe_fileno", ) +# Declared but not actually exported at runtime (kombu bug) +def reprkwargs(kwargs: Mapping[str, Any], sep: str = ..., fmt: str = ...) -> str: ... + _T = TypeVar("_T") class EqualityDict(dict[Any, Any]): ... diff --git a/kombu-stubs/utils/collections.pyi b/kombu-stubs/utils/collections.pyi index 7bb1ffb..9124d6e 100644 --- a/kombu-stubs/utils/collections.pyi +++ b/kombu-stubs/utils/collections.pyi @@ -4,9 +4,10 @@ from typing import Any class EqualityDict(dict[Any, Any]): ... class HashedSeq(list[Any]): + __slots__: str hashvalue: int - def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def __init__(self, *seq: Any) -> None: ... def __hash__(self) -> int: ... # type: ignore[override] def eqhash(o: Any) -> Hashable: ... diff --git a/kombu-stubs/utils/compat.pyi b/kombu-stubs/utils/compat.pyi index d701682..0c1b5e4 100644 --- a/kombu-stubs/utils/compat.pyi +++ b/kombu-stubs/utils/compat.pyi @@ -6,6 +6,8 @@ from typing import Any, TypeVar _T = TypeVar("_T") _ExcT = TypeVar("_ExcT", bound=BaseException) +FILENO_ERRORS: tuple[type[Exception], ...] + class UnsupportedOperation(Exception): ... def detect_environment() -> str: ... diff --git a/kombu-stubs/utils/debug.pyi b/kombu-stubs/utils/debug.pyi index f488ca1..a3712a0 100644 --- a/kombu-stubs/utils/debug.pyi +++ b/kombu-stubs/utils/debug.pyi @@ -4,12 +4,12 @@ from typing import Any __all__ = ("setup_logging", "Logwrapped") class Logwrapped: - obj: Any + instance: Any logger: Logger - ident: str + ident: str | None def __init__( - self, obj: Any, logger: Logger | None = ..., ident: str | None = ... + self, instance: Any, logger: Logger | None = ..., ident: str | None = ... ) -> None: ... def __getattr__(self, key: str) -> Any: ... diff --git a/kombu-stubs/utils/eventio.pyi b/kombu-stubs/utils/eventio.pyi index 0f7ab89..8914c17 100644 --- a/kombu-stubs/utils/eventio.pyi +++ b/kombu-stubs/utils/eventio.pyi @@ -1,8 +1,10 @@ from collections.abc import Callable from typing import Any +__all__: tuple[str, ...] + READ: int WRITE: int ERR: int -def poll() -> Any: ... +def poll(*args: Any) -> Any: ... diff --git a/kombu-stubs/utils/url.pyi b/kombu-stubs/utils/url.pyi index 51e16bc..13599b8 100644 --- a/kombu-stubs/utils/url.pyi +++ b/kombu-stubs/utils/url.pyi @@ -1,5 +1,10 @@ +from collections.abc import Callable, Mapping +from logging import Logger from typing import Any, NamedTuple -from urllib.parse import ParseResult + +ssl_available: bool +safequote: Callable[..., str] +logger: Logger class urlparts(NamedTuple): scheme: str @@ -7,8 +12,8 @@ class urlparts(NamedTuple): port: int | None username: str | None password: str | None - path: str - query: dict[str, Any] + path: str | None + query: Mapping[str, Any] def parse_url(url: str) -> dict[str, Any]: ... def url_to_parts(url: str) -> urlparts: ... @@ -25,7 +30,4 @@ def as_url( ) -> str: ... def sanitize_url(url: str, mask: str = ...) -> str: ... def maybe_sanitize_url(url: str, mask: str = ...) -> str: ... -def safequote( - string: str, *, safe: str = ..., encoding: str | None = ..., errors: str | None = ... -) -> str: ... def parse_ssl_cert_reqs(query_value: str | None) -> int | None: ... From d82c86d4d473014beb7972b82cc09ff3e97e2007 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sat, 3 Jan 2026 18:13:22 +0100 Subject: [PATCH 07/24] Fix kombu stubs for stubtest compliance - Fix transport stubs: redis, azureservicebus, mongodb, confluentkafka, azurestoragequeues, qpid, pyro, filesystem, zookeeper, memory, SLMQ, SQS, gcpubsub, native_delayed_delivery - Convert asynchronous/aws from single file to package structure with proper submodules for connection, ext, and sqs/ - Convert transport/sqlalchemy from single file to package with models - Add stubtest allowlist for unfixable issues (librabbitmq C extension, types-redis metaclass quirks, kombu bug in utils.__all__) - Install optional dependencies for comprehensive stubtest coverage --- kombu-stubs/asynchronous/aws.pyi | 4 - kombu-stubs/asynchronous/aws/__init__.pyi | 9 + kombu-stubs/asynchronous/aws/connection.pyi | 100 ++ kombu-stubs/asynchronous/aws/ext.pyi | 9 + kombu-stubs/asynchronous/aws/sqs/__init__.pyi | 1 + .../asynchronous/aws/sqs/connection.pyi | 93 ++ kombu-stubs/asynchronous/aws/sqs/ext.pyi | 1 + kombu-stubs/asynchronous/aws/sqs/message.pyi | 11 + kombu-stubs/asynchronous/aws/sqs/queue.pyi | 79 ++ kombu-stubs/transport/SLMQ.pyi | 6 +- kombu-stubs/transport/SQS.pyi | 114 +- kombu-stubs/transport/azureservicebus.pyi | 82 +- kombu-stubs/transport/azurestoragequeues.pyi | 46 +- kombu-stubs/transport/confluentkafka.pyi | 76 +- kombu-stubs/transport/filesystem.pyi | 16 +- kombu-stubs/transport/gcpubsub.pyi | 98 +- kombu-stubs/transport/memory.pyi | 6 +- kombu-stubs/transport/mongodb.pyi | 78 +- .../transport/native_delayed_delivery.pyi | 2 +- kombu-stubs/transport/pyro.pyi | 13 +- kombu-stubs/transport/qpid.pyi | 18 +- kombu-stubs/transport/redis.pyi | 212 +++- kombu-stubs/transport/sqlalchemy.pyi | 11 - kombu-stubs/transport/sqlalchemy/__init__.pyi | 36 + kombu-stubs/transport/sqlalchemy/models.pyi | 35 + kombu-stubs/transport/zookeeper.pyi | 8 +- kombu-stubs/utils/__init__.pyi | 7 +- kombu-stubs/utils/eventio.pyi | 2 +- pyproject.toml | 14 + stubtest-allowlist-kombu.txt | 16 + uv.lock | 989 +++++++++++++++++- 31 files changed, 2122 insertions(+), 70 deletions(-) delete mode 100644 kombu-stubs/asynchronous/aws.pyi create mode 100644 kombu-stubs/asynchronous/aws/__init__.pyi create mode 100644 kombu-stubs/asynchronous/aws/connection.pyi create mode 100644 kombu-stubs/asynchronous/aws/ext.pyi create mode 100644 kombu-stubs/asynchronous/aws/sqs/__init__.pyi create mode 100644 kombu-stubs/asynchronous/aws/sqs/connection.pyi create mode 100644 kombu-stubs/asynchronous/aws/sqs/ext.pyi create mode 100644 kombu-stubs/asynchronous/aws/sqs/message.pyi create mode 100644 kombu-stubs/asynchronous/aws/sqs/queue.pyi delete mode 100644 kombu-stubs/transport/sqlalchemy.pyi create mode 100644 kombu-stubs/transport/sqlalchemy/__init__.pyi create mode 100644 kombu-stubs/transport/sqlalchemy/models.pyi create mode 100644 stubtest-allowlist-kombu.txt diff --git a/kombu-stubs/asynchronous/aws.pyi b/kombu-stubs/asynchronous/aws.pyi deleted file mode 100644 index 10629d4..0000000 --- a/kombu-stubs/asynchronous/aws.pyi +++ /dev/null @@ -1,4 +0,0 @@ -from typing import Any - -class AsyncConnection: - def __init__(self, *args: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/asynchronous/aws/__init__.pyi b/kombu-stubs/asynchronous/aws/__init__.pyi new file mode 100644 index 0000000..944d938 --- /dev/null +++ b/kombu-stubs/asynchronous/aws/__init__.pyi @@ -0,0 +1,9 @@ +from typing import Any + +from kombu.asynchronous.aws.sqs.connection import AsyncSQSConnection + +def connect_sqs( + aws_access_key_id: str | None = ..., + aws_secret_access_key: str | None = ..., + **kwargs: Any +) -> AsyncSQSConnection: ... diff --git a/kombu-stubs/asynchronous/aws/connection.pyi b/kombu-stubs/asynchronous/aws/connection.pyi new file mode 100644 index 0000000..91800b4 --- /dev/null +++ b/kombu-stubs/asynchronous/aws/connection.pyi @@ -0,0 +1,100 @@ +from email.mime.message import MIMEMessage +from typing import Any + +from kombu.asynchronous.http.base import Request as _Request +from vine import promise + +__all__ = ("AsyncHTTPSConnection", "AsyncConnection") + +def message_from_headers(hdr: list[tuple[str, str]]) -> Any: ... + +class AsyncHTTPResponse: + response: Any + _msg: MIMEMessage | None + version: int + + def __init__(self, response: Any) -> None: ... + def read(self, *args: Any, **kwargs: Any) -> bytes: ... + def getheader(self, name: str, default: str | None = ...) -> str | None: ... + def getheaders(self) -> list[tuple[str, str]]: ... + @property + def msg(self) -> MIMEMessage: ... + @property + def status(self) -> int: ... + @property + def reason(self) -> str: ... + +_AsyncHTTPResponse = AsyncHTTPResponse + +class AsyncHTTPSConnection: + Request: type[_Request] + Response: type[_AsyncHTTPResponse] + + method: str + path: str + body: bytes | None + default_ports: dict[str, int] + headers: list[tuple[str, str]] + timeout: float + strict: Any + http_client: Any + + def __init__( + self, strict: Any = ..., timeout: float = ..., http_client: Any = ... + ) -> None: ... + def request( + self, method: str, path: str, body: Any = ..., headers: Any = ... + ) -> None: ... + def getrequest(self) -> _Request: ... + def getresponse(self, callback: Any = ...) -> Any: ... + def set_debuglevel(self, level: int) -> None: ... + def connect(self) -> None: ... + def close(self) -> None: ... + def putrequest(self, method: str, path: str) -> None: ... + def putheader(self, header: str, value: str) -> None: ... + def endheaders(self) -> None: ... + def send(self, data: bytes) -> None: ... + +class AsyncConnection: + sqs_connection: Any + _httpclient: Any + + def __init__( + self, sqs_connection: Any, http_client: Any = ..., **kwargs: Any + ) -> None: ... + def get_http_connection(self) -> AsyncHTTPSConnection: ... + +class AsyncAWSQueryConnection(AsyncConnection): + STATUS_CODE_OK: int + STATUS_CODE_REQUEST_TIMEOUT: int + STATUS_CODE_NETWORK_CONNECT_TIMEOUT_ERROR: int + STATUS_CODE_INTERNAL_ERROR: int + STATUS_CODE_BAD_GATEWAY: int + STATUS_CODE_SERVICE_UNAVAILABLE_ERROR: int + STATUS_CODE_GATEWAY_TIMEOUT: int + STATUS_CODES_SERVER_ERRORS: tuple[int, ...] + STATUS_CODES_TIMEOUT: tuple[int, ...] + + def __init__( + self, sqs_connection: Any, http_client: Any = ..., + http_client_params: dict[str, Any] | None = ..., **kwargs: Any + ) -> None: ... + def make_request( + self, operation: str, params_: dict[str, Any], path: str, verb: str, + callback: Any = ..., protocol_params: dict[str, Any] | None = ... + ) -> promise: ... + def get_list( + self, operation: str, params: dict[str, Any], markers: Any, + path: str = ..., parent: Any = ..., verb: str = ..., + callback: Any = ..., protocol_params: dict[str, Any] | None = ... + ) -> promise: ... + def get_object( + self, operation: str, params: dict[str, Any], path: str = ..., + parent: Any = ..., verb: str = ..., callback: Any = ..., + protocol_params: dict[str, Any] | None = ... + ) -> promise: ... + def get_status( + self, operation: str, params: dict[str, Any], path: str = ..., + parent: Any = ..., verb: str = ..., callback: Any = ..., + protocol_params: dict[str, Any] | None = ... + ) -> promise: ... diff --git a/kombu-stubs/asynchronous/aws/ext.pyi b/kombu-stubs/asynchronous/aws/ext.pyi new file mode 100644 index 0000000..2b5c8ee --- /dev/null +++ b/kombu-stubs/asynchronous/aws/ext.pyi @@ -0,0 +1,9 @@ +from typing import Any + +import boto3 as boto3 +from botocore import exceptions as exceptions +from botocore.awsrequest import AWSRequest as AWSRequest +from botocore.httpsession import get_cert_path as get_cert_path +from botocore.response import get_response as get_response + +__all__ = ("exceptions", "AWSRequest", "get_response", "get_cert_path") diff --git a/kombu-stubs/asynchronous/aws/sqs/__init__.pyi b/kombu-stubs/asynchronous/aws/sqs/__init__.pyi new file mode 100644 index 0000000..f51e92c --- /dev/null +++ b/kombu-stubs/asynchronous/aws/sqs/__init__.pyi @@ -0,0 +1 @@ +# Empty module diff --git a/kombu-stubs/asynchronous/aws/sqs/connection.pyi b/kombu-stubs/asynchronous/aws/sqs/connection.pyi new file mode 100644 index 0000000..2a4bff5 --- /dev/null +++ b/kombu-stubs/asynchronous/aws/sqs/connection.pyi @@ -0,0 +1,93 @@ +from typing import Any + +from vine import promise + +from kombu.asynchronous.aws.connection import AsyncAWSQueryConnection +from kombu.asynchronous.aws.sqs.message import AsyncMessage +from kombu.asynchronous.aws.sqs.queue import AsyncQueue + +__all__ = ("AsyncSQSConnection",) + +class AsyncSQSConnection(AsyncAWSQueryConnection): + message_system_attribute_names: list[str] + message_attribute_names: list[str] + + def __init__( + self, sqs_connection: Any, debug: int = ..., + region: str | None = ..., + message_system_attribute_names: list[str] | None = ..., + message_attribute_names: list[str] | None = ..., + **kwargs: Any + ) -> None: ... + def make_request( + self, operation_name: str, params: dict[str, Any], queue_url: str, + verb: str, callback: Any = ..., + protocol_params: dict[str, Any] | None = ... + ) -> promise: ... + def create_queue( + self, queue_name: str, visibility_timeout: int | None = ..., + callback: Any = ... + ) -> promise: ... + def delete_queue( + self, queue: AsyncQueue, force_deletion: bool = ..., + callback: Any = ... + ) -> promise: ... + def get_queue_url(self, queue: str) -> str: ... + def get_queue_attributes( + self, queue: AsyncQueue, attribute: str = ..., callback: Any = ... + ) -> promise: ... + def set_queue_attribute( + self, queue: AsyncQueue, attribute: str, value: Any, + callback: Any = ... + ) -> promise: ... + def receive_message( + self, queue: AsyncQueue, queue_url: str, number_messages: int = ..., + visibility_timeout: int | None = ..., attributes: list[str] | None = ..., + wait_time_seconds: int | None = ..., callback: Any = ... + ) -> promise: ... + def delete_message( + self, queue: str | AsyncQueue, receipt_handle: str, + callback: Any = ... + ) -> promise: ... + def delete_message_batch( + self, queue: AsyncQueue, messages: list[Any], callback: Any = ... + ) -> promise: ... + def delete_message_from_handle( + self, queue: str | AsyncQueue, receipt_handle: str, + callback: Any = ... + ) -> promise: ... + def send_message( + self, queue: AsyncQueue, message_content: str, + delay_seconds: int | None = ..., callback: Any = ... + ) -> promise: ... + def send_message_batch( + self, queue: AsyncQueue, messages: list[tuple[str, str, int]], + callback: Any = ... + ) -> promise: ... + def change_message_visibility( + self, queue: AsyncQueue, receipt_handle: str, + visibility_timeout: int, callback: Any = ... + ) -> promise: ... + def change_message_visibility_batch( + self, queue: AsyncQueue, messages: list[tuple[Any, int]], + callback: Any = ... + ) -> promise: ... + def get_all_queues( + self, prefix: str = ..., callback: Any = ... + ) -> promise: ... + def get_queue( + self, queue_name: str, callback: Any = ... + ) -> promise: ... + def lookup( + self, queue_name: str, callback: Any = ... + ) -> promise: ... + def get_dead_letter_source_queues( + self, queue: AsyncQueue, callback: Any = ... + ) -> promise: ... + def add_permission( + self, queue: AsyncQueue, label: str, aws_account_id: str, + action_name: str, callback: Any = ... + ) -> promise: ... + def remove_permission( + self, queue: AsyncQueue, label: str, callback: Any = ... + ) -> promise: ... diff --git a/kombu-stubs/asynchronous/aws/sqs/ext.pyi b/kombu-stubs/asynchronous/aws/sqs/ext.pyi new file mode 100644 index 0000000..965d285 --- /dev/null +++ b/kombu-stubs/asynchronous/aws/sqs/ext.pyi @@ -0,0 +1 @@ +import boto3 as boto3 diff --git a/kombu-stubs/asynchronous/aws/sqs/message.pyi b/kombu-stubs/asynchronous/aws/sqs/message.pyi new file mode 100644 index 0000000..75b616a --- /dev/null +++ b/kombu-stubs/asynchronous/aws/sqs/message.pyi @@ -0,0 +1,11 @@ +from typing import Any + +from kombu.message import Message + +class BaseAsyncMessage(Message): ... + +class AsyncRawMessage(BaseAsyncMessage): ... + +class AsyncMessage(BaseAsyncMessage): + def encode(self, value: str) -> str: ... + def __getitem__(self, item: str) -> Any: ... diff --git a/kombu-stubs/asynchronous/aws/sqs/queue.pyi b/kombu-stubs/asynchronous/aws/sqs/queue.pyi new file mode 100644 index 0000000..3e497f4 --- /dev/null +++ b/kombu-stubs/asynchronous/aws/sqs/queue.pyi @@ -0,0 +1,79 @@ +from typing import Any, NoReturn + +from vine import promise + +from kombu.asynchronous.aws.sqs.message import AsyncMessage + +def list_first(rs: list[Any]) -> Any | None: ... + +class AsyncQueue: + connection: Any + url: str | None + message_class: type[AsyncMessage] + visibility_timeout: int | None + + def __init__( + self, connection: Any = ..., url: str | None = ..., + message_class: type[AsyncMessage] = ... + ) -> None: ... + def _NA(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def clear(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def count_slow(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def dump(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def load(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def load_from_file(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def load_from_filename(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def load_from_s3(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def save(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def save_to_file(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def save_to_filename(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def save_to_s3(self, *args: Any, **kwargs: Any) -> NoReturn: ... + def get_attributes( + self, attributes: str = ..., callback: Any = ... + ) -> promise: ... + def set_attribute( + self, attribute: str, value: Any, callback: Any = ... + ) -> promise: ... + def get_timeout(self, callback: Any = ...) -> promise: ... + def _coerce_field_value(self, key: str, type: type, response: Any) -> Any: ... + def set_timeout( + self, visibility_timeout: int, callback: Any = ... + ) -> promise: ... + def _on_timeout_set(self, visibility_timeout: int | None) -> int | None: ... + def add_permission( + self, label: str, aws_account_id: str, action_name: str, + callback: Any = ... + ) -> promise: ... + def remove_permission( + self, label: str, callback: Any = ... + ) -> promise: ... + def read( + self, visibility_timeout: int | None = ..., + wait_time_seconds: int | None = ..., callback: Any = ... + ) -> promise: ... + def write( + self, message: Any, delay_seconds: int | None = ..., + callback: Any = ... + ) -> promise: ... + def write_batch( + self, messages: list[Any], callback: Any = ... + ) -> promise: ... + def _on_message_sent(self, orig_message: Any, new_message: Any) -> Any: ... + def get_messages( + self, num_messages: int = ..., visibility_timeout: int | None = ..., + attributes: Any = ..., wait_time_seconds: int | None = ..., + callback: Any = ... + ) -> promise: ... + def delete_message( + self, message: Any, callback: Any = ... + ) -> promise: ... + def delete_message_batch( + self, messages: list[Any], callback: Any = ... + ) -> promise: ... + def change_message_visibility_batch( + self, messages: list[Any], callback: Any = ... + ) -> promise: ... + def delete(self, callback: Any = ...) -> promise: ... + def count( + self, page_size: int = ..., vtimeout: int = ..., callback: Any = ... + ) -> promise: ... diff --git a/kombu-stubs/transport/SLMQ.pyi b/kombu-stubs/transport/SLMQ.pyi index 1d9d777..6759929 100644 --- a/kombu-stubs/transport/SLMQ.pyi +++ b/kombu-stubs/transport/SLMQ.pyi @@ -32,8 +32,10 @@ class Channel(VirtualChannel): @property def transport_options(self) -> dict[str, Any]: ... +_Channel = Channel + class Transport(VirtualTransport): - Channel: type[Channel] + Channel: type[_Channel] driver_type: str driver_name: str - connection_errors: tuple[type[Exception], ...] + connection_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] diff --git a/kombu-stubs/transport/SQS.pyi b/kombu-stubs/transport/SQS.pyi index f20d448..f381d83 100644 --- a/kombu-stubs/transport/SQS.pyi +++ b/kombu-stubs/transport/SQS.pyi @@ -1,11 +1,119 @@ +import re +from logging import Logger from typing import Any +from kombu.transport.virtual import Channel as VirtualChannel +from kombu.transport.virtual import QoS as VirtualQoS from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +logger: Logger +CHARS_REPLACE_TABLE: dict[int, int] +SQS_MAX_MESSAGES: int + +def maybe_int(x: Any) -> int | Any: ... + +class UndefinedQueueException(Exception): ... +class InvalidQueueException(Exception): ... +class AccessDeniedQueueException(Exception): ... +class DoesNotExistQueueException(Exception): ... + +class QoS(VirtualQoS): + def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def apply_backoff_policy( + self, routing_key: str, delivery_tag: int, + backoff_policy: dict[int, int], backoff_tasks: list[str] + ) -> None: ... + def extract_task_name_and_number_of_retries( + self, delivery_tag: int + ) -> tuple[str, int]: ... + +_QoS = QoS + +class Channel(VirtualChannel): + default_region: str + default_visibility_timeout: int + default_wait_time_seconds: int + domain_format: str + _asynsqs: Any | None + _predefined_queue_async_clients: dict[str, Any] + _sqs: Any | None + _predefined_queue_clients: dict[str, Any] + _queue_cache: dict[str, str] + _noack_queues: set[str] + QoS: type[_QoS] + B64_REGEX: re.Pattern[bytes] + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def basic_consume( + self, queue: str, no_ack: bool, *args: Any, **kwargs: Any + ) -> str: ... + def basic_cancel(self, consumer_tag: str) -> Any: ... + def drain_events( + self, timeout: float | None = ..., callback: Any | None = ..., **kwargs: Any + ) -> None: ... + def entity_name( + self, name: str, table: dict[int, int] = ... + ) -> str: ... + def canonical_queue_name(self, queue_name: str) -> str: ... + def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... + def close(self) -> None: ... + def new_sqs_client( + self, region: str, access_key_id: str, + secret_access_key: str, session_token: str | None = ... + ) -> Any: ... + def sqs(self, queue: str | None = ...) -> Any: ... + def asynsqs(self, queue: str | None = ...) -> Any: ... + def generate_sts_session_token( + self, role_arn: str, token_expiry_seconds: int + ) -> dict[str, Any]: ... + def generate_sts_session_token_with_buffer( + self, role_arn: str, token_expiry_seconds: int, token_buffer_seconds: int = ... + ) -> dict[str, Any]: ... + @property + def conninfo(self) -> Any: ... + @property + def transport_options(self) -> dict[str, Any]: ... + @cached_property + def visibility_timeout(self) -> int: ... + @cached_property + def predefined_queues(self) -> dict[str, Any]: ... + @cached_property + def queue_name_prefix(self) -> str: ... + @cached_property + def supports_fanout(self) -> bool: ... + @cached_property + def region(self) -> str: ... + @cached_property + def regioninfo(self) -> Any: ... + @cached_property + def is_secure(self) -> bool | None: ... + @cached_property + def port(self) -> int | None: ... + @cached_property + def endpoint_url(self) -> str | None: ... + @cached_property + def wait_time_seconds(self) -> int: ... + @cached_property + def sqs_base64_encoding(self) -> bool: ... + @cached_property + def fetch_message_attributes(self) -> Any: ... + @property + def get_message_attributes(self) -> dict[str, Any]: ... + +_Channel = Channel class Transport(VirtualTransport): + Channel: type[_Channel] + + polling_interval: int + wait_time_seconds: int + default_port: None + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] driver_type: str driver_name: str + implements: Any -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + @property + def default_connection_params(self) -> dict[str, Any]: ... diff --git a/kombu-stubs/transport/azureservicebus.pyi b/kombu-stubs/transport/azureservicebus.pyi index f20d448..135290a 100644 --- a/kombu-stubs/transport/azureservicebus.pyi +++ b/kombu-stubs/transport/azureservicebus.pyi @@ -1,11 +1,81 @@ -from typing import Any +from typing import Any, NamedTuple +from azure.servicebus import ServiceBusClient, ServiceBusReceiver, ServiceBusSender +from azure.servicebus.management import ServiceBusAdministrationClient +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +PUNCTUATIONS_TO_REPLACE: set[str] +CHARS_REPLACE_TABLE: dict[int, int] + +class SendReceive: + receiver: ServiceBusReceiver | None + sender: ServiceBusSender | None + + def __init__( + self, + receiver: ServiceBusReceiver | None = ..., + sender: ServiceBusSender | None = ..., + ) -> None: ... + def close(self) -> None: ... + +class Channel(VirtualChannel): + default_wait_time_seconds: int + default_peek_lock_seconds: int + default_uamqp_keep_alive_interval: int + default_retry_total: int + default_retry_backoff_factor: float + default_retry_backoff_max: int + domain_format: str + _queue_cache: dict[str, SendReceive] + _noack_queues: set[str] + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def basic_consume( + self, queue: str, no_ack: bool, *args: Any, **kwargs: Any + ) -> str: ... + def basic_cancel(self, consumer_tag: str) -> None: ... + def entity_name( + self, name: str, table: dict[int, int] | None = ... + ) -> str: ... + def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... # type: ignore[override] + def close(self) -> None: ... + @cached_property + def queue_service(self) -> ServiceBusClient: ... + @cached_property + def queue_mgmt_service(self) -> ServiceBusAdministrationClient: ... + @property + def conninfo(self) -> Any: ... + @property + def transport_options(self) -> dict[str, Any]: ... + @cached_property + def queue_name_prefix(self) -> str: ... + @cached_property + def wait_time_seconds(self) -> int: ... + @cached_property + def peek_lock_seconds(self) -> int: ... + @cached_property + def uamqp_keep_alive_interval(self) -> int: ... + @cached_property + def retry_total(self) -> int: ... + @cached_property + def retry_backoff_factor(self) -> float: ... + @cached_property + def retry_backoff_max(self) -> int: ... + +_Channel = Channel class Transport(VirtualTransport): - driver_type: str - driver_name: str + Channel: type[_Channel] + + polling_interval: int + default_port: None + can_parse_url: bool -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + @staticmethod + def parse_uri(uri: str) -> tuple[str, Any]: ... + @classmethod + def as_uri( + cls, uri: str, include_password: bool = ..., mask: str = ... + ) -> str: ... diff --git a/kombu-stubs/transport/azurestoragequeues.pyi b/kombu-stubs/transport/azurestoragequeues.pyi index f20d448..733258b 100644 --- a/kombu-stubs/transport/azurestoragequeues.pyi +++ b/kombu-stubs/transport/azurestoragequeues.pyi @@ -1,11 +1,47 @@ from typing import Any +from azure.storage.queue import QueueServiceClient +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +CHARS_REPLACE_TABLE: dict[int, int] + +class Channel(VirtualChannel): + domain_format: str + _queue_service: QueueServiceClient | None + _queue_name_cache: dict[Any, Any] + no_ack: bool + _noack_queues: set[Any] + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def basic_consume( + self, queue: str, no_ack: bool, *args: Any, **kwargs: Any + ) -> str: ... + def entity_name( + self, name: str, table: dict[int, int] = ... + ) -> str: ... + @property + def queue_service(self) -> QueueServiceClient: ... + @property + def conninfo(self) -> Any: ... + @property + def transport_options(self) -> dict[str, Any]: ... + @cached_property + def queue_name_prefix(self) -> str: ... + +_Channel = Channel class Transport(VirtualTransport): - driver_type: str - driver_name: str + Channel: type[_Channel] + + polling_interval: int + default_port: int | None + can_parse_url: bool -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + @staticmethod + def parse_uri(uri: str) -> tuple[Any, str]: ... + @classmethod + def as_uri( + cls, uri: str, include_password: bool = ..., mask: str = ... + ) -> str: ... diff --git a/kombu-stubs/transport/confluentkafka.pyi b/kombu-stubs/transport/confluentkafka.pyi index f20d448..745f930 100644 --- a/kombu-stubs/transport/confluentkafka.pyi +++ b/kombu-stubs/transport/confluentkafka.pyi @@ -1,11 +1,81 @@ +from logging import Logger from typing import Any +from confluent_kafka import KafkaException, Consumer, Producer # type: ignore[import-untyped] +from confluent_kafka.admin import AdminClient # type: ignore[import-untyped] +from kombu.transport.virtual import Channel as VirtualChannel +from kombu.transport.virtual import Message as VirtualMessage +from kombu.transport.virtual import QoS as VirtualQoS from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +logger: Logger +DEFAULT_PORT: int +KAFKA_CONNECTION_ERRORS: tuple[type[Exception], ...] +KAFKA_CHANNEL_ERRORS: tuple[type[Exception], ...] + +class NoBrokersAvailable(KafkaException): + retriable: bool + +class Message(VirtualMessage): + topic: str | None + + def __init__( + self, payload: dict[str, Any], channel: Any | None = ..., **kwargs: Any + ) -> None: ... + +_Message = Message + +class QoS(VirtualQoS): + _not_yet_acked: dict[int, Any] + + def can_consume(self) -> bool: ... + def can_consume_max_estimate(self) -> int: ... + def append(self, message: Any, delivery_tag: int) -> None: ... + def get(self, delivery_tag: int) -> Any: ... + def ack(self, delivery_tag: int) -> None: ... + def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def restore_unacked_once(self, stderr: Any | None = ...) -> None: ... + +_QoS = QoS + +class Channel(VirtualChannel): + QoS: type[_QoS] + Message: type[_Message] + + default_wait_time_seconds: int + default_connection_wait_time_seconds: int + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def sanitize_queue_name(self, queue: str) -> str: ... + def close(self) -> None: ... + @property + def client(self) -> AdminClient: ... + @property + def options(self) -> dict[str, Any]: ... + @property + def conninfo(self) -> Any: ... + @cached_property + def wait_time_seconds(self) -> int: ... + @cached_property + def connection_wait_time_seconds(self) -> int: ... + @cached_property + def common_config(self) -> dict[str, Any]: ... + +_Channel = Channel class Transport(VirtualTransport): + Channel: type[_Channel] + + default_port: int driver_type: str driver_name: str + recoverable_connection_errors: tuple[type[Exception], ...] -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + def __init__(self, client: Any, **kwargs: Any) -> None: ... + def as_uri( # type: ignore[override] + self, uri: str, include_password: bool = ..., mask: str = ... + ) -> None: ... + def driver_version(self) -> str: ... + def establish_connection(self) -> Any: ... + def close_connection(self, connection: Any) -> None: ... diff --git a/kombu-stubs/transport/filesystem.pyi b/kombu-stubs/transport/filesystem.pyi index be0e929..6a2bd77 100644 --- a/kombu-stubs/transport/filesystem.pyi +++ b/kombu-stubs/transport/filesystem.pyi @@ -3,6 +3,8 @@ from typing import Any, NamedTuple from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.transport.virtual.base import BrokerState +from kombu.utils.objects import cached_property VERSION: tuple[int, int, int] @@ -18,14 +20,20 @@ class Channel(VirtualChannel): supports_fanout: bool data_folder_in: Any data_folder_out: Any - control_folder: Any processed_folder: Any - store_processed: bool - transport_options: dict[str, Any] def __init__(self, connection: Any, **kwargs: Any) -> None: ... + @property + def control_folder(self) -> Any: ... + @cached_property + def store_processed(self) -> bool: ... + @property + def transport_options(self) -> dict[str, Any]: ... + +_Channel = Channel class Transport(VirtualTransport): - Channel: type[Channel] + Channel: type[_Channel] driver_type: str driver_name: str + global_state: BrokerState diff --git a/kombu-stubs/transport/gcpubsub.pyi b/kombu-stubs/transport/gcpubsub.pyi index f20d448..bfd618f 100644 --- a/kombu-stubs/transport/gcpubsub.pyi +++ b/kombu-stubs/transport/gcpubsub.pyi @@ -1,11 +1,99 @@ +import dataclasses +import threading +from concurrent.futures import Future, ThreadPoolExecutor +from logging import Logger from typing import Any -from kombu.transport.virtual import Transport as VirtualTransport +from google.cloud.monitoring_v3 import MetricServiceClient +from google.cloud.pubsub_v1 import PublisherClient, SubscriberClient # type: ignore[import-untyped] -class Transport(VirtualTransport): +from kombu.transport import virtual +from kombu.utils.objects import cached_property + +logger: Logger + +PUNCTUATIONS_TO_REPLACE: set[str] +CHARS_REPLACE_TABLE: dict[int, int] + +class UnackedIds: + def __init__(self) -> None: ... + def append(self, val: Any) -> None: ... + def extend(self, vals: list[Any]) -> None: ... + def pop(self, index: int = ...) -> Any: ... + def remove(self, val: Any) -> None: ... + def __len__(self) -> int: ... + def __getitem__(self, item: int) -> Any: ... + +class AtomicCounter: + def __init__(self, initial: int = ...) -> None: ... + def inc(self, n: int = ...) -> int: ... + def dec(self, n: int = ...) -> int: ... + def get(self) -> int: ... + +@dataclasses.dataclass +class QueueDescriptor: + name: str + topic_path: str + subscription_id: str + subscription_path: str + unacked_ids: UnackedIds = ... + +class Channel(virtual.Channel): + supports_fanout: bool + do_restore: bool + default_wait_time_seconds: int + default_ack_deadline_seconds: int + default_expiration_seconds: int + default_retry_timeout_seconds: int + default_bulk_max_messages: int + + pool: ThreadPoolExecutor + project_id: str + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... + def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... + def after_reply_message_received(self, queue: str) -> None: ... + def close(self) -> None: ... + @cached_property + def subscriber(self) -> SubscriberClient: ... + @cached_property + def publisher(self) -> PublisherClient: ... + @cached_property + def monitor(self) -> MetricServiceClient: ... + @property + def conninfo(self) -> Any: ... + @property + def transport_options(self) -> dict[str, Any]: ... + @cached_property + def wait_time_seconds(self) -> int: ... + @cached_property + def retry_timeout_seconds(self) -> int: ... + @cached_property + def ack_deadline_seconds(self) -> int: ... + @cached_property + def queue_name_prefix(self) -> str: ... + @cached_property + def expiration_seconds(self) -> int: ... + @cached_property + def bulk_max_messages(self) -> int: ... + +_Channel = Channel + +class Transport(virtual.Transport): + Channel: type[_Channel] + can_parse_url: bool + polling_interval: float + connection_errors: tuple[type[BaseException], ...] + channel_errors: tuple[type[BaseException], ...] driver_type: str driver_name: str + implements: Any -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + def __init__(self, client: Any, **kwargs: Any) -> None: ... + def driver_version(self) -> str: ... + @staticmethod + def parse_uri(uri: str) -> str: ... + @classmethod + def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... + def drain_events(self, connection: Any, timeout: float | None = ...) -> None: ... # type: ignore[override] diff --git a/kombu-stubs/transport/memory.pyi b/kombu-stubs/transport/memory.pyi index 4d50e1d..bb16682 100644 --- a/kombu-stubs/transport/memory.pyi +++ b/kombu-stubs/transport/memory.pyi @@ -4,6 +4,7 @@ from typing import Any from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.transport.virtual.base import BrokerState class Channel(VirtualChannel): events: defaultdict[str, set[Any]] @@ -14,8 +15,11 @@ class Channel(VirtualChannel): def __init__(self, connection: Any, **kwargs: Any) -> None: ... def close(self) -> None: ... +_Channel = Channel + class Transport(VirtualTransport): - Channel: type[Channel] + Channel: type[_Channel] default_port: int | None driver_type: str driver_name: str + global_state: BrokerState diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi index f20d448..f034109 100644 --- a/kombu-stubs/transport/mongodb.pyi +++ b/kombu-stubs/transport/mongodb.pyi @@ -1,11 +1,81 @@ -from typing import Any +from datetime import datetime, timedelta +from typing import Any, Iterator +from pymongo import errors +from pymongo.collection import Collection +from pymongo.cursor import Cursor +from pymongo.database import Database +from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +E_SERVER_VERSION: str +E_NO_TTL_INDEXES: str + +class BroadcastCursor: + def __init__(self, cursor: Cursor[Any]) -> None: ... + def get_size(self) -> int: ... + def close(self) -> None: ... + def purge(self, rewind: bool = ...) -> None: ... + def __iter__(self) -> Iterator[Any]: ... + def __next__(self) -> Any: ... + def next(self) -> Any: ... + +class Channel(VirtualChannel): + supports_fanout: bool + + ssl: bool + ttl: bool + connect_timeout: int | None + capped_queue_size: int + calc_queue_size: bool + + default_hostname: str + default_port: int + default_database: str + + messages_collection: str + routing_collection: str + broadcast_collection: str + queues_collection: str + + from_transport_options: tuple[str, ...] + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def get_table(self, exchange: str) -> frozenset[tuple[str, str, str]]: ... # type: ignore[override] + def queue_delete( # type: ignore[override] + self, queue: str, **kwargs: Any + ) -> int | None: ... + def prepare_queue_arguments( + self, arguments: dict[str, Any] | None, **kwargs: Any + ) -> dict[str, Any]: ... + def get_now(self) -> datetime: ... + @cached_property + def client(self) -> Database[Any]: ... + @cached_property + def messages(self) -> Collection[Any]: ... + @cached_property + def routing(self) -> Collection[Any]: ... + @cached_property + def broadcast(self) -> Collection[Any]: ... + @cached_property + def queues(self) -> Collection[Any]: ... + +_Channel = Channel class Transport(VirtualTransport): + Channel: type[_Channel] + + can_parse_url: bool + polling_interval: int + default_port: int + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] driver_type: str driver_name: str + implements: Any -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + def driver_version(self) -> str: ... + def as_uri( + self, uri: str, include_password: bool = ..., mask: str = ... + ) -> str: ... diff --git a/kombu-stubs/transport/native_delayed_delivery.pyi b/kombu-stubs/transport/native_delayed_delivery.pyi index fa031de..f1bfe5b 100644 --- a/kombu-stubs/transport/native_delayed_delivery.pyi +++ b/kombu-stubs/transport/native_delayed_delivery.pyi @@ -15,4 +15,4 @@ def declare_native_delayed_delivery_exchanges_and_queues( def bind_queue_to_native_delayed_delivery_exchange( connection: Connection, queue: Queue ) -> None: ... -def calculate_routing_key(countdown_in_seconds: int) -> str: ... +def calculate_routing_key(countdown: int, routing_key: str) -> str: ... diff --git a/kombu-stubs/transport/pyro.pyi b/kombu-stubs/transport/pyro.pyi index 79bee85..10e54e4 100644 --- a/kombu-stubs/transport/pyro.pyi +++ b/kombu-stubs/transport/pyro.pyi @@ -3,6 +3,8 @@ from typing import Any from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport +from kombu.transport.virtual.base import BrokerState +from kombu.utils.objects import cached_property DEFAULT_PORT: int E_NAMESERVER: str @@ -10,13 +12,20 @@ E_LOOKUP: str logger: Logger class Channel(VirtualChannel): - def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def __init__(self, connection: Any, **kwargs: Any) -> None: ... def close(self) -> None: ... def queues(self) -> list[str]: ... + @cached_property + def shared_queues(self) -> Any: ... + +_Channel = Channel class Transport(VirtualTransport): - Channel: type[Channel] + Channel: type[_Channel] driver_type: str driver_name: str connection_errors: tuple[type[Exception], ...] channel_errors: tuple[type[Exception], ...] + global_state: BrokerState + @cached_property + def shared_queues(self) -> Any: ... diff --git a/kombu-stubs/transport/qpid.pyi b/kombu-stubs/transport/qpid.pyi index b71e94f..31f7f6d 100644 --- a/kombu-stubs/transport/qpid.pyi +++ b/kombu-stubs/transport/qpid.pyi @@ -18,9 +18,14 @@ class AuthenticationFailure(Exception): ... class QoS(VirtualQoS): def __init__(self, session: Any, prefetch_count: int = ...) -> None: ... +_Channel = Channel + class Connection: + Channel: type[_Channel] + def __init__(self, **conn_info: Any) -> None: ... def close(self) -> None: ... + def close_channel(self, channel: Any) -> None: ... def get_qpid_connection(self) -> Any: ... _Message = Message @@ -69,5 +74,14 @@ class Transport(BaseTransport): Connection: type[_Connection] driver_type: str driver_name: str - connection_errors: tuple[type[Exception], ...] - channel_errors: tuple[type[Exception], ...] + polling_interval: None + connection_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] + channel_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] + recoverable_connection_errors: tuple[type[BaseException] | None, ...] # type: ignore[assignment] + recoverable_channel_errors: tuple[type[BaseException] | None, ...] # type: ignore[assignment] + + def __del__(self) -> None: ... + def drain_events( + self, connection: Any, timeout: int = ..., **kwargs: Any + ) -> None: ... + def verify_runtime_environment(self) -> None: ... diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi index f20d448..3243e71 100644 --- a/kombu-stubs/transport/redis.pyi +++ b/kombu-stubs/transport/redis.pyi @@ -1,11 +1,215 @@ -from typing import Any +from collections.abc import Callable, Generator +from contextlib import contextmanager +from logging import Logger +from typing import Any, NamedTuple +import redis as redis_module +import redis.client +from kombu.transport.virtual import Channel as VirtualChannel +from kombu.transport.virtual import QoS as VirtualQoS from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +logger: Logger +crit: Callable[..., None] +warning: Callable[..., None] + +DEFAULT_PORT: int +DEFAULT_DB: int +DEFAULT_HEALTH_CHECK_INTERVAL: int +PRIORITY_STEPS: list[int] + +class error_classes_t(NamedTuple): + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] + +def get_redis_error_classes() -> error_classes_t: ... +def get_redis_ConnectionError() -> type[Exception]: ... + +class MutexHeld(Exception): ... + +@contextmanager +def Mutex( + client: Any, name: str, expire: int +) -> Generator[None, None, None]: ... + +class GlobalKeyPrefixMixin: + PREFIXED_SIMPLE_COMMANDS: list[str] + PREFIXED_COMPLEX_COMMANDS: dict[str, dict[str, int | None]] + global_keyprefix: str + + def _prefix_args(self, args: tuple[Any, ...] | list[Any]) -> list[Any]: ... + def parse_response( + self, connection: Any, command_name: str, **options: Any + ) -> Any: ... + def execute_command(self, *args: Any, **kwargs: Any) -> Any: ... + def pipeline( + self, transaction: bool = ..., shard_hint: Any | None = ... + ) -> PrefixedRedisPipeline: ... + +class PrefixedStrictRedis(GlobalKeyPrefixMixin, redis_module.Redis[Any]): + global_keyprefix: str + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def pubsub(self, **kwargs: Any) -> PrefixedRedisPubSub: ... + +class PrefixedRedisPipeline(GlobalKeyPrefixMixin, redis_module.client.Pipeline[Any]): + global_keyprefix: str + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + +class PrefixedRedisPubSub(redis_module.client.PubSub): + PUBSUB_COMMANDS: tuple[str, ...] + global_keyprefix: str + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def _prefix_args(self, args: tuple[Any, ...] | list[Any]) -> list[Any]: ... + def parse_response(self, *args: Any, **kwargs: Any) -> Any: ... + def execute_command(self, *args: Any, **kwargs: Any) -> Any: ... + +class QoS(VirtualQoS): + restore_at_shutdown: bool + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def append(self, message: Any, delivery_tag: int) -> None: ... + def restore_unacked(self, client: Any | None = ...) -> None: ... + def ack(self, delivery_tag: int) -> None: ... + def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + @contextmanager + def pipe_or_acquire( + self, pipe: Any | None = ..., client: Any | None = ... + ) -> Generator[Any, None, None]: ... + def restore_visible( + self, start: int = ..., num: int = ..., interval: int = ... + ) -> None: ... + def restore_by_tag( + self, tag: str, client: Any | None = ..., leftmost: bool = ... + ) -> None: ... + @cached_property + def unacked_key(self) -> str: ... + @cached_property + def unacked_index_key(self) -> str: ... + @cached_property + def unacked_mutex_key(self) -> str: ... + @cached_property + def unacked_mutex_expire(self) -> int: ... + @cached_property + def visibility_timeout(self) -> int: ... + +class MultiChannelPoller: + eventflags: int + after_read: set[Any] | None + poller: Any + + def __init__(self) -> None: ... + def close(self) -> None: ... + def add(self, channel: Channel) -> None: ... + def discard(self, channel: Channel) -> None: ... + def on_poll_start(self) -> None: ... + def on_poll_init(self, poller: Any) -> Any: ... + def maybe_restore_messages(self) -> Any: ... + def maybe_check_subclient_health(self) -> None: ... + def on_readable(self, fileno: int) -> None: ... + def handle_event( + self, fileno: int, event: int + ) -> tuple[Any, MultiChannelPoller] | None: ... + def get( + self, callback: Callable[..., Any], timeout: float | None = ... + ) -> None: ... + @property + def fds(self) -> dict[int, tuple[Channel, str]]: ... + +_QoS = QoS + +class Channel(VirtualChannel): + QoS: type[_QoS] + + supports_fanout: bool + keyprefix_queue: str + keyprefix_fanout: str + sep: str + ack_emulation: bool + unacked_key: str + unacked_index_key: str + unacked_mutex_key: str + unacked_mutex_expire: int + unacked_restore_limit: int | None + visibility_timeout: int + priority_steps: list[int] + socket_timeout: float | None + socket_connect_timeout: float | None + socket_keepalive: bool | None + socket_keepalive_options: dict[str, Any] | None + retry_on_timeout: bool | None + max_connections: int + health_check_interval: int + client_name: str | None + fanout_prefix: bool | str + fanout_patterns: bool + global_keyprefix: str + queue_order_strategy: str + + connection_class: type[Any] | None + connection_class_ssl: type[Any] | None + + from_transport_options: tuple[str, ...] + + handlers: dict[str, Callable[..., Any]] + brpop_timeout: int + active_fanout_queues: set[str] + auto_delete_queues: set[str] + Client: type[Any] + ResponseError: type[Exception] + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def basic_consume(self, queue: str, *args: Any, **kwargs: Any) -> Any: ... + def basic_cancel(self, consumer_tag: str) -> Any: ... + def close(self) -> None: ... + def get_table(self, exchange: str) -> list[tuple[str, str, str]]: ... + def priority(self, n: int) -> int: ... + @contextmanager + def conn_or_acquire( + self, client: Any | None = ... + ) -> Generator[Any, None, None]: ... + @property + def pool(self) -> Any: ... + @property + def async_pool(self) -> Any: ... + @cached_property + def client(self) -> Any: ... + @cached_property + def subclient(self) -> Any: ... + @property + def active_queues(self) -> set[str]: ... + +_Channel = Channel class Transport(VirtualTransport): + Channel: type[_Channel] + + polling_interval: None # type: ignore[assignment] + brpop_timeout: int + default_port: int driver_type: str driver_name: str + implements: Any + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] + cycle: MultiChannelPoller | None # type: ignore[assignment] + + def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def driver_version(self) -> str: ... + def register_with_event_loop(self, connection: Any, loop: Any) -> None: ... + def on_readable(self, fileno: int) -> None: ... # type: ignore[override] + +class SentinelManagedSSLConnection: + def __init__(self, **kwargs: Any) -> None: ... + +class SentinelChannel(Channel): + from_transport_options: tuple[str, ...] + connection_class: type[Any] | None + connection_class_ssl: type[Any] | None -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... +class SentinelTransport(Transport): + default_port: int + Channel: type[SentinelChannel] diff --git a/kombu-stubs/transport/sqlalchemy.pyi b/kombu-stubs/transport/sqlalchemy.pyi deleted file mode 100644 index f20d448..0000000 --- a/kombu-stubs/transport/sqlalchemy.pyi +++ /dev/null @@ -1,11 +0,0 @@ -from typing import Any - -from kombu.transport.virtual import Transport as VirtualTransport - -class Transport(VirtualTransport): - driver_type: str - driver_name: str - -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/sqlalchemy/__init__.pyi b/kombu-stubs/transport/sqlalchemy/__init__.pyi new file mode 100644 index 0000000..71841f3 --- /dev/null +++ b/kombu-stubs/transport/sqlalchemy/__init__.pyi @@ -0,0 +1,36 @@ +from typing import Any + +from sqlalchemy.exc import OperationalError +from sqlalchemy.orm import Session +from kombu.transport.virtual import Channel as VirtualChannel +from kombu.transport.virtual import Transport as VirtualTransport +from kombu.utils.objects import cached_property + +VERSION: tuple[int, int, int] + +class Channel(VirtualChannel): + _session: Any | None + _engines: dict[str, Any] + queue_tablename: str + message_tablename: str + + def __init__(self, connection: Any, **kwargs: Any) -> None: ... + @property + def session(self) -> Session: ... + @cached_property + def queue_cls(self) -> type[Any]: ... + @cached_property + def message_cls(self) -> type[Any]: ... + +_Channel = Channel + +class Transport(VirtualTransport): + Channel: type[_Channel] + + can_parse_url: bool + default_port: int + driver_type: str + driver_name: str + connection_errors: tuple[type[OperationalError], ...] + + def driver_version(self) -> str: ... diff --git a/kombu-stubs/transport/sqlalchemy/models.pyi b/kombu-stubs/transport/sqlalchemy/models.pyi new file mode 100644 index 0000000..4c2a9c5 --- /dev/null +++ b/kombu-stubs/transport/sqlalchemy/models.pyi @@ -0,0 +1,35 @@ +from typing import Any + +from sqlalchemy.orm import RelationshipProperty +from sqlalchemy.schema import MetaData, Column + +class_registry: dict[str, Any] +metadata: MetaData +ModelBase: type[Any] + +class Queue: + __table_args__: dict[str, Any] + __tablename__: str + + id: Column[int] + name: Column[str] + messages: RelationshipProperty[Any] + + def __init__(self, name: str) -> None: ... + def __str__(self) -> str: ... + +class Message: + __table_args__: tuple[Any, ...] + __tablename__: str + __mapper_args__: dict[str, Any] + + id: Column[int] + visible: Column[bool] + sent_at: Column[Any] + payload: Column[str] + version: Column[int] + queue_id: Column[int] + queue: Queue + + def __init__(self, payload: str, queue: Queue) -> None: ... + def __str__(self) -> str: ... diff --git a/kombu-stubs/transport/zookeeper.pyi b/kombu-stubs/transport/zookeeper.pyi index bbbdede..764d9d8 100644 --- a/kombu-stubs/transport/zookeeper.pyi +++ b/kombu-stubs/transport/zookeeper.pyi @@ -8,10 +8,14 @@ KZ_CONNECTION_ERRORS: tuple[type[Exception], ...] KZ_CHANNEL_ERRORS: tuple[type[Exception], ...] class Channel(VirtualChannel): - def __init__(self, *args: Any, **kwargs: Any) -> None: ... + def __init__(self, connection: Any, **kwargs: Any) -> None: ... + @property + def client(self) -> Any: ... + +_Channel = Channel class Transport(VirtualTransport): - Channel: type[Channel] + Channel: type[_Channel] driver_type: str driver_name: str connection_errors: tuple[type[Exception], ...] diff --git a/kombu-stubs/utils/__init__.pyi b/kombu-stubs/utils/__init__.pyi index 93caeb8..cb16b99 100644 --- a/kombu-stubs/utils/__init__.pyi +++ b/kombu-stubs/utils/__init__.pyi @@ -6,8 +6,8 @@ from uuid import UUID from kombu.utils.functional import retry_over_time as retry_over_time from kombu.utils.objects import cached_property as cached_property -# Note: runtime __all__ includes reprkwargs but it's not actually importable (kombu bug) -# We match the runtime __all__ exactly to avoid stubtest errors +# Note: runtime __all__ includes reprkwargs but it's not actually defined (kombu bug) +# We match the runtime __all__ exactly __all__ = ( "EqualityDict", "uuid", @@ -26,7 +26,8 @@ __all__ = ( "maybe_fileno", ) -# Declared but not actually exported at runtime (kombu bug) +# Defined in __all__ but not actually implemented at runtime (kombu bug) +# We define it in the stub to match __all__ def reprkwargs(kwargs: Mapping[str, Any], sep: str = ..., fmt: str = ...) -> str: ... _T = TypeVar("_T") diff --git a/kombu-stubs/utils/eventio.pyi b/kombu-stubs/utils/eventio.pyi index 8914c17..14d199d 100644 --- a/kombu-stubs/utils/eventio.pyi +++ b/kombu-stubs/utils/eventio.pyi @@ -1,7 +1,7 @@ from collections.abc import Callable from typing import Any -__all__: tuple[str, ...] +__all__ = ("poll",) READ: int WRITE: int diff --git a/pyproject.toml b/pyproject.toml index bacb74b..8d361f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,20 @@ dev = [ "sphinx>=8.1.3", "pytest>=9.0.2", "types-docutils>=0.22.3.20251115", + "boto3>=1.42.19", + "botocore>=1.42.19", + "azure-servicebus>=7.14.3", + "azure-storage-queue>=12.14.1", + "google-cloud-pubsub>=2.34.0", + "redis>=7.1.0", + "sqlalchemy>=2.0.45", + "pymongo>=4.15.5", + "types-redis>=4.6.0.20241004", + "boto3-stubs>=1.42.19", + "six>=1.16.0", + "pycurl>=7.45.7", + "confluent-kafka>=2.12.2", + "google-cloud-monitoring>=2.28.0", ] diff --git a/stubtest-allowlist-kombu.txt b/stubtest-allowlist-kombu.txt new file mode 100644 index 0000000..0382cb1 --- /dev/null +++ b/stubtest-allowlist-kombu.txt @@ -0,0 +1,16 @@ +# Unfixable stubtest errors for kombu + +# librabbitmq is a C extension that can't be installed without the native library +kombu.transport.librabbitmq + +# types-redis stubs have a Protocol metaclass that differs from runtime +kombu.transport.redis.PrefixedRedisPipeline +kombu.transport.redis.PrefixedStrictRedis + +# kombu bug: reprkwargs is in __all__ but not defined at runtime +# See: https://github.com/celery/kombu/blob/main/kombu/utils/__init__.py +kombu.utils.reprkwargs + +# Google Cloud Pub/Sub exceptions have a custom metaclass (_GoogleAPICallErrorMeta) +# that stubtest cannot handle +kombu.transport.gcpubsub.Transport.channel_errors diff --git a/uv.lock b/uv.lock index db8b538..81ac2ce 100644 --- a/uv.lock +++ b/uv.lock @@ -1,8 +1,10 @@ version = 1 -revision = 3 +revision = 2 requires-python = ">=3.10, <4" resolution-markers = [ - "python_full_version >= '3.11'", + "python_full_version >= '3.14'", + "python_full_version == '3.13.*'", + "python_full_version >= '3.11' and python_full_version < '3.13'", "python_full_version < '3.11'", ] @@ -36,6 +38,57 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/89/49/5531992efc62f9c6d08a7199dc31176c8c60f7b2548c6ef245f96f29d0d9/asgiref-3.3.1-py3-none-any.whl", hash = "sha256:5ee950735509d04eb673bd7f7120f8fa1c9e2df495394992c73234d526907e17", size = 19983, upload-time = "2020-11-09T15:58:48.877Z" }, ] +[[package]] +name = "async-timeout" +version = "5.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a5/ae/136395dfbfe00dfc94da3f3e136d0b13f394cba8f4841120e34226265780/async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3", size = 9274, upload-time = "2024-11-06T16:41:39.6Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/ba/e2081de779ca30d473f21f5b30e0e737c438205440784c7dfc81efc2b029/async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c", size = 6233, upload-time = "2024-11-06T16:41:37.9Z" }, +] + +[[package]] +name = "azure-core" +version = "1.37.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "requests" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ef/83/41c9371c8298999c67b007e308a0a3c4d6a59c6908fa9c62101f031f886f/azure_core-1.37.0.tar.gz", hash = "sha256:7064f2c11e4b97f340e8e8c6d923b822978be3016e46b7bc4aa4b337cfb48aee", size = 357620, upload-time = "2025-12-11T20:05:13.518Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ee/34/a9914e676971a13d6cc671b1ed172f9804b50a3a80a143ff196e52f4c7ee/azure_core-1.37.0-py3-none-any.whl", hash = "sha256:b3abe2c59e7d6bb18b38c275a5029ff80f98990e7c90a5e646249a56630fcc19", size = 214006, upload-time = "2025-12-11T20:05:14.96Z" }, +] + +[[package]] +name = "azure-servicebus" +version = "7.14.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "azure-core" }, + { name = "isodate" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a8/d2/a5c11d4c955e2875de2383c1af8e43ce4899e8418b22e61d32d2bf103626/azure_servicebus-7.14.3.tar.gz", hash = "sha256:70a63384557aec0bee727740e7b25ded29e9e701b77611764577fd7402389402", size = 534786, upload-time = "2025-10-31T05:30:03.342Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/e9/d9fd0b2bef14d85b408c51802142b1c8b7bc3ab08514c89432547b1d87d3/azure_servicebus-7.14.3-py3-none-any.whl", hash = "sha256:386f8d32dae8881661ec8d791c38978eca2bbf7ea9f489d6cff8ad9cc6990234", size = 412522, upload-time = "2025-10-31T05:30:05.252Z" }, +] + +[[package]] +name = "azure-storage-queue" +version = "12.14.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "azure-core" }, + { name = "cryptography" }, + { name = "isodate" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c4/9e/7ee54e687a37567fb09ad121ee101695feb79c88d57a872080818a8715b1/azure_storage_queue-12.14.1.tar.gz", hash = "sha256:8f7afb311ef1b9907316e59bb3e0645397c8d76073adb1b595f027b17c0b7af1", size = 192452, upload-time = "2025-10-29T12:59:24.528Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c5/2e/80d850a73c69afd0df69178a6c148e198d5e01f33f34422d621c98287af5/azure_storage_queue-12.14.1-py3-none-any.whl", hash = "sha256:fc10b25b70978b36c1a1dd1da55649d2f0fd41326b424b77f8f391220855dfd7", size = 184375, upload-time = "2025-10-29T12:59:26.213Z" }, +] + [[package]] name = "babel" version = "2.17.0" @@ -66,6 +119,69 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/87/8bab77b323f16d67be364031220069f79159117dd5e43eeb4be2fef1ac9b/billiard-4.2.4-py3-none-any.whl", hash = "sha256:525b42bdec68d2b983347ac312f892db930858495db601b5836ac24e6477cde5", size = 87070, upload-time = "2025-11-30T13:28:47.016Z" }, ] +[[package]] +name = "boto3" +version = "1.42.19" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "botocore" }, + { name = "jmespath" }, + { name = "s3transfer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/34/36/045babbc2978fe3bf051a002e9ee492a815e50b90aea514b811d12aa33cb/boto3-1.42.19.tar.gz", hash = "sha256:5933696a28bf8eb62fc54e4de5583f78a0efef59c8164ee1850436aa22f53aa7", size = 112803, upload-time = "2025-12-30T20:29:30.785Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f1/ca/2b46e9fa3953c21a258b06e33f14452d97646ffbe7ace125e6aec62d4d7c/boto3-1.42.19-py3-none-any.whl", hash = "sha256:c55b8b303c64931272536813a476f130b90ea7041d7b79c154d89cf1c18256b4", size = 140576, upload-time = "2025-12-30T20:29:29.319Z" }, +] + +[[package]] +name = "boto3-stubs" +version = "1.42.19" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "botocore-stubs" }, + { name = "types-s3transfer" }, + { name = "typing-extensions", marker = "python_full_version < '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/07/99/e9a30a7be5b1d76d512724116e6715f49a54a248732ee2381a2acb5abd59/boto3_stubs-1.42.19.tar.gz", hash = "sha256:9c22e9c591dc39d7f12e77148e7e52268d11f45ec356cdc4204ba412e5c902a1", size = 100913, upload-time = "2025-12-30T20:37:17.369Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/80/66/cffe2e3ba8cfde81f29e7730767a73f431dfac234d1e5dc7e04473f7b8a4/boto3_stubs-1.42.19-py3-none-any.whl", hash = "sha256:d7035ed6d9c4ade5ba48bc024e0511d09b7bc2f800f183dc862c9e44291ee1d3", size = 69778, upload-time = "2025-12-30T20:37:09.413Z" }, +] + +[[package]] +name = "botocore" +version = "1.42.19" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jmespath" }, + { name = "python-dateutil" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/39/d6/33565766764492a0a4956ef161498d81a8c48c1e918aeaeb29def52c3367/botocore-1.42.19.tar.gz", hash = "sha256:8d38f30de983720303e95951380a2c9ac515159636ee6b5ba4227d65f14551a4", size = 14874191, upload-time = "2025-12-30T20:29:21.129Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a8/f9/f75b8ff225895f26bda4981b04df68b0ece29aa18aaafe4f21a3e4d82139/botocore-1.42.19-py3-none-any.whl", hash = "sha256:30c276e0a96d822826d74e961089b9af16b274ac7ddcf7dcf6440bc90d856d88", size = 14550311, upload-time = "2025-12-30T20:29:18.223Z" }, +] + +[[package]] +name = "botocore-stubs" +version = "1.42.19" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "types-awscrt" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8c/b2/0909f369c7cb641c246595d21623a1ffd9e041f8b52acc5db6cc2c986ebc/botocore_stubs-1.42.19.tar.gz", hash = "sha256:2fcae271af2a24cd46166246589b22c76b49ba30656b3b0c504b92a49fda1ca2", size = 42385, upload-time = "2025-12-30T20:30:37.263Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d8/36/e361ab7583ec6d7710e3757482272d4d8853b70d6674618ceffaebc8bf3f/botocore_stubs-1.42.19-py3-none-any.whl", hash = "sha256:bdfc3ffe6487bcf9c8f66783ea370653ccd7c16950fa82a15f811e7e5ccaeeb0", size = 66762, upload-time = "2025-12-30T20:30:35.753Z" }, +] + +[[package]] +name = "cachetools" +version = "6.2.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bc/1d/ede8680603f6016887c062a2cf4fc8fdba905866a3ab8831aa8aa651320c/cachetools-6.2.4.tar.gz", hash = "sha256:82c5c05585e70b6ba2d3ae09ea60b79548872185d2f24ae1f2709d37299fd607", size = 31731, upload-time = "2025-12-15T18:24:53.744Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/fc/1d7b80d0eb7b714984ce40efc78859c022cd930e402f599d8ca9e39c78a4/cachetools-6.2.4-py3-none-any.whl", hash = "sha256:69a7a52634fed8b8bf6e24a050fb60bff1c9bd8f6d24572b99c32d4e71e62a51", size = 11551, upload-time = "2025-12-15T18:24:52.332Z" }, +] + [[package]] name = "celery" version = "5.6.0" @@ -97,17 +213,31 @@ dependencies = [ [package.dev-dependencies] dev = [ + { name = "azure-servicebus" }, + { name = "azure-storage-queue" }, { name = "basedpyright" }, + { name = "boto3" }, + { name = "boto3-stubs" }, + { name = "botocore" }, { name = "celery" }, + { name = "confluent-kafka" }, { name = "django" }, { name = "django-types" }, + { name = "google-cloud-monitoring" }, + { name = "google-cloud-pubsub" }, { name = "mypy" }, { name = "prek" }, + { name = "pycurl" }, + { name = "pymongo" }, { name = "pytest" }, + { name = "redis" }, { name = "ruff" }, + { name = "six" }, { name = "sphinx", version = "8.1.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" }, { name = "sphinx", version = "9.0.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, + { name = "sqlalchemy" }, { name = "types-docutils" }, + { name = "types-redis" }, ] [package.metadata] @@ -115,16 +245,30 @@ requires-dist = [{ name = "typing-extensions", specifier = ">=4.15.0,<5" }] [package.metadata.requires-dev] dev = [ + { name = "azure-servicebus", specifier = ">=7.14.3" }, + { name = "azure-storage-queue", specifier = ">=12.14.1" }, { name = "basedpyright", specifier = ">=1.36.1" }, + { name = "boto3", specifier = ">=1.42.19" }, + { name = "boto3-stubs", specifier = ">=1.42.19" }, + { name = "botocore", specifier = ">=1.42.19" }, { name = "celery", specifier = ">=5.0,<6" }, + { name = "confluent-kafka", specifier = ">=2.12.2" }, { name = "django", specifier = ">=3.1,<4" }, { name = "django-types", specifier = ">=0.3.1,<0.4" }, + { name = "google-cloud-monitoring", specifier = ">=2.28.0" }, + { name = "google-cloud-pubsub", specifier = ">=2.34.0" }, { name = "mypy", specifier = ">=1.19.0" }, { name = "prek", specifier = ">=0.2.23" }, + { name = "pycurl", specifier = ">=7.45.7" }, + { name = "pymongo", specifier = ">=4.15.5" }, { name = "pytest", specifier = ">=9.0.2" }, + { name = "redis", specifier = ">=7.1.0" }, { name = "ruff", specifier = ">=0.14.9" }, + { name = "six", specifier = ">=1.16.0" }, { name = "sphinx", specifier = ">=8.1.3" }, + { name = "sqlalchemy", specifier = ">=2.0.45" }, { name = "types-docutils", specifier = ">=0.22.3.20251115" }, + { name = "types-redis", specifier = ">=4.6.0.20241004" }, ] [[package]] @@ -136,6 +280,88 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/70/7d/9bc192684cea499815ff478dfcdc13835ddf401365057044fb721ec6bddb/certifi-2025.11.12-py3-none-any.whl", hash = "sha256:97de8790030bbd5c2d96b7ec782fc2f7820ef8dba6db909ccf95449f2d062d4b", size = 159438, upload-time = "2025-11-12T02:54:49.735Z" }, ] +[[package]] +name = "cffi" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", marker = "implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/93/d7/516d984057745a6cd96575eea814fe1edd6646ee6efd552fb7b0921dec83/cffi-2.0.0-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:0cf2d91ecc3fcc0625c2c530fe004f82c110405f101548512cce44322fa8ac44", size = 184283, upload-time = "2025-09-08T23:22:08.01Z" }, + { url = "https://files.pythonhosted.org/packages/9e/84/ad6a0b408daa859246f57c03efd28e5dd1b33c21737c2db84cae8c237aa5/cffi-2.0.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f73b96c41e3b2adedc34a7356e64c8eb96e03a3782b535e043a986276ce12a49", size = 180504, upload-time = "2025-09-08T23:22:10.637Z" }, + { url = "https://files.pythonhosted.org/packages/50/bd/b1a6362b80628111e6653c961f987faa55262b4002fcec42308cad1db680/cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c", size = 208811, upload-time = "2025-09-08T23:22:12.267Z" }, + { url = "https://files.pythonhosted.org/packages/4f/27/6933a8b2562d7bd1fb595074cf99cc81fc3789f6a6c05cdabb46284a3188/cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb", size = 216402, upload-time = "2025-09-08T23:22:13.455Z" }, + { url = "https://files.pythonhosted.org/packages/05/eb/b86f2a2645b62adcfff53b0dd97e8dfafb5c8aa864bd0d9a2c2049a0d551/cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0", size = 203217, upload-time = "2025-09-08T23:22:14.596Z" }, + { url = "https://files.pythonhosted.org/packages/9f/e0/6cbe77a53acf5acc7c08cc186c9928864bd7c005f9efd0d126884858a5fe/cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4", size = 203079, upload-time = "2025-09-08T23:22:15.769Z" }, + { url = "https://files.pythonhosted.org/packages/98/29/9b366e70e243eb3d14a5cb488dfd3a0b6b2f1fb001a203f653b93ccfac88/cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453", size = 216475, upload-time = "2025-09-08T23:22:17.427Z" }, + { url = "https://files.pythonhosted.org/packages/21/7a/13b24e70d2f90a322f2900c5d8e1f14fa7e2a6b3332b7309ba7b2ba51a5a/cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495", size = 218829, upload-time = "2025-09-08T23:22:19.069Z" }, + { url = "https://files.pythonhosted.org/packages/60/99/c9dc110974c59cc981b1f5b66e1d8af8af764e00f0293266824d9c4254bc/cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5", size = 211211, upload-time = "2025-09-08T23:22:20.588Z" }, + { url = "https://files.pythonhosted.org/packages/49/72/ff2d12dbf21aca1b32a40ed792ee6b40f6dc3a9cf1644bd7ef6e95e0ac5e/cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb", size = 218036, upload-time = "2025-09-08T23:22:22.143Z" }, + { url = "https://files.pythonhosted.org/packages/e2/cc/027d7fb82e58c48ea717149b03bcadcbdc293553edb283af792bd4bcbb3f/cffi-2.0.0-cp310-cp310-win32.whl", hash = "sha256:1f72fb8906754ac8a2cc3f9f5aaa298070652a0ffae577e0ea9bd480dc3c931a", size = 172184, upload-time = "2025-09-08T23:22:23.328Z" }, + { url = "https://files.pythonhosted.org/packages/33/fa/072dd15ae27fbb4e06b437eb6e944e75b068deb09e2a2826039e49ee2045/cffi-2.0.0-cp310-cp310-win_amd64.whl", hash = "sha256:b18a3ed7d5b3bd8d9ef7a8cb226502c6bf8308df1525e1cc676c3680e7176739", size = 182790, upload-time = "2025-09-08T23:22:24.752Z" }, + { url = "https://files.pythonhosted.org/packages/12/4a/3dfd5f7850cbf0d06dc84ba9aa00db766b52ca38d8b86e3a38314d52498c/cffi-2.0.0-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:b4c854ef3adc177950a8dfc81a86f5115d2abd545751a304c5bcf2c2c7283cfe", size = 184344, upload-time = "2025-09-08T23:22:26.456Z" }, + { url = "https://files.pythonhosted.org/packages/4f/8b/f0e4c441227ba756aafbe78f117485b25bb26b1c059d01f137fa6d14896b/cffi-2.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2de9a304e27f7596cd03d16f1b7c72219bd944e99cc52b84d0145aefb07cbd3c", size = 180560, upload-time = "2025-09-08T23:22:28.197Z" }, + { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" }, + { url = "https://files.pythonhosted.org/packages/b8/56/6033f5e86e8cc9bb629f0077ba71679508bdf54a9a5e112a3c0b91870332/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93", size = 216476, upload-time = "2025-09-08T23:22:31.063Z" }, + { url = "https://files.pythonhosted.org/packages/dc/7f/55fecd70f7ece178db2f26128ec41430d8720f2d12ca97bf8f0a628207d5/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5", size = 203374, upload-time = "2025-09-08T23:22:32.507Z" }, + { url = "https://files.pythonhosted.org/packages/84/ef/a7b77c8bdc0f77adc3b46888f1ad54be8f3b7821697a7b89126e829e676a/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664", size = 202597, upload-time = "2025-09-08T23:22:34.132Z" }, + { url = "https://files.pythonhosted.org/packages/d7/91/500d892b2bf36529a75b77958edfcd5ad8e2ce4064ce2ecfeab2125d72d1/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26", size = 215574, upload-time = "2025-09-08T23:22:35.443Z" }, + { url = "https://files.pythonhosted.org/packages/44/64/58f6255b62b101093d5df22dcb752596066c7e89dd725e0afaed242a61be/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9", size = 218971, upload-time = "2025-09-08T23:22:36.805Z" }, + { url = "https://files.pythonhosted.org/packages/ab/49/fa72cebe2fd8a55fbe14956f9970fe8eb1ac59e5df042f603ef7c8ba0adc/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414", size = 211972, upload-time = "2025-09-08T23:22:38.436Z" }, + { url = "https://files.pythonhosted.org/packages/0b/28/dd0967a76aab36731b6ebfe64dec4e981aff7e0608f60c2d46b46982607d/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743", size = 217078, upload-time = "2025-09-08T23:22:39.776Z" }, + { url = "https://files.pythonhosted.org/packages/2b/c0/015b25184413d7ab0a410775fdb4a50fca20f5589b5dab1dbbfa3baad8ce/cffi-2.0.0-cp311-cp311-win32.whl", hash = "sha256:c649e3a33450ec82378822b3dad03cc228b8f5963c0c12fc3b1e0ab940f768a5", size = 172076, upload-time = "2025-09-08T23:22:40.95Z" }, + { url = "https://files.pythonhosted.org/packages/ae/8f/dc5531155e7070361eb1b7e4c1a9d896d0cb21c49f807a6c03fd63fc877e/cffi-2.0.0-cp311-cp311-win_amd64.whl", hash = "sha256:66f011380d0e49ed280c789fbd08ff0d40968ee7b665575489afa95c98196ab5", size = 182820, upload-time = "2025-09-08T23:22:42.463Z" }, + { url = "https://files.pythonhosted.org/packages/95/5c/1b493356429f9aecfd56bc171285a4c4ac8697f76e9bbbbb105e537853a1/cffi-2.0.0-cp311-cp311-win_arm64.whl", hash = "sha256:c6638687455baf640e37344fe26d37c404db8b80d037c3d29f58fe8d1c3b194d", size = 177635, upload-time = "2025-09-08T23:22:43.623Z" }, + { url = "https://files.pythonhosted.org/packages/ea/47/4f61023ea636104d4f16ab488e268b93008c3d0bb76893b1b31db1f96802/cffi-2.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:6d02d6655b0e54f54c4ef0b94eb6be0607b70853c45ce98bd278dc7de718be5d", size = 185271, upload-time = "2025-09-08T23:22:44.795Z" }, + { url = "https://files.pythonhosted.org/packages/df/a2/781b623f57358e360d62cdd7a8c681f074a71d445418a776eef0aadb4ab4/cffi-2.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8eca2a813c1cb7ad4fb74d368c2ffbbb4789d377ee5bb8df98373c2cc0dee76c", size = 181048, upload-time = "2025-09-08T23:22:45.938Z" }, + { url = "https://files.pythonhosted.org/packages/ff/df/a4f0fbd47331ceeba3d37c2e51e9dfc9722498becbeec2bd8bc856c9538a/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe", size = 212529, upload-time = "2025-09-08T23:22:47.349Z" }, + { url = "https://files.pythonhosted.org/packages/d5/72/12b5f8d3865bf0f87cf1404d8c374e7487dcf097a1c91c436e72e6badd83/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062", size = 220097, upload-time = "2025-09-08T23:22:48.677Z" }, + { url = "https://files.pythonhosted.org/packages/c2/95/7a135d52a50dfa7c882ab0ac17e8dc11cec9d55d2c18dda414c051c5e69e/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e", size = 207983, upload-time = "2025-09-08T23:22:50.06Z" }, + { url = "https://files.pythonhosted.org/packages/3a/c8/15cb9ada8895957ea171c62dc78ff3e99159ee7adb13c0123c001a2546c1/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037", size = 206519, upload-time = "2025-09-08T23:22:51.364Z" }, + { url = "https://files.pythonhosted.org/packages/78/2d/7fa73dfa841b5ac06c7b8855cfc18622132e365f5b81d02230333ff26e9e/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba", size = 219572, upload-time = "2025-09-08T23:22:52.902Z" }, + { url = "https://files.pythonhosted.org/packages/07/e0/267e57e387b4ca276b90f0434ff88b2c2241ad72b16d31836adddfd6031b/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94", size = 222963, upload-time = "2025-09-08T23:22:54.518Z" }, + { url = "https://files.pythonhosted.org/packages/b6/75/1f2747525e06f53efbd878f4d03bac5b859cbc11c633d0fb81432d98a795/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187", size = 221361, upload-time = "2025-09-08T23:22:55.867Z" }, + { url = "https://files.pythonhosted.org/packages/7b/2b/2b6435f76bfeb6bbf055596976da087377ede68df465419d192acf00c437/cffi-2.0.0-cp312-cp312-win32.whl", hash = "sha256:da902562c3e9c550df360bfa53c035b2f241fed6d9aef119048073680ace4a18", size = 172932, upload-time = "2025-09-08T23:22:57.188Z" }, + { url = "https://files.pythonhosted.org/packages/f8/ed/13bd4418627013bec4ed6e54283b1959cf6db888048c7cf4b4c3b5b36002/cffi-2.0.0-cp312-cp312-win_amd64.whl", hash = "sha256:da68248800ad6320861f129cd9c1bf96ca849a2771a59e0344e88681905916f5", size = 183557, upload-time = "2025-09-08T23:22:58.351Z" }, + { url = "https://files.pythonhosted.org/packages/95/31/9f7f93ad2f8eff1dbc1c3656d7ca5bfd8fb52c9d786b4dcf19b2d02217fa/cffi-2.0.0-cp312-cp312-win_arm64.whl", hash = "sha256:4671d9dd5ec934cb9a73e7ee9676f9362aba54f7f34910956b84d727b0d73fb6", size = 177762, upload-time = "2025-09-08T23:22:59.668Z" }, + { url = "https://files.pythonhosted.org/packages/4b/8d/a0a47a0c9e413a658623d014e91e74a50cdd2c423f7ccfd44086ef767f90/cffi-2.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:00bdf7acc5f795150faa6957054fbbca2439db2f775ce831222b66f192f03beb", size = 185230, upload-time = "2025-09-08T23:23:00.879Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d2/a6c0296814556c68ee32009d9c2ad4f85f2707cdecfd7727951ec228005d/cffi-2.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:45d5e886156860dc35862657e1494b9bae8dfa63bf56796f2fb56e1679fc0bca", size = 181043, upload-time = "2025-09-08T23:23:02.231Z" }, + { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" }, + { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" }, + { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" }, + { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" }, + { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" }, + { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" }, + { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" }, + { url = "https://files.pythonhosted.org/packages/eb/6d/bf9bda840d5f1dfdbf0feca87fbdb64a918a69bca42cfa0ba7b137c48cb8/cffi-2.0.0-cp313-cp313-win32.whl", hash = "sha256:74a03b9698e198d47562765773b4a8309919089150a0bb17d829ad7b44b60d27", size = 172909, upload-time = "2025-09-08T23:23:14.32Z" }, + { url = "https://files.pythonhosted.org/packages/37/18/6519e1ee6f5a1e579e04b9ddb6f1676c17368a7aba48299c3759bbc3c8b3/cffi-2.0.0-cp313-cp313-win_amd64.whl", hash = "sha256:19f705ada2530c1167abacb171925dd886168931e0a7b78f5bffcae5c6b5be75", size = 183402, upload-time = "2025-09-08T23:23:15.535Z" }, + { url = "https://files.pythonhosted.org/packages/cb/0e/02ceeec9a7d6ee63bb596121c2c8e9b3a9e150936f4fbef6ca1943e6137c/cffi-2.0.0-cp313-cp313-win_arm64.whl", hash = "sha256:256f80b80ca3853f90c21b23ee78cd008713787b1b1e93eae9f3d6a7134abd91", size = 177780, upload-time = "2025-09-08T23:23:16.761Z" }, + { url = "https://files.pythonhosted.org/packages/92/c4/3ce07396253a83250ee98564f8d7e9789fab8e58858f35d07a9a2c78de9f/cffi-2.0.0-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:fc33c5141b55ed366cfaad382df24fe7dcbc686de5be719b207bb248e3053dc5", size = 185320, upload-time = "2025-09-08T23:23:18.087Z" }, + { url = "https://files.pythonhosted.org/packages/59/dd/27e9fa567a23931c838c6b02d0764611c62290062a6d4e8ff7863daf9730/cffi-2.0.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c654de545946e0db659b3400168c9ad31b5d29593291482c43e3564effbcee13", size = 181487, upload-time = "2025-09-08T23:23:19.622Z" }, + { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" }, + { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" }, + { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" }, + { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" }, + { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" }, + { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" }, + { url = "https://files.pythonhosted.org/packages/3e/aa/df335faa45b395396fcbc03de2dfcab242cd61a9900e914fe682a59170b1/cffi-2.0.0-cp314-cp314-win32.whl", hash = "sha256:087067fa8953339c723661eda6b54bc98c5625757ea62e95eb4898ad5e776e9f", size = 175328, upload-time = "2025-09-08T23:23:44.61Z" }, + { url = "https://files.pythonhosted.org/packages/bb/92/882c2d30831744296ce713f0feb4c1cd30f346ef747b530b5318715cc367/cffi-2.0.0-cp314-cp314-win_amd64.whl", hash = "sha256:203a48d1fb583fc7d78a4c6655692963b860a417c0528492a6bc21f1aaefab25", size = 185650, upload-time = "2025-09-08T23:23:45.848Z" }, + { url = "https://files.pythonhosted.org/packages/9f/2c/98ece204b9d35a7366b5b2c6539c350313ca13932143e79dc133ba757104/cffi-2.0.0-cp314-cp314-win_arm64.whl", hash = "sha256:dbd5c7a25a7cb98f5ca55d258b103a2054f859a46ae11aaf23134f9cc0d356ad", size = 180687, upload-time = "2025-09-08T23:23:47.105Z" }, + { url = "https://files.pythonhosted.org/packages/3e/61/c768e4d548bfa607abcda77423448df8c471f25dbe64fb2ef6d555eae006/cffi-2.0.0-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:9a67fc9e8eb39039280526379fb3a70023d77caec1852002b4da7e8b270c4dd9", size = 188773, upload-time = "2025-09-08T23:23:29.347Z" }, + { url = "https://files.pythonhosted.org/packages/2c/ea/5f76bce7cf6fcd0ab1a1058b5af899bfbef198bea4d5686da88471ea0336/cffi-2.0.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7a66c7204d8869299919db4d5069a82f1561581af12b11b3c9f48c584eb8743d", size = 185013, upload-time = "2025-09-08T23:23:30.63Z" }, + { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" }, + { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" }, + { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" }, + { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" }, + { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" }, + { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" }, + { url = "https://files.pythonhosted.org/packages/a0/1d/ec1a60bd1a10daa292d3cd6bb0b359a81607154fb8165f3ec95fe003b85c/cffi-2.0.0-cp314-cp314t-win32.whl", hash = "sha256:1fc9ea04857caf665289b7a75923f2c6ed559b8298a1b8c49e59f7dd95c8481e", size = 180487, upload-time = "2025-09-08T23:23:40.423Z" }, + { url = "https://files.pythonhosted.org/packages/bf/41/4c1168c74fac325c0c8156f04b6749c8b6a8f405bbf91413ba088359f60d/cffi-2.0.0-cp314-cp314t-win_amd64.whl", hash = "sha256:d68b6cef7827e8641e8ef16f4494edda8b36104d79773a334beaa1e3521430f6", size = 191726, upload-time = "2025-09-08T23:23:41.742Z" }, + { url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195, upload-time = "2025-09-08T23:23:43.004Z" }, +] + [[package]] name = "charset-normalizer" version = "3.4.4" @@ -283,6 +509,108 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] +[[package]] +name = "confluent-kafka" +version = "2.12.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c2/cd/18ffb1d2a7e189fee50b4a9597255e1078580d679daf913c25d0d13c3f88/confluent_kafka-2.12.2.tar.gz", hash = "sha256:5a50bfcd24f9dcf34b986f837f80126a71087364d44fcb8b45e8e74080fb6e98", size = 250423, upload-time = "2025-11-07T15:42:32.392Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8e/93/ebdb133b2c3a84edcaddeb39cb9396ed557467155cce1c8c3a034353f02e/confluent_kafka-2.12.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8639850b97e199db5c968d01887e0f173c1d3763f851098a64a57e6db06d1d19", size = 3593784, upload-time = "2025-11-07T15:41:21.961Z" }, + { url = "https://files.pythonhosted.org/packages/ab/68/28078e5c27373c94ba2cf6339e8cffdc87da8b55430029ca5025b84444f4/confluent_kafka-2.12.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9a85f84483465c302da8c7432078f310e5aa748bb5767f71d5a50c3b4fce8004", size = 3153499, upload-time = "2025-11-07T15:41:24.852Z" }, + { url = "https://files.pythonhosted.org/packages/fe/29/ccdfbe49518adb46e71525599778ee599a427da42f5a748ea4e81dc860d2/confluent_kafka-2.12.2-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:938e1ec9abdc6104faad07732521960c61644362b43a0af5cd7f149516dc9bd5", size = 3691675, upload-time = "2025-11-07T15:41:26.294Z" }, + { url = "https://files.pythonhosted.org/packages/cf/b9/df8beebe26d25ba254f2dbff689c53f2551efcda5bf35c8974d788f77983/confluent_kafka-2.12.2-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:c0618ef7f3f70d80a5d2ee94241dde8e59419ea52f003f18ac310135b04b6e4a", size = 3943583, upload-time = "2025-11-07T15:41:28.542Z" }, + { url = "https://files.pythonhosted.org/packages/73/cd/dab6a1e364cb3a405ec3f8d4da4e5a899bdaff838c87aac5a3fcff3bd690/confluent_kafka-2.12.2-cp310-cp310-win_amd64.whl", hash = "sha256:f62dc98e2059cde47b60eadc80904eaf59f88b283330d3fd93d69b1ac3d75496", size = 4067709, upload-time = "2025-11-07T15:41:31.567Z" }, + { url = "https://files.pythonhosted.org/packages/13/a5/c4cee390bebcc8761b942484ce4a0bd1ba45d9510c284c5052d53f649bda/confluent_kafka-2.12.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aa9ecf654cac27cf3dbd234c5109ddf25bf34a581c6fd91a2ad3521f5cb4ff98", size = 3593105, upload-time = "2025-11-07T15:41:33.405Z" }, + { url = "https://files.pythonhosted.org/packages/ae/0a/620649e9742016ff6f3656a314a005af6b3173d0ce7be966ff750c19cb85/confluent_kafka-2.12.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bb6a0ac890fc35a2dd6435833cbdc2b81a18a5e0b45640fd0f5fc9f240095a77", size = 3153056, upload-time = "2025-11-07T15:41:34.999Z" }, + { url = "https://files.pythonhosted.org/packages/bc/64/6b2e9b0041e8b19ba86f37c81f02beaab325d1b09e31eca84170dffe2d95/confluent_kafka-2.12.2-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:bd31a1657e134b02b7ecf2483fc6df82ccbb20f08e8a0fb9dc66a1a2b0072a7a", size = 3691407, upload-time = "2025-11-07T15:41:36.823Z" }, + { url = "https://files.pythonhosted.org/packages/04/22/c8f9654172129631e7043637c3d9e4885004fbba40dfc26a5c5d4fe1d87a/confluent_kafka-2.12.2-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:f26e107597cacb28b6d3333942b665dcb5a3838a1bc2d7b979c4486d22320d0f", size = 3943049, upload-time = "2025-11-07T15:41:39.931Z" }, + { url = "https://files.pythonhosted.org/packages/27/c8/4c7a0c93bb4bb43f795fc709b68cffd519d07f57d54eb3bf27bbb162413b/confluent_kafka-2.12.2-cp311-cp311-win_amd64.whl", hash = "sha256:6e36dac6a20a3634ae2c4ec167dbb49c51ea7d4ce11c2deee971237d8d874566", size = 4067711, upload-time = "2025-11-07T15:41:41.703Z" }, + { url = "https://files.pythonhosted.org/packages/9e/89/f5b31c882927b64f548ca9ceca6a4d60f29f60086fd229838df6900c7fb1/confluent_kafka-2.12.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:2b978c407de4f63cf06e659afaae4c14919e665c80e3a65ff3479bb4d42c1ef4", size = 3598735, upload-time = "2025-11-07T15:41:43.326Z" }, + { url = "https://files.pythonhosted.org/packages/51/9c/51c278db2e37c950c325ee362ed78006ca6e007d38c39f3c35c20e80bcf3/confluent_kafka-2.12.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bd9ebfd7b47105d1f3981944d47307c10c9fd1fd0b2044904ccdc7c2b8adb75a", size = 3158090, upload-time = "2025-11-07T15:41:44.942Z" }, + { url = "https://files.pythonhosted.org/packages/63/ab/3d9ff1d6efdd5cc577f92dc24debfebf08dcce46d2fa0dd7cd7094a9cfc8/confluent_kafka-2.12.2-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:d35f5c5b84f6803eb7e974802577aa3a317bd9e44a438c7bd4074b56098467f2", size = 3695809, upload-time = "2025-11-07T15:41:46.552Z" }, + { url = "https://files.pythonhosted.org/packages/aa/cc/41b8f1bf6bd1ae978baf0928f79913493fbb036a53174d5658212c58cca5/confluent_kafka-2.12.2-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:f189203de0200b986e2243215e052e787d8a426d92df815c440b76150da5b194", size = 3947426, upload-time = "2025-11-07T15:41:48.452Z" }, + { url = "https://files.pythonhosted.org/packages/5d/eb/8e0b6d6f26eff89549ee6d8729ff011ee040659907a48af9e1c7bfbf0324/confluent_kafka-2.12.2-cp312-cp312-win_amd64.whl", hash = "sha256:90bff1e56f1c382583dafb316bb5171e10659d3eaffcb477f28fa13a6f36fe04", size = 4068381, upload-time = "2025-11-07T15:41:50.054Z" }, + { url = "https://files.pythonhosted.org/packages/e1/28/b209303f607288c10fcfa5521bbaa56a6e298c088d5ac658b811ff77555d/confluent_kafka-2.12.2-cp313-cp313-macosx_13_0_arm64.whl", hash = "sha256:e888667c607741af5e4b36014d215c4ad2f214646e3da777505e4cf383ac5375", size = 3163179, upload-time = "2025-11-07T15:41:51.611Z" }, + { url = "https://files.pythonhosted.org/packages/7e/4c/fee4d5c0f5e907bfbb48d3da329b66ede8c7aa0a3af42a269cee5c3e44d9/confluent_kafka-2.12.2-cp313-cp313-macosx_13_0_x86_64.whl", hash = "sha256:adc98ecfbb2a41a234c72043c0ca46c941d5da61900d998f14f29a30baa2e688", size = 3602455, upload-time = "2025-11-07T15:41:53.216Z" }, + { url = "https://files.pythonhosted.org/packages/8c/c6/fe09a0683ef0bcf2c3b8df3b6827f1b4a95288c02bac1d93a154cddfb21c/confluent_kafka-2.12.2-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:d0abde08fc133cfe6667226472518c6afbb80e083090c441c4ae4cddcd8ed921", size = 3696185, upload-time = "2025-11-07T15:41:54.633Z" }, + { url = "https://files.pythonhosted.org/packages/77/ed/23ae84c4ef04a38de36033a760b352fbbd51edee9e81d5c9f7c9eba18f09/confluent_kafka-2.12.2-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:b3065064a86b4494c8c94eff9968845461918a2bc89e5a800a2920f722ed2cb1", size = 3947823, upload-time = "2025-11-07T15:41:56.343Z" }, + { url = "https://files.pythonhosted.org/packages/96/45/755cfc775d9f42ebd50507ab18ec2459ea06e0fc24be4f0829616c10539a/confluent_kafka-2.12.2-cp313-cp313-win_amd64.whl", hash = "sha256:26b2291694a300b7ff00b46eda835a06b124b4878527d32277d42ca39ee95dd9", size = 4128056, upload-time = "2025-11-07T15:41:57.787Z" }, + { url = "https://files.pythonhosted.org/packages/50/76/5b093946777976ee7acf46cac73b9f5a648ad81c0b8b2d64684f0ac84962/confluent_kafka-2.12.2-cp314-cp314-macosx_13_0_arm64.whl", hash = "sha256:0101be4b6037ad5a49f71c749bfd9f24e82607774f5fb4424c4dee6bf39a302d", size = 3162999, upload-time = "2025-11-07T15:41:59.645Z" }, + { url = "https://files.pythonhosted.org/packages/08/c4/67566514acb7ccdf77dd07633c9e47c52f9c087c1676faa6661147c70acc/confluent_kafka-2.12.2-cp314-cp314-macosx_13_0_x86_64.whl", hash = "sha256:27cc33a0c47f167db81b4f46d9e1c59582d9bfd8b3c21129a2ee400f5c93844e", size = 3602261, upload-time = "2025-11-07T15:42:01.571Z" }, + { url = "https://files.pythonhosted.org/packages/2d/3c/036b78024d93f293f1f09efe093ecc63a8c33d1f202e7126c56bbd3adb79/confluent_kafka-2.12.2-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:38d23cf3f428451fc14c18aa53f5f3f1a37c7d89c44bfaf2862b3d6a5068e45c", size = 3696018, upload-time = "2025-11-07T15:42:03.147Z" }, + { url = "https://files.pythonhosted.org/packages/e5/f0/2fa9456bdad9585360df5dc3089a70cc03988c9542667a1db123e618929f/confluent_kafka-2.12.2-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:eed1b0e540204c52d0ab40d621c371f52044a788b542f6e28a7756fd8f7a1029", size = 3947575, upload-time = "2025-11-07T15:42:04.727Z" }, + { url = "https://files.pythonhosted.org/packages/9a/22/ceb0ded4518f58805eff102d6c712809ae61dc0d6cfebcd4dba9246575ff/confluent_kafka-2.12.2-cp314-cp314-win_amd64.whl", hash = "sha256:ef411221bfdaffae944156826965b9a08777a5dff66d765a23108f7d6774706f", size = 4245477, upload-time = "2025-11-07T15:42:06.43Z" }, + { url = "https://files.pythonhosted.org/packages/2b/d4/fa67b636df3550269e0720416ff9275783c3c5ddb83e7b366518a68501fd/confluent_kafka-2.12.2-cp314-cp314t-macosx_13_0_arm64.whl", hash = "sha256:d04f69f6c269ccf6ec1a2ec327edf977a06e790f631ede18511093c1fe598fef", size = 3161636, upload-time = "2025-11-07T15:42:07.938Z" }, + { url = "https://files.pythonhosted.org/packages/9b/25/ce8a5d5fbcda376cb55763a399cfec345a50d6e8bde12e135a05f3b6bc37/confluent_kafka-2.12.2-cp314-cp314t-macosx_13_0_x86_64.whl", hash = "sha256:01a0429cac8fe38db49ebb9bda335b0c77f14455da72ccf351d49a51c1bd00a5", size = 3600121, upload-time = "2025-11-07T15:42:09.407Z" }, + { url = "https://files.pythonhosted.org/packages/2a/91/87f15f79b1b2ca2debf4095e886b6f2d6d9071b30c2ef9d5d6414761d9bb/confluent_kafka-2.12.2-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:82ec5302cf7c9ea06d556ed8e8ea8422d2a60035b607d64579ca63663276fe9b", size = 3694893, upload-time = "2025-11-07T15:42:11.051Z" }, + { url = "https://files.pythonhosted.org/packages/c6/20/e5d739aa776f4e92ab7a2c58a5250881352f8f0e0270aad0309c48ce33bb/confluent_kafka-2.12.2-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:de9dece5803e6b58d8c101cbceb90fa55ca96e0a5f40f10483a4c8f5f4027a69", size = 3946237, upload-time = "2025-11-07T15:42:14.147Z" }, +] + +[[package]] +name = "cryptography" +version = "46.0.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "platform_python_implementation != 'PyPy'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9f/33/c00162f49c0e2fe8064a62cb92b93e50c74a72bc370ab92f86112b33ff62/cryptography-46.0.3.tar.gz", hash = "sha256:a8b17438104fed022ce745b362294d9ce35b4c2e45c1d958ad4a4b019285f4a1", size = 749258, upload-time = "2025-10-15T23:18:31.74Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1d/42/9c391dd801d6cf0d561b5890549d4b27bafcc53b39c31a817e69d87c625b/cryptography-46.0.3-cp311-abi3-macosx_10_9_universal2.whl", hash = "sha256:109d4ddfadf17e8e7779c39f9b18111a09efb969a301a31e987416a0191ed93a", size = 7225004, upload-time = "2025-10-15T23:16:52.239Z" }, + { url = "https://files.pythonhosted.org/packages/1c/67/38769ca6b65f07461eb200e85fc1639b438bdc667be02cf7f2cd6a64601c/cryptography-46.0.3-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:09859af8466b69bc3c27bdf4f5d84a665e0f7ab5088412e9e2ec49758eca5cbc", size = 4296667, upload-time = "2025-10-15T23:16:54.369Z" }, + { url = "https://files.pythonhosted.org/packages/5c/49/498c86566a1d80e978b42f0d702795f69887005548c041636df6ae1ca64c/cryptography-46.0.3-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:01ca9ff2885f3acc98c29f1860552e37f6d7c7d013d7334ff2a9de43a449315d", size = 4450807, upload-time = "2025-10-15T23:16:56.414Z" }, + { url = "https://files.pythonhosted.org/packages/4b/0a/863a3604112174c8624a2ac3c038662d9e59970c7f926acdcfaed8d61142/cryptography-46.0.3-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:6eae65d4c3d33da080cff9c4ab1f711b15c1d9760809dad6ea763f3812d254cb", size = 4299615, upload-time = "2025-10-15T23:16:58.442Z" }, + { url = "https://files.pythonhosted.org/packages/64/02/b73a533f6b64a69f3cd3872acb6ebc12aef924d8d103133bb3ea750dc703/cryptography-46.0.3-cp311-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e5bf0ed4490068a2e72ac03d786693adeb909981cc596425d09032d372bcc849", size = 4016800, upload-time = "2025-10-15T23:17:00.378Z" }, + { url = "https://files.pythonhosted.org/packages/25/d5/16e41afbfa450cde85a3b7ec599bebefaef16b5c6ba4ec49a3532336ed72/cryptography-46.0.3-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:5ecfccd2329e37e9b7112a888e76d9feca2347f12f37918facbb893d7bb88ee8", size = 4984707, upload-time = "2025-10-15T23:17:01.98Z" }, + { url = "https://files.pythonhosted.org/packages/c9/56/e7e69b427c3878352c2fb9b450bd0e19ed552753491d39d7d0a2f5226d41/cryptography-46.0.3-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a2c0cd47381a3229c403062f764160d57d4d175e022c1df84e168c6251a22eec", size = 4482541, upload-time = "2025-10-15T23:17:04.078Z" }, + { url = "https://files.pythonhosted.org/packages/78/f6/50736d40d97e8483172f1bb6e698895b92a223dba513b0ca6f06b2365339/cryptography-46.0.3-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:549e234ff32571b1f4076ac269fcce7a808d3bf98b76c8dd560e42dbc66d7d91", size = 4299464, upload-time = "2025-10-15T23:17:05.483Z" }, + { url = "https://files.pythonhosted.org/packages/00/de/d8e26b1a855f19d9994a19c702fa2e93b0456beccbcfe437eda00e0701f2/cryptography-46.0.3-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:c0a7bb1a68a5d3471880e264621346c48665b3bf1c3759d682fc0864c540bd9e", size = 4950838, upload-time = "2025-10-15T23:17:07.425Z" }, + { url = "https://files.pythonhosted.org/packages/8f/29/798fc4ec461a1c9e9f735f2fc58741b0daae30688f41b2497dcbc9ed1355/cryptography-46.0.3-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:10b01676fc208c3e6feeb25a8b83d81767e8059e1fe86e1dc62d10a3018fa926", size = 4481596, upload-time = "2025-10-15T23:17:09.343Z" }, + { url = "https://files.pythonhosted.org/packages/15/8d/03cd48b20a573adfff7652b76271078e3045b9f49387920e7f1f631d125e/cryptography-46.0.3-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:0abf1ffd6e57c67e92af68330d05760b7b7efb243aab8377e583284dbab72c71", size = 4426782, upload-time = "2025-10-15T23:17:11.22Z" }, + { url = "https://files.pythonhosted.org/packages/fa/b1/ebacbfe53317d55cf33165bda24c86523497a6881f339f9aae5c2e13e57b/cryptography-46.0.3-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a04bee9ab6a4da801eb9b51f1b708a1b5b5c9eb48c03f74198464c66f0d344ac", size = 4698381, upload-time = "2025-10-15T23:17:12.829Z" }, + { url = "https://files.pythonhosted.org/packages/96/92/8a6a9525893325fc057a01f654d7efc2c64b9de90413adcf605a85744ff4/cryptography-46.0.3-cp311-abi3-win32.whl", hash = "sha256:f260d0d41e9b4da1ed1e0f1ce571f97fe370b152ab18778e9e8f67d6af432018", size = 3055988, upload-time = "2025-10-15T23:17:14.65Z" }, + { url = "https://files.pythonhosted.org/packages/7e/bf/80fbf45253ea585a1e492a6a17efcb93467701fa79e71550a430c5e60df0/cryptography-46.0.3-cp311-abi3-win_amd64.whl", hash = "sha256:a9a3008438615669153eb86b26b61e09993921ebdd75385ddd748702c5adfddb", size = 3514451, upload-time = "2025-10-15T23:17:16.142Z" }, + { url = "https://files.pythonhosted.org/packages/2e/af/9b302da4c87b0beb9db4e756386a7c6c5b8003cd0e742277888d352ae91d/cryptography-46.0.3-cp311-abi3-win_arm64.whl", hash = "sha256:5d7f93296ee28f68447397bf5198428c9aeeab45705a55d53a6343455dcb2c3c", size = 2928007, upload-time = "2025-10-15T23:17:18.04Z" }, + { url = "https://files.pythonhosted.org/packages/f5/e2/a510aa736755bffa9d2f75029c229111a1d02f8ecd5de03078f4c18d91a3/cryptography-46.0.3-cp314-cp314t-macosx_10_9_universal2.whl", hash = "sha256:00a5e7e87938e5ff9ff5447ab086a5706a957137e6e433841e9d24f38a065217", size = 7158012, upload-time = "2025-10-15T23:17:19.982Z" }, + { url = "https://files.pythonhosted.org/packages/73/dc/9aa866fbdbb95b02e7f9d086f1fccfeebf8953509b87e3f28fff927ff8a0/cryptography-46.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:c8daeb2d2174beb4575b77482320303f3d39b8e81153da4f0fb08eb5fe86a6c5", size = 4288728, upload-time = "2025-10-15T23:17:21.527Z" }, + { url = "https://files.pythonhosted.org/packages/c5/fd/bc1daf8230eaa075184cbbf5f8cd00ba9db4fd32d63fb83da4671b72ed8a/cryptography-46.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:39b6755623145ad5eff1dab323f4eae2a32a77a7abef2c5089a04a3d04366715", size = 4435078, upload-time = "2025-10-15T23:17:23.042Z" }, + { url = "https://files.pythonhosted.org/packages/82/98/d3bd5407ce4c60017f8ff9e63ffee4200ab3e23fe05b765cab805a7db008/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:db391fa7c66df6762ee3f00c95a89e6d428f4d60e7abc8328f4fe155b5ac6e54", size = 4293460, upload-time = "2025-10-15T23:17:24.885Z" }, + { url = "https://files.pythonhosted.org/packages/26/e9/e23e7900983c2b8af7a08098db406cf989d7f09caea7897e347598d4cd5b/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:78a97cf6a8839a48c49271cdcbd5cf37ca2c1d6b7fdd86cc864f302b5e9bf459", size = 3995237, upload-time = "2025-10-15T23:17:26.449Z" }, + { url = "https://files.pythonhosted.org/packages/91/15/af68c509d4a138cfe299d0d7ddb14afba15233223ebd933b4bbdbc7155d3/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:dfb781ff7eaa91a6f7fd41776ec37c5853c795d3b358d4896fdbb5df168af422", size = 4967344, upload-time = "2025-10-15T23:17:28.06Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e3/8643d077c53868b681af077edf6b3cb58288b5423610f21c62aadcbe99f4/cryptography-46.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:6f61efb26e76c45c4a227835ddeae96d83624fb0d29eb5df5b96e14ed1a0afb7", size = 4466564, upload-time = "2025-10-15T23:17:29.665Z" }, + { url = "https://files.pythonhosted.org/packages/0e/43/c1e8726fa59c236ff477ff2b5dc071e54b21e5a1e51aa2cee1676f1c986f/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:23b1a8f26e43f47ceb6d6a43115f33a5a37d57df4ea0ca295b780ae8546e8044", size = 4292415, upload-time = "2025-10-15T23:17:31.686Z" }, + { url = "https://files.pythonhosted.org/packages/42/f9/2f8fefdb1aee8a8e3256a0568cffc4e6d517b256a2fe97a029b3f1b9fe7e/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:b419ae593c86b87014b9be7396b385491ad7f320bde96826d0dd174459e54665", size = 4931457, upload-time = "2025-10-15T23:17:33.478Z" }, + { url = "https://files.pythonhosted.org/packages/79/30/9b54127a9a778ccd6d27c3da7563e9f2d341826075ceab89ae3b41bf5be2/cryptography-46.0.3-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:50fc3343ac490c6b08c0cf0d704e881d0d660be923fd3076db3e932007e726e3", size = 4466074, upload-time = "2025-10-15T23:17:35.158Z" }, + { url = "https://files.pythonhosted.org/packages/ac/68/b4f4a10928e26c941b1b6a179143af9f4d27d88fe84a6a3c53592d2e76bf/cryptography-46.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:22d7e97932f511d6b0b04f2bfd818d73dcd5928db509460aaf48384778eb6d20", size = 4420569, upload-time = "2025-10-15T23:17:37.188Z" }, + { url = "https://files.pythonhosted.org/packages/a3/49/3746dab4c0d1979888f125226357d3262a6dd40e114ac29e3d2abdf1ec55/cryptography-46.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:d55f3dffadd674514ad19451161118fd010988540cee43d8bc20675e775925de", size = 4681941, upload-time = "2025-10-15T23:17:39.236Z" }, + { url = "https://files.pythonhosted.org/packages/fd/30/27654c1dbaf7e4a3531fa1fc77986d04aefa4d6d78259a62c9dc13d7ad36/cryptography-46.0.3-cp314-cp314t-win32.whl", hash = "sha256:8a6e050cb6164d3f830453754094c086ff2d0b2f3a897a1d9820f6139a1f0914", size = 3022339, upload-time = "2025-10-15T23:17:40.888Z" }, + { url = "https://files.pythonhosted.org/packages/f6/30/640f34ccd4d2a1bc88367b54b926b781b5a018d65f404d409aba76a84b1c/cryptography-46.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:760f83faa07f8b64e9c33fc963d790a2edb24efb479e3520c14a45741cd9b2db", size = 3494315, upload-time = "2025-10-15T23:17:42.769Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8b/88cc7e3bd0a8e7b861f26981f7b820e1f46aa9d26cc482d0feba0ecb4919/cryptography-46.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:516ea134e703e9fe26bcd1277a4b59ad30586ea90c365a87781d7887a646fe21", size = 2919331, upload-time = "2025-10-15T23:17:44.468Z" }, + { url = "https://files.pythonhosted.org/packages/fd/23/45fe7f376a7df8daf6da3556603b36f53475a99ce4faacb6ba2cf3d82021/cryptography-46.0.3-cp38-abi3-macosx_10_9_universal2.whl", hash = "sha256:cb3d760a6117f621261d662bccc8ef5bc32ca673e037c83fbe565324f5c46936", size = 7218248, upload-time = "2025-10-15T23:17:46.294Z" }, + { url = "https://files.pythonhosted.org/packages/27/32/b68d27471372737054cbd34c84981f9edbc24fe67ca225d389799614e27f/cryptography-46.0.3-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4b7387121ac7d15e550f5cb4a43aef2559ed759c35df7336c402bb8275ac9683", size = 4294089, upload-time = "2025-10-15T23:17:48.269Z" }, + { url = "https://files.pythonhosted.org/packages/26/42/fa8389d4478368743e24e61eea78846a0006caffaf72ea24a15159215a14/cryptography-46.0.3-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:15ab9b093e8f09daab0f2159bb7e47532596075139dd74365da52ecc9cb46c5d", size = 4440029, upload-time = "2025-10-15T23:17:49.837Z" }, + { url = "https://files.pythonhosted.org/packages/5f/eb/f483db0ec5ac040824f269e93dd2bd8a21ecd1027e77ad7bdf6914f2fd80/cryptography-46.0.3-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:46acf53b40ea38f9c6c229599a4a13f0d46a6c3fa9ef19fc1a124d62e338dfa0", size = 4297222, upload-time = "2025-10-15T23:17:51.357Z" }, + { url = "https://files.pythonhosted.org/packages/fd/cf/da9502c4e1912cb1da3807ea3618a6829bee8207456fbbeebc361ec38ba3/cryptography-46.0.3-cp38-abi3-manylinux_2_28_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:10ca84c4668d066a9878890047f03546f3ae0a6b8b39b697457b7757aaf18dbc", size = 4012280, upload-time = "2025-10-15T23:17:52.964Z" }, + { url = "https://files.pythonhosted.org/packages/6b/8f/9adb86b93330e0df8b3dcf03eae67c33ba89958fc2e03862ef1ac2b42465/cryptography-46.0.3-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:36e627112085bb3b81b19fed209c05ce2a52ee8b15d161b7c643a7d5a88491f3", size = 4978958, upload-time = "2025-10-15T23:17:54.965Z" }, + { url = "https://files.pythonhosted.org/packages/d1/a0/5fa77988289c34bdb9f913f5606ecc9ada1adb5ae870bd0d1054a7021cc4/cryptography-46.0.3-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:1000713389b75c449a6e979ffc7dcc8ac90b437048766cef052d4d30b8220971", size = 4473714, upload-time = "2025-10-15T23:17:56.754Z" }, + { url = "https://files.pythonhosted.org/packages/14/e5/fc82d72a58d41c393697aa18c9abe5ae1214ff6f2a5c18ac470f92777895/cryptography-46.0.3-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:b02cf04496f6576afffef5ddd04a0cb7d49cf6be16a9059d793a30b035f6b6ac", size = 4296970, upload-time = "2025-10-15T23:17:58.588Z" }, + { url = "https://files.pythonhosted.org/packages/78/06/5663ed35438d0b09056973994f1aec467492b33bd31da36e468b01ec1097/cryptography-46.0.3-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:71e842ec9bc7abf543b47cf86b9a743baa95f4677d22baa4c7d5c69e49e9bc04", size = 4940236, upload-time = "2025-10-15T23:18:00.897Z" }, + { url = "https://files.pythonhosted.org/packages/fc/59/873633f3f2dcd8a053b8dd1d38f783043b5fce589c0f6988bf55ef57e43e/cryptography-46.0.3-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:402b58fc32614f00980b66d6e56a5b4118e6cb362ae8f3fda141ba4689bd4506", size = 4472642, upload-time = "2025-10-15T23:18:02.749Z" }, + { url = "https://files.pythonhosted.org/packages/3d/39/8e71f3930e40f6877737d6f69248cf74d4e34b886a3967d32f919cc50d3b/cryptography-46.0.3-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:ef639cb3372f69ec44915fafcd6698b6cc78fbe0c2ea41be867f6ed612811963", size = 4423126, upload-time = "2025-10-15T23:18:04.85Z" }, + { url = "https://files.pythonhosted.org/packages/cd/c7/f65027c2810e14c3e7268353b1681932b87e5a48e65505d8cc17c99e36ae/cryptography-46.0.3-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:3b51b8ca4f1c6453d8829e1eb7299499ca7f313900dd4d89a24b8b87c0a780d4", size = 4686573, upload-time = "2025-10-15T23:18:06.908Z" }, + { url = "https://files.pythonhosted.org/packages/0a/6e/1c8331ddf91ca4730ab3086a0f1be19c65510a33b5a441cb334e7a2d2560/cryptography-46.0.3-cp38-abi3-win32.whl", hash = "sha256:6276eb85ef938dc035d59b87c8a7dc559a232f954962520137529d77b18ff1df", size = 3036695, upload-time = "2025-10-15T23:18:08.672Z" }, + { url = "https://files.pythonhosted.org/packages/90/45/b0d691df20633eff80955a0fc7695ff9051ffce8b69741444bd9ed7bd0db/cryptography-46.0.3-cp38-abi3-win_amd64.whl", hash = "sha256:416260257577718c05135c55958b674000baef9a1c7d9e8f306ec60d71db850f", size = 3501720, upload-time = "2025-10-15T23:18:10.632Z" }, + { url = "https://files.pythonhosted.org/packages/e8/cb/2da4cc83f5edb9c3257d09e1e7ab7b23f049c7962cae8d842bbef0a9cec9/cryptography-46.0.3-cp38-abi3-win_arm64.whl", hash = "sha256:d89c3468de4cdc4f08a57e214384d0471911a3830fcdaf7a8cc587e42a866372", size = 2918740, upload-time = "2025-10-15T23:18:12.277Z" }, + { url = "https://files.pythonhosted.org/packages/d9/cd/1a8633802d766a0fa46f382a77e096d7e209e0817892929655fe0586ae32/cryptography-46.0.3-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:a23582810fedb8c0bc47524558fb6c56aac3fc252cb306072fd2815da2a47c32", size = 3689163, upload-time = "2025-10-15T23:18:13.821Z" }, + { url = "https://files.pythonhosted.org/packages/4c/59/6b26512964ace6480c3e54681a9859c974172fb141c38df11eadd8416947/cryptography-46.0.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e7aec276d68421f9574040c26e2a7c3771060bc0cff408bae1dcb19d3ab1e63c", size = 3429474, upload-time = "2025-10-15T23:18:15.477Z" }, + { url = "https://files.pythonhosted.org/packages/06/8a/e60e46adab4362a682cf142c7dcb5bf79b782ab2199b0dcb81f55970807f/cryptography-46.0.3-pp311-pypy311_pp73-macosx_10_9_x86_64.whl", hash = "sha256:7ce938a99998ed3c8aa7e7272dca1a610401ede816d36d0693907d863b10d9ea", size = 3698132, upload-time = "2025-10-15T23:18:17.056Z" }, + { url = "https://files.pythonhosted.org/packages/da/38/f59940ec4ee91e93d3311f7532671a5cef5570eb04a144bf203b58552d11/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:191bb60a7be5e6f54e30ba16fdfae78ad3a342a0599eb4193ba88e3f3d6e185b", size = 4243992, upload-time = "2025-10-15T23:18:18.695Z" }, + { url = "https://files.pythonhosted.org/packages/b0/0c/35b3d92ddebfdfda76bb485738306545817253d0a3ded0bfe80ef8e67aa5/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c70cc23f12726be8f8bc72e41d5065d77e4515efae3690326764ea1b07845cfb", size = 4409944, upload-time = "2025-10-15T23:18:20.597Z" }, + { url = "https://files.pythonhosted.org/packages/99/55/181022996c4063fc0e7666a47049a1ca705abb9c8a13830f074edb347495/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:9394673a9f4de09e28b5356e7fff97d778f8abad85c9d5ac4a4b7e25a0de7717", size = 4242957, upload-time = "2025-10-15T23:18:22.18Z" }, + { url = "https://files.pythonhosted.org/packages/ba/af/72cd6ef29f9c5f731251acadaeb821559fe25f10852f44a63374c9ca08c1/cryptography-46.0.3-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:94cd0549accc38d1494e1f8de71eca837d0509d0d44bf11d158524b0e12cebf9", size = 4409447, upload-time = "2025-10-15T23:18:24.209Z" }, + { url = "https://files.pythonhosted.org/packages/0d/c3/e90f4a4feae6410f914f8ebac129b9ae7a8c92eb60a638012dde42030a9d/cryptography-46.0.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6b5063083824e5509fdba180721d55909ffacccc8adbec85268b48439423d78c", size = 3438528, upload-time = "2025-10-15T23:18:26.227Z" }, +] + [[package]] name = "django" version = "3.1.6" @@ -306,6 +634,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/21/fb/e500649f787160c68e26e0403c5e1954abc7b30d682f5b79def1472f1826/django_types-0.3.1-py3-none-any.whl", hash = "sha256:f6d1c7e8d0380edfaee2dcccdad51975897fc493df2278076d651fee03b5b8ed", size = 979037, upload-time = "2021-01-19T18:31:22.507Z" }, ] +[[package]] +name = "dnspython" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz", hash = "sha256:181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f", size = 368251, upload-time = "2025-09-07T18:58:00.022Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/5a/18ad964b0086c6e62e2e7500f7edc89e3faa45033c71c1893d34eed2b2de/dnspython-2.8.0-py3-none-any.whl", hash = "sha256:01d9bbc4a2d76bf0db7c1f729812ded6d912bd318d3b1cf81d30c0f845dbf3af", size = 331094, upload-time = "2025-09-07T18:57:58.071Z" }, +] + [[package]] name = "docutils" version = "0.21.2" @@ -323,7 +660,9 @@ name = "docutils" version = "0.22.4" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.11'", + "python_full_version >= '3.14'", + "python_full_version == '3.13.*'", + "python_full_version >= '3.11' and python_full_version < '3.13'", ] sdist = { url = "https://files.pythonhosted.org/packages/ae/b6/03bb70946330e88ffec97aefd3ea75ba575cb2e762061e0e62a213befee8/docutils-0.22.4.tar.gz", hash = "sha256:4db53b1fde9abecbb74d91230d32ab626d94f6badfc575d6db9194a49df29968", size = 2291750, upload-time = "2025-12-18T19:00:26.443Z" } wheels = [ @@ -342,6 +681,239 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, ] +[[package]] +name = "google-api-core" +version = "2.28.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "google-auth" }, + { name = "googleapis-common-protos" }, + { name = "proto-plus" }, + { name = "protobuf" }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/61/da/83d7043169ac2c8c7469f0e375610d78ae2160134bf1b80634c482fa079c/google_api_core-2.28.1.tar.gz", hash = "sha256:2b405df02d68e68ce0fbc138559e6036559e685159d148ae5861013dc201baf8", size = 176759, upload-time = "2025-10-28T21:34:51.529Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/d4/90197b416cb61cefd316964fd9e7bd8324bcbafabf40eef14a9f20b81974/google_api_core-2.28.1-py3-none-any.whl", hash = "sha256:4021b0f8ceb77a6fb4de6fde4502cecab45062e66ff4f2895169e0b35bc9466c", size = 173706, upload-time = "2025-10-28T21:34:50.151Z" }, +] + +[package.optional-dependencies] +grpc = [ + { name = "grpcio" }, + { name = "grpcio-status" }, +] + +[[package]] +name = "google-auth" +version = "2.45.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cachetools" }, + { name = "pyasn1-modules" }, + { name = "rsa" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e5/00/3c794502a8b892c404b2dea5b3650eb21bfc7069612fbfd15c7f17c1cb0d/google_auth-2.45.0.tar.gz", hash = "sha256:90d3f41b6b72ea72dd9811e765699ee491ab24139f34ebf1ca2b9cc0c38708f3", size = 320708, upload-time = "2025-12-15T22:58:42.889Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c6/97/451d55e05487a5cd6279a01a7e34921858b16f7dc8aa38a2c684743cd2b3/google_auth-2.45.0-py2.py3-none-any.whl", hash = "sha256:82344e86dc00410ef5382d99be677c6043d72e502b625aa4f4afa0bdacca0f36", size = 233312, upload-time = "2025-12-15T22:58:40.777Z" }, +] + +[[package]] +name = "google-cloud-monitoring" +version = "2.28.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "google-api-core", extra = ["grpc"] }, + { name = "google-auth" }, + { name = "grpcio" }, + { name = "proto-plus" }, + { name = "protobuf" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bc/b8/7f68a7738cbfef610af532b2fc758e39d852fc93ed3a31bd0e76fd45d2fd/google_cloud_monitoring-2.28.0.tar.gz", hash = "sha256:25175590907e038add644b5b744941d221776342924637095a879973a7c0ac37", size = 393321, upload-time = "2025-10-14T15:42:55.786Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ad/d3/02dcf5376cb4b47b9c06eba36d80700d5b0a1510f3fcd47d3abbe4b0f0a3/google_cloud_monitoring-2.28.0-py3-none-any.whl", hash = "sha256:64f4c57cc465dd51cceffe559f0ec6fa9f96aa6d82790cd8d3af6d5cc3795160", size = 384670, upload-time = "2025-10-14T15:42:41.911Z" }, +] + +[[package]] +name = "google-cloud-pubsub" +version = "2.34.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "google-api-core", extra = ["grpc"] }, + { name = "google-auth" }, + { name = "grpc-google-iam-v1" }, + { name = "grpcio" }, + { name = "grpcio-status" }, + { name = "opentelemetry-api" }, + { name = "opentelemetry-sdk" }, + { name = "proto-plus" }, + { name = "protobuf" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/87/b0/7073a2d17074f0d4a53038c6141115db19f310a2f96bd3911690f15bd701/google_cloud_pubsub-2.34.0.tar.gz", hash = "sha256:25f98c3ba16a69871f9ebbad7aece3fe63c8afe7ba392aad2094be730d545976", size = 396526, upload-time = "2025-12-16T22:44:22.319Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/45/d3/9c06e5ccd3e5b0f4b3bc6d223cb21556e597571797851e9f8cc38b7e2c0b/google_cloud_pubsub-2.34.0-py3-none-any.whl", hash = "sha256:aa11b2471c6d509058b42a103ed1b3643f01048311a34fd38501a16663267206", size = 320110, upload-time = "2025-12-16T22:44:20.349Z" }, +] + +[[package]] +name = "googleapis-common-protos" +version = "1.72.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "protobuf" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e5/7b/adfd75544c415c487b33061fe7ae526165241c1ea133f9a9125a56b39fd8/googleapis_common_protos-1.72.0.tar.gz", hash = "sha256:e55a601c1b32b52d7a3e65f43563e2aa61bcd737998ee672ac9b951cd49319f5", size = 147433, upload-time = "2025-11-06T18:29:24.087Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c4/ab/09169d5a4612a5f92490806649ac8d41e3ec9129c636754575b3553f4ea4/googleapis_common_protos-1.72.0-py3-none-any.whl", hash = "sha256:4299c5a82d5ae1a9702ada957347726b167f9f8d1fc352477702a1e851ff4038", size = 297515, upload-time = "2025-11-06T18:29:13.14Z" }, +] + +[package.optional-dependencies] +grpc = [ + { name = "grpcio" }, +] + +[[package]] +name = "greenlet" +version = "3.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c7/e5/40dbda2736893e3e53d25838e0f19a2b417dfc122b9989c91918db30b5d3/greenlet-3.3.0.tar.gz", hash = "sha256:a82bb225a4e9e4d653dd2fb7b8b2d36e4fb25bc0165422a11e48b88e9e6f78fb", size = 190651, upload-time = "2025-12-04T14:49:44.05Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/32/6a/33d1702184d94106d3cdd7bfb788e19723206fce152e303473ca3b946c7b/greenlet-3.3.0-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:6f8496d434d5cb2dce025773ba5597f71f5410ae499d5dd9533e0653258cdb3d", size = 273658, upload-time = "2025-12-04T14:23:37.494Z" }, + { url = "https://files.pythonhosted.org/packages/d6/b7/2b5805bbf1907c26e434f4e448cd8b696a0b71725204fa21a211ff0c04a7/greenlet-3.3.0-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b96dc7eef78fd404e022e165ec55327f935b9b52ff355b067eb4a0267fc1cffb", size = 574810, upload-time = "2025-12-04T14:50:04.154Z" }, + { url = "https://files.pythonhosted.org/packages/94/38/343242ec12eddf3d8458c73f555c084359883d4ddc674240d9e61ec51fd6/greenlet-3.3.0-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:73631cd5cccbcfe63e3f9492aaa664d278fda0ce5c3d43aeda8e77317e38efbd", size = 586248, upload-time = "2025-12-04T14:57:39.35Z" }, + { url = "https://files.pythonhosted.org/packages/f0/d0/0ae86792fb212e4384041e0ef8e7bc66f59a54912ce407d26a966ed2914d/greenlet-3.3.0-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b299a0cb979f5d7197442dccc3aee67fce53500cd88951b7e6c35575701c980b", size = 597403, upload-time = "2025-12-04T15:07:10.831Z" }, + { url = "https://files.pythonhosted.org/packages/b6/a8/15d0aa26c0036a15d2659175af00954aaaa5d0d66ba538345bd88013b4d7/greenlet-3.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7dee147740789a4632cace364816046e43310b59ff8fb79833ab043aefa72fd5", size = 586910, upload-time = "2025-12-04T14:25:59.705Z" }, + { url = "https://files.pythonhosted.org/packages/e1/9b/68d5e3b7ccaba3907e5532cf8b9bf16f9ef5056a008f195a367db0ff32db/greenlet-3.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:39b28e339fc3c348427560494e28d8a6f3561c8d2bcf7d706e1c624ed8d822b9", size = 1547206, upload-time = "2025-12-04T15:04:21.027Z" }, + { url = "https://files.pythonhosted.org/packages/66/bd/e3086ccedc61e49f91e2cfb5ffad9d8d62e5dc85e512a6200f096875b60c/greenlet-3.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b3c374782c2935cc63b2a27ba8708471de4ad1abaa862ffdb1ef45a643ddbb7d", size = 1613359, upload-time = "2025-12-04T14:27:26.548Z" }, + { url = "https://files.pythonhosted.org/packages/f4/6b/d4e73f5dfa888364bbf02efa85616c6714ae7c631c201349782e5b428925/greenlet-3.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:b49e7ed51876b459bd645d83db257f0180e345d3f768a35a85437a24d5a49082", size = 300740, upload-time = "2025-12-04T14:47:52.773Z" }, + { url = "https://files.pythonhosted.org/packages/1f/cb/48e964c452ca2b92175a9b2dca037a553036cb053ba69e284650ce755f13/greenlet-3.3.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:e29f3018580e8412d6aaf5641bb7745d38c85228dacf51a73bd4e26ddf2a6a8e", size = 274908, upload-time = "2025-12-04T14:23:26.435Z" }, + { url = "https://files.pythonhosted.org/packages/28/da/38d7bff4d0277b594ec557f479d65272a893f1f2a716cad91efeb8680953/greenlet-3.3.0-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a687205fb22794e838f947e2194c0566d3812966b41c78709554aa883183fb62", size = 577113, upload-time = "2025-12-04T14:50:05.493Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f2/89c5eb0faddc3ff014f1c04467d67dee0d1d334ab81fadbf3744847f8a8a/greenlet-3.3.0-cp311-cp311-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:4243050a88ba61842186cb9e63c7dfa677ec146160b0efd73b855a3d9c7fcf32", size = 590338, upload-time = "2025-12-04T14:57:41.136Z" }, + { url = "https://files.pythonhosted.org/packages/80/d7/db0a5085035d05134f8c089643da2b44cc9b80647c39e93129c5ef170d8f/greenlet-3.3.0-cp311-cp311-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:670d0f94cd302d81796e37299bcd04b95d62403883b24225c6b5271466612f45", size = 601098, upload-time = "2025-12-04T15:07:11.898Z" }, + { url = "https://files.pythonhosted.org/packages/dc/a6/e959a127b630a58e23529972dbc868c107f9d583b5a9f878fb858c46bc1a/greenlet-3.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6cb3a8ec3db4a3b0eb8a3c25436c2d49e3505821802074969db017b87bc6a948", size = 590206, upload-time = "2025-12-04T14:26:01.254Z" }, + { url = "https://files.pythonhosted.org/packages/48/60/29035719feb91798693023608447283b266b12efc576ed013dd9442364bb/greenlet-3.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:2de5a0b09eab81fc6a382791b995b1ccf2b172a9fec934747a7a23d2ff291794", size = 1550668, upload-time = "2025-12-04T15:04:22.439Z" }, + { url = "https://files.pythonhosted.org/packages/0a/5f/783a23754b691bfa86bd72c3033aa107490deac9b2ef190837b860996c9f/greenlet-3.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4449a736606bd30f27f8e1ff4678ee193bc47f6ca810d705981cfffd6ce0d8c5", size = 1615483, upload-time = "2025-12-04T14:27:28.083Z" }, + { url = "https://files.pythonhosted.org/packages/1d/d5/c339b3b4bc8198b7caa4f2bd9fd685ac9f29795816d8db112da3d04175bb/greenlet-3.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:7652ee180d16d447a683c04e4c5f6441bae7ba7b17ffd9f6b3aff4605e9e6f71", size = 301164, upload-time = "2025-12-04T14:42:51.577Z" }, + { url = "https://files.pythonhosted.org/packages/f8/0a/a3871375c7b9727edaeeea994bfff7c63ff7804c9829c19309ba2e058807/greenlet-3.3.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:b01548f6e0b9e9784a2c99c5651e5dc89ffcbe870bc5fb2e5ef864e9cc6b5dcb", size = 276379, upload-time = "2025-12-04T14:23:30.498Z" }, + { url = "https://files.pythonhosted.org/packages/43/ab/7ebfe34dce8b87be0d11dae91acbf76f7b8246bf9d6b319c741f99fa59c6/greenlet-3.3.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:349345b770dc88f81506c6861d22a6ccd422207829d2c854ae2af8025af303e3", size = 597294, upload-time = "2025-12-04T14:50:06.847Z" }, + { url = "https://files.pythonhosted.org/packages/a4/39/f1c8da50024feecd0793dbd5e08f526809b8ab5609224a2da40aad3a7641/greenlet-3.3.0-cp312-cp312-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e8e18ed6995e9e2c0b4ed264d2cf89260ab3ac7e13555b8032b25a74c6d18655", size = 607742, upload-time = "2025-12-04T14:57:42.349Z" }, + { url = "https://files.pythonhosted.org/packages/77/cb/43692bcd5f7a0da6ec0ec6d58ee7cddb606d055ce94a62ac9b1aa481e969/greenlet-3.3.0-cp312-cp312-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c024b1e5696626890038e34f76140ed1daf858e37496d33f2af57f06189e70d7", size = 622297, upload-time = "2025-12-04T15:07:13.552Z" }, + { url = "https://files.pythonhosted.org/packages/75/b0/6bde0b1011a60782108c01de5913c588cf51a839174538d266de15e4bf4d/greenlet-3.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:047ab3df20ede6a57c35c14bf5200fcf04039d50f908270d3f9a7a82064f543b", size = 609885, upload-time = "2025-12-04T14:26:02.368Z" }, + { url = "https://files.pythonhosted.org/packages/49/0e/49b46ac39f931f59f987b7cd9f34bfec8ef81d2a1e6e00682f55be5de9f4/greenlet-3.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:2d9ad37fc657b1102ec880e637cccf20191581f75c64087a549e66c57e1ceb53", size = 1567424, upload-time = "2025-12-04T15:04:23.757Z" }, + { url = "https://files.pythonhosted.org/packages/05/f5/49a9ac2dff7f10091935def9165c90236d8f175afb27cbed38fb1d61ab6b/greenlet-3.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:83cd0e36932e0e7f36a64b732a6f60c2fc2df28c351bae79fbaf4f8092fe7614", size = 1636017, upload-time = "2025-12-04T14:27:29.688Z" }, + { url = "https://files.pythonhosted.org/packages/6c/79/3912a94cf27ec503e51ba493692d6db1e3cd8ac7ac52b0b47c8e33d7f4f9/greenlet-3.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:a7a34b13d43a6b78abf828a6d0e87d3385680eaf830cd60d20d52f249faabf39", size = 301964, upload-time = "2025-12-04T14:36:58.316Z" }, + { url = "https://files.pythonhosted.org/packages/02/2f/28592176381b9ab2cafa12829ba7b472d177f3acc35d8fbcf3673d966fff/greenlet-3.3.0-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:a1e41a81c7e2825822f4e068c48cb2196002362619e2d70b148f20a831c00739", size = 275140, upload-time = "2025-12-04T14:23:01.282Z" }, + { url = "https://files.pythonhosted.org/packages/2c/80/fbe937bf81e9fca98c981fe499e59a3f45df2a04da0baa5c2be0dca0d329/greenlet-3.3.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9f515a47d02da4d30caaa85b69474cec77b7929b2e936ff7fb853d42f4bf8808", size = 599219, upload-time = "2025-12-04T14:50:08.309Z" }, + { url = "https://files.pythonhosted.org/packages/c2/ff/7c985128f0514271b8268476af89aee6866df5eec04ac17dcfbc676213df/greenlet-3.3.0-cp313-cp313-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7d2d9fd66bfadf230b385fdc90426fcd6eb64db54b40c495b72ac0feb5766c54", size = 610211, upload-time = "2025-12-04T14:57:43.968Z" }, + { url = "https://files.pythonhosted.org/packages/79/07/c47a82d881319ec18a4510bb30463ed6891f2ad2c1901ed5ec23d3de351f/greenlet-3.3.0-cp313-cp313-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:30a6e28487a790417d036088b3bcb3f3ac7d8babaa7d0139edbaddebf3af9492", size = 624311, upload-time = "2025-12-04T15:07:14.697Z" }, + { url = "https://files.pythonhosted.org/packages/fd/8e/424b8c6e78bd9837d14ff7df01a9829fc883ba2ab4ea787d4f848435f23f/greenlet-3.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:087ea5e004437321508a8d6f20efc4cfec5e3c30118e1417ea96ed1d93950527", size = 612833, upload-time = "2025-12-04T14:26:03.669Z" }, + { url = "https://files.pythonhosted.org/packages/b5/ba/56699ff9b7c76ca12f1cdc27a886d0f81f2189c3455ff9f65246780f713d/greenlet-3.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ab97cf74045343f6c60a39913fa59710e4bd26a536ce7ab2397adf8b27e67c39", size = 1567256, upload-time = "2025-12-04T15:04:25.276Z" }, + { url = "https://files.pythonhosted.org/packages/1e/37/f31136132967982d698c71a281a8901daf1a8fbab935dce7c0cf15f942cc/greenlet-3.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:5375d2e23184629112ca1ea89a53389dddbffcf417dad40125713d88eb5f96e8", size = 1636483, upload-time = "2025-12-04T14:27:30.804Z" }, + { url = "https://files.pythonhosted.org/packages/7e/71/ba21c3fb8c5dce83b8c01f458a42e99ffdb1963aeec08fff5a18588d8fd7/greenlet-3.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:9ee1942ea19550094033c35d25d20726e4f1c40d59545815e1128ac58d416d38", size = 301833, upload-time = "2025-12-04T14:32:23.929Z" }, + { url = "https://files.pythonhosted.org/packages/d7/7c/f0a6d0ede2c7bf092d00bc83ad5bafb7e6ec9b4aab2fbdfa6f134dc73327/greenlet-3.3.0-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:60c2ef0f578afb3c8d92ea07ad327f9a062547137afe91f38408f08aacab667f", size = 275671, upload-time = "2025-12-04T14:23:05.267Z" }, + { url = "https://files.pythonhosted.org/packages/44/06/dac639ae1a50f5969d82d2e3dd9767d30d6dbdbab0e1a54010c8fe90263c/greenlet-3.3.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0a5d554d0712ba1de0a6c94c640f7aeba3f85b3a6e1f2899c11c2c0428da9365", size = 646360, upload-time = "2025-12-04T14:50:10.026Z" }, + { url = "https://files.pythonhosted.org/packages/e0/94/0fb76fe6c5369fba9bf98529ada6f4c3a1adf19e406a47332245ef0eb357/greenlet-3.3.0-cp314-cp314-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3a898b1e9c5f7307ebbde4102908e6cbfcb9ea16284a3abe15cab996bee8b9b3", size = 658160, upload-time = "2025-12-04T14:57:45.41Z" }, + { url = "https://files.pythonhosted.org/packages/93/79/d2c70cae6e823fac36c3bbc9077962105052b7ef81db2f01ec3b9bf17e2b/greenlet-3.3.0-cp314-cp314-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:dcd2bdbd444ff340e8d6bdf54d2f206ccddbb3ccfdcd3c25bf4afaa7b8f0cf45", size = 671388, upload-time = "2025-12-04T15:07:15.789Z" }, + { url = "https://files.pythonhosted.org/packages/b8/14/bab308fc2c1b5228c3224ec2bf928ce2e4d21d8046c161e44a2012b5203e/greenlet-3.3.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5773edda4dc00e173820722711d043799d3adb4f01731f40619e07ea2750b955", size = 660166, upload-time = "2025-12-04T14:26:05.099Z" }, + { url = "https://files.pythonhosted.org/packages/4b/d2/91465d39164eaa0085177f61983d80ffe746c5a1860f009811d498e7259c/greenlet-3.3.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ac0549373982b36d5fd5d30beb8a7a33ee541ff98d2b502714a09f1169f31b55", size = 1615193, upload-time = "2025-12-04T15:04:27.041Z" }, + { url = "https://files.pythonhosted.org/packages/42/1b/83d110a37044b92423084d52d5d5a3b3a73cafb51b547e6d7366ff62eff1/greenlet-3.3.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d198d2d977460358c3b3a4dc844f875d1adb33817f0613f663a656f463764ccc", size = 1683653, upload-time = "2025-12-04T14:27:32.366Z" }, + { url = "https://files.pythonhosted.org/packages/7c/9a/9030e6f9aa8fd7808e9c31ba4c38f87c4f8ec324ee67431d181fe396d705/greenlet-3.3.0-cp314-cp314-win_amd64.whl", hash = "sha256:73f51dd0e0bdb596fb0417e475fa3c5e32d4c83638296e560086b8d7da7c4170", size = 305387, upload-time = "2025-12-04T14:26:51.063Z" }, + { url = "https://files.pythonhosted.org/packages/a0/66/bd6317bc5932accf351fc19f177ffba53712a202f9df10587da8df257c7e/greenlet-3.3.0-cp314-cp314t-macosx_11_0_universal2.whl", hash = "sha256:d6ed6f85fae6cdfdb9ce04c9bf7a08d666cfcfb914e7d006f44f840b46741931", size = 282638, upload-time = "2025-12-04T14:25:20.941Z" }, + { url = "https://files.pythonhosted.org/packages/30/cf/cc81cb030b40e738d6e69502ccbd0dd1bced0588e958f9e757945de24404/greenlet-3.3.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d9125050fcf24554e69c4cacb086b87b3b55dc395a8b3ebe6487b045b2614388", size = 651145, upload-time = "2025-12-04T14:50:11.039Z" }, + { url = "https://files.pythonhosted.org/packages/9c/ea/1020037b5ecfe95ca7df8d8549959baceb8186031da83d5ecceff8b08cd2/greenlet-3.3.0-cp314-cp314t-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:87e63ccfa13c0a0f6234ed0add552af24cc67dd886731f2261e46e241608bee3", size = 654236, upload-time = "2025-12-04T14:57:47.007Z" }, + { url = "https://files.pythonhosted.org/packages/69/cc/1e4bae2e45ca2fa55299f4e85854606a78ecc37fead20d69322f96000504/greenlet-3.3.0-cp314-cp314t-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2662433acbca297c9153a4023fe2161c8dcfdcc91f10433171cf7e7d94ba2221", size = 662506, upload-time = "2025-12-04T15:07:16.906Z" }, + { url = "https://files.pythonhosted.org/packages/57/b9/f8025d71a6085c441a7eaff0fd928bbb275a6633773667023d19179fe815/greenlet-3.3.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3c6e9b9c1527a78520357de498b0e709fb9e2f49c3a513afd5a249007261911b", size = 653783, upload-time = "2025-12-04T14:26:06.225Z" }, + { url = "https://files.pythonhosted.org/packages/f6/c7/876a8c7a7485d5d6b5c6821201d542ef28be645aa024cfe1145b35c120c1/greenlet-3.3.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:286d093f95ec98fdd92fcb955003b8a3d054b4e2cab3e2707a5039e7b50520fd", size = 1614857, upload-time = "2025-12-04T15:04:28.484Z" }, + { url = "https://files.pythonhosted.org/packages/4f/dc/041be1dff9f23dac5f48a43323cd0789cb798342011c19a248d9c9335536/greenlet-3.3.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c10513330af5b8ae16f023e8ddbfb486ab355d04467c4679c5cfe4659975dd9", size = 1676034, upload-time = "2025-12-04T14:27:33.531Z" }, +] + +[[package]] +name = "grpc-google-iam-v1" +version = "0.14.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "googleapis-common-protos", extra = ["grpc"] }, + { name = "grpcio" }, + { name = "protobuf" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/76/1e/1011451679a983f2f5c6771a1682542ecb027776762ad031fd0d7129164b/grpc_google_iam_v1-0.14.3.tar.gz", hash = "sha256:879ac4ef33136c5491a6300e27575a9ec760f6cdf9a2518798c1b8977a5dc389", size = 23745, upload-time = "2025-10-15T21:14:53.318Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4a/bd/330a1bbdb1afe0b96311249e699b6dc9cfc17916394fd4503ac5aca2514b/grpc_google_iam_v1-0.14.3-py3-none-any.whl", hash = "sha256:7a7f697e017a067206a3dfef44e4c634a34d3dee135fe7d7a4613fe3e59217e6", size = 32690, upload-time = "2025-10-15T21:14:51.72Z" }, +] + +[[package]] +name = "grpcio" +version = "1.76.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b6/e0/318c1ce3ae5a17894d5791e87aea147587c9e702f24122cc7a5c8bbaeeb1/grpcio-1.76.0.tar.gz", hash = "sha256:7be78388d6da1a25c0d5ec506523db58b18be22d9c37d8d3a32c08be4987bd73", size = 12785182, upload-time = "2025-10-21T16:23:12.106Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/17/ff4795dc9a34b6aee6ec379f1b66438a3789cd1315aac0cbab60d92f74b3/grpcio-1.76.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:65a20de41e85648e00305c1bb09a3598f840422e522277641145a32d42dcefcc", size = 5840037, upload-time = "2025-10-21T16:20:25.069Z" }, + { url = "https://files.pythonhosted.org/packages/4e/ff/35f9b96e3fa2f12e1dcd58a4513a2e2294a001d64dec81677361b7040c9a/grpcio-1.76.0-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:40ad3afe81676fd9ec6d9d406eda00933f218038433980aa19d401490e46ecde", size = 11836482, upload-time = "2025-10-21T16:20:30.113Z" }, + { url = "https://files.pythonhosted.org/packages/3e/1c/8374990f9545e99462caacea5413ed783014b3b66ace49e35c533f07507b/grpcio-1.76.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:035d90bc79eaa4bed83f524331d55e35820725c9fbb00ffa1904d5550ed7ede3", size = 6407178, upload-time = "2025-10-21T16:20:32.733Z" }, + { url = "https://files.pythonhosted.org/packages/1e/77/36fd7d7c75a6c12542c90a6d647a27935a1ecaad03e0ffdb7c42db6b04d2/grpcio-1.76.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:4215d3a102bd95e2e11b5395c78562967959824156af11fa93d18fdd18050990", size = 7075684, upload-time = "2025-10-21T16:20:35.435Z" }, + { url = "https://files.pythonhosted.org/packages/38/f7/e3cdb252492278e004722306c5a8935eae91e64ea11f0af3437a7de2e2b7/grpcio-1.76.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:49ce47231818806067aea3324d4bf13825b658ad662d3b25fada0bdad9b8a6af", size = 6611133, upload-time = "2025-10-21T16:20:37.541Z" }, + { url = "https://files.pythonhosted.org/packages/7e/20/340db7af162ccd20a0893b5f3c4a5d676af7b71105517e62279b5b61d95a/grpcio-1.76.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:8cc3309d8e08fd79089e13ed4819d0af72aa935dd8f435a195fd152796752ff2", size = 7195507, upload-time = "2025-10-21T16:20:39.643Z" }, + { url = "https://files.pythonhosted.org/packages/10/f0/b2160addc1487bd8fa4810857a27132fb4ce35c1b330c2f3ac45d697b106/grpcio-1.76.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:971fd5a1d6e62e00d945423a567e42eb1fa678ba89072832185ca836a94daaa6", size = 8160651, upload-time = "2025-10-21T16:20:42.492Z" }, + { url = "https://files.pythonhosted.org/packages/2c/2c/ac6f98aa113c6ef111b3f347854e99ebb7fb9d8f7bb3af1491d438f62af4/grpcio-1.76.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:9d9adda641db7207e800a7f089068f6f645959f2df27e870ee81d44701dd9db3", size = 7620568, upload-time = "2025-10-21T16:20:45.995Z" }, + { url = "https://files.pythonhosted.org/packages/90/84/7852f7e087285e3ac17a2703bc4129fafee52d77c6c82af97d905566857e/grpcio-1.76.0-cp310-cp310-win32.whl", hash = "sha256:063065249d9e7e0782d03d2bca50787f53bd0fb89a67de9a7b521c4a01f1989b", size = 3998879, upload-time = "2025-10-21T16:20:48.592Z" }, + { url = "https://files.pythonhosted.org/packages/10/30/d3d2adcbb6dd3ff59d6ac3df6ef830e02b437fb5c90990429fd180e52f30/grpcio-1.76.0-cp310-cp310-win_amd64.whl", hash = "sha256:a6ae758eb08088d36812dd5d9af7a9859c05b1e0f714470ea243694b49278e7b", size = 4706892, upload-time = "2025-10-21T16:20:50.697Z" }, + { url = "https://files.pythonhosted.org/packages/a0/00/8163a1beeb6971f66b4bbe6ac9457b97948beba8dd2fc8e1281dce7f79ec/grpcio-1.76.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:2e1743fbd7f5fa713a1b0a8ac8ebabf0ec980b5d8809ec358d488e273b9cf02a", size = 5843567, upload-time = "2025-10-21T16:20:52.829Z" }, + { url = "https://files.pythonhosted.org/packages/10/c1/934202f5cf335e6d852530ce14ddb0fef21be612ba9ecbbcbd4d748ca32d/grpcio-1.76.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:a8c2cf1209497cf659a667d7dea88985e834c24b7c3b605e6254cbb5076d985c", size = 11848017, upload-time = "2025-10-21T16:20:56.705Z" }, + { url = "https://files.pythonhosted.org/packages/11/0b/8dec16b1863d74af6eb3543928600ec2195af49ca58b16334972f6775663/grpcio-1.76.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:08caea849a9d3c71a542827d6df9d5a69067b0a1efbea8a855633ff5d9571465", size = 6412027, upload-time = "2025-10-21T16:20:59.3Z" }, + { url = "https://files.pythonhosted.org/packages/d7/64/7b9e6e7ab910bea9d46f2c090380bab274a0b91fb0a2fe9b0cd399fffa12/grpcio-1.76.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:f0e34c2079d47ae9f6188211db9e777c619a21d4faba6977774e8fa43b085e48", size = 7075913, upload-time = "2025-10-21T16:21:01.645Z" }, + { url = "https://files.pythonhosted.org/packages/68/86/093c46e9546073cefa789bd76d44c5cb2abc824ca62af0c18be590ff13ba/grpcio-1.76.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8843114c0cfce61b40ad48df65abcfc00d4dba82eae8718fab5352390848c5da", size = 6615417, upload-time = "2025-10-21T16:21:03.844Z" }, + { url = "https://files.pythonhosted.org/packages/f7/b6/5709a3a68500a9c03da6fb71740dcdd5ef245e39266461a03f31a57036d8/grpcio-1.76.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:8eddfb4d203a237da6f3cc8a540dad0517d274b5a1e9e636fd8d2c79b5c1d397", size = 7199683, upload-time = "2025-10-21T16:21:06.195Z" }, + { url = "https://files.pythonhosted.org/packages/91/d3/4b1f2bf16ed52ce0b508161df3a2d186e4935379a159a834cb4a7d687429/grpcio-1.76.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:32483fe2aab2c3794101c2a159070584e5db11d0aa091b2c0ea9c4fc43d0d749", size = 8163109, upload-time = "2025-10-21T16:21:08.498Z" }, + { url = "https://files.pythonhosted.org/packages/5c/61/d9043f95f5f4cf085ac5dd6137b469d41befb04bd80280952ffa2a4c3f12/grpcio-1.76.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:dcfe41187da8992c5f40aa8c5ec086fa3672834d2be57a32384c08d5a05b4c00", size = 7626676, upload-time = "2025-10-21T16:21:10.693Z" }, + { url = "https://files.pythonhosted.org/packages/36/95/fd9a5152ca02d8881e4dd419cdd790e11805979f499a2e5b96488b85cf27/grpcio-1.76.0-cp311-cp311-win32.whl", hash = "sha256:2107b0c024d1b35f4083f11245c0e23846ae64d02f40b2b226684840260ed054", size = 3997688, upload-time = "2025-10-21T16:21:12.746Z" }, + { url = "https://files.pythonhosted.org/packages/60/9c/5c359c8d4c9176cfa3c61ecd4efe5affe1f38d9bae81e81ac7186b4c9cc8/grpcio-1.76.0-cp311-cp311-win_amd64.whl", hash = "sha256:522175aba7af9113c48ec10cc471b9b9bd4f6ceb36aeb4544a8e2c80ed9d252d", size = 4709315, upload-time = "2025-10-21T16:21:15.26Z" }, + { url = "https://files.pythonhosted.org/packages/bf/05/8e29121994b8d959ffa0afd28996d452f291b48cfc0875619de0bde2c50c/grpcio-1.76.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:81fd9652b37b36f16138611c7e884eb82e0cec137c40d3ef7c3f9b3ed00f6ed8", size = 5799718, upload-time = "2025-10-21T16:21:17.939Z" }, + { url = "https://files.pythonhosted.org/packages/d9/75/11d0e66b3cdf998c996489581bdad8900db79ebd83513e45c19548f1cba4/grpcio-1.76.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:04bbe1bfe3a68bbfd4e52402ab7d4eb59d72d02647ae2042204326cf4bbad280", size = 11825627, upload-time = "2025-10-21T16:21:20.466Z" }, + { url = "https://files.pythonhosted.org/packages/28/50/2f0aa0498bc188048f5d9504dcc5c2c24f2eb1a9337cd0fa09a61a2e75f0/grpcio-1.76.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d388087771c837cdb6515539f43b9d4bf0b0f23593a24054ac16f7a960be16f4", size = 6359167, upload-time = "2025-10-21T16:21:23.122Z" }, + { url = "https://files.pythonhosted.org/packages/66/e5/bbf0bb97d29ede1d59d6588af40018cfc345b17ce979b7b45424628dc8bb/grpcio-1.76.0-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:9f8f757bebaaea112c00dba718fc0d3260052ce714e25804a03f93f5d1c6cc11", size = 7044267, upload-time = "2025-10-21T16:21:25.995Z" }, + { url = "https://files.pythonhosted.org/packages/f5/86/f6ec2164f743d9609691115ae8ece098c76b894ebe4f7c94a655c6b03e98/grpcio-1.76.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:980a846182ce88c4f2f7e2c22c56aefd515daeb36149d1c897f83cf57999e0b6", size = 6573963, upload-time = "2025-10-21T16:21:28.631Z" }, + { url = "https://files.pythonhosted.org/packages/60/bc/8d9d0d8505feccfdf38a766d262c71e73639c165b311c9457208b56d92ae/grpcio-1.76.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:f92f88e6c033db65a5ae3d97905c8fea9c725b63e28d5a75cb73b49bda5024d8", size = 7164484, upload-time = "2025-10-21T16:21:30.837Z" }, + { url = "https://files.pythonhosted.org/packages/67/e6/5d6c2fc10b95edf6df9b8f19cf10a34263b7fd48493936fffd5085521292/grpcio-1.76.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:4baf3cbe2f0be3289eb68ac8ae771156971848bb8aaff60bad42005539431980", size = 8127777, upload-time = "2025-10-21T16:21:33.577Z" }, + { url = "https://files.pythonhosted.org/packages/3f/c8/dce8ff21c86abe025efe304d9e31fdb0deaaa3b502b6a78141080f206da0/grpcio-1.76.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:615ba64c208aaceb5ec83bfdce7728b80bfeb8be97562944836a7a0a9647d882", size = 7594014, upload-time = "2025-10-21T16:21:41.882Z" }, + { url = "https://files.pythonhosted.org/packages/e0/42/ad28191ebf983a5d0ecef90bab66baa5a6b18f2bfdef9d0a63b1973d9f75/grpcio-1.76.0-cp312-cp312-win32.whl", hash = "sha256:45d59a649a82df5718fd9527ce775fd66d1af35e6d31abdcdc906a49c6822958", size = 3984750, upload-time = "2025-10-21T16:21:44.006Z" }, + { url = "https://files.pythonhosted.org/packages/9e/00/7bd478cbb851c04a48baccaa49b75abaa8e4122f7d86da797500cccdd771/grpcio-1.76.0-cp312-cp312-win_amd64.whl", hash = "sha256:c088e7a90b6017307f423efbb9d1ba97a22aa2170876223f9709e9d1de0b5347", size = 4704003, upload-time = "2025-10-21T16:21:46.244Z" }, + { url = "https://files.pythonhosted.org/packages/fc/ed/71467ab770effc9e8cef5f2e7388beb2be26ed642d567697bb103a790c72/grpcio-1.76.0-cp313-cp313-linux_armv7l.whl", hash = "sha256:26ef06c73eb53267c2b319f43e6634c7556ea37672029241a056629af27c10e2", size = 5807716, upload-time = "2025-10-21T16:21:48.475Z" }, + { url = "https://files.pythonhosted.org/packages/2c/85/c6ed56f9817fab03fa8a111ca91469941fb514e3e3ce6d793cb8f1e1347b/grpcio-1.76.0-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:45e0111e73f43f735d70786557dc38141185072d7ff8dc1829d6a77ac1471468", size = 11821522, upload-time = "2025-10-21T16:21:51.142Z" }, + { url = "https://files.pythonhosted.org/packages/ac/31/2b8a235ab40c39cbc141ef647f8a6eb7b0028f023015a4842933bc0d6831/grpcio-1.76.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:83d57312a58dcfe2a3a0f9d1389b299438909a02db60e2f2ea2ae2d8034909d3", size = 6362558, upload-time = "2025-10-21T16:21:54.213Z" }, + { url = "https://files.pythonhosted.org/packages/bd/64/9784eab483358e08847498ee56faf8ff6ea8e0a4592568d9f68edc97e9e9/grpcio-1.76.0-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:3e2a27c89eb9ac3d81ec8835e12414d73536c6e620355d65102503064a4ed6eb", size = 7049990, upload-time = "2025-10-21T16:21:56.476Z" }, + { url = "https://files.pythonhosted.org/packages/2b/94/8c12319a6369434e7a184b987e8e9f3b49a114c489b8315f029e24de4837/grpcio-1.76.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:61f69297cba3950a524f61c7c8ee12e55c486cb5f7db47ff9dcee33da6f0d3ae", size = 6575387, upload-time = "2025-10-21T16:21:59.051Z" }, + { url = "https://files.pythonhosted.org/packages/15/0f/f12c32b03f731f4a6242f771f63039df182c8b8e2cf8075b245b409259d4/grpcio-1.76.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6a15c17af8839b6801d554263c546c69c4d7718ad4321e3166175b37eaacca77", size = 7166668, upload-time = "2025-10-21T16:22:02.049Z" }, + { url = "https://files.pythonhosted.org/packages/ff/2d/3ec9ce0c2b1d92dd59d1c3264aaec9f0f7c817d6e8ac683b97198a36ed5a/grpcio-1.76.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:25a18e9810fbc7e7f03ec2516addc116a957f8cbb8cbc95ccc80faa072743d03", size = 8124928, upload-time = "2025-10-21T16:22:04.984Z" }, + { url = "https://files.pythonhosted.org/packages/1a/74/fd3317be5672f4856bcdd1a9e7b5e17554692d3db9a3b273879dc02d657d/grpcio-1.76.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:931091142fd8cc14edccc0845a79248bc155425eee9a98b2db2ea4f00a235a42", size = 7589983, upload-time = "2025-10-21T16:22:07.881Z" }, + { url = "https://files.pythonhosted.org/packages/45/bb/ca038cf420f405971f19821c8c15bcbc875505f6ffadafe9ffd77871dc4c/grpcio-1.76.0-cp313-cp313-win32.whl", hash = "sha256:5e8571632780e08526f118f74170ad8d50fb0a48c23a746bef2a6ebade3abd6f", size = 3984727, upload-time = "2025-10-21T16:22:10.032Z" }, + { url = "https://files.pythonhosted.org/packages/41/80/84087dc56437ced7cdd4b13d7875e7439a52a261e3ab4e06488ba6173b0a/grpcio-1.76.0-cp313-cp313-win_amd64.whl", hash = "sha256:f9f7bd5faab55f47231ad8dba7787866b69f5e93bc306e3915606779bbfb4ba8", size = 4702799, upload-time = "2025-10-21T16:22:12.709Z" }, + { url = "https://files.pythonhosted.org/packages/b4/46/39adac80de49d678e6e073b70204091e76631e03e94928b9ea4ecf0f6e0e/grpcio-1.76.0-cp314-cp314-linux_armv7l.whl", hash = "sha256:ff8a59ea85a1f2191a0ffcc61298c571bc566332f82e5f5be1b83c9d8e668a62", size = 5808417, upload-time = "2025-10-21T16:22:15.02Z" }, + { url = "https://files.pythonhosted.org/packages/9c/f5/a4531f7fb8b4e2a60b94e39d5d924469b7a6988176b3422487be61fe2998/grpcio-1.76.0-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:06c3d6b076e7b593905d04fdba6a0525711b3466f43b3400266f04ff735de0cd", size = 11828219, upload-time = "2025-10-21T16:22:17.954Z" }, + { url = "https://files.pythonhosted.org/packages/4b/1c/de55d868ed7a8bd6acc6b1d6ddc4aa36d07a9f31d33c912c804adb1b971b/grpcio-1.76.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fd5ef5932f6475c436c4a55e4336ebbe47bd3272be04964a03d316bbf4afbcbc", size = 6367826, upload-time = "2025-10-21T16:22:20.721Z" }, + { url = "https://files.pythonhosted.org/packages/59/64/99e44c02b5adb0ad13ab3adc89cb33cb54bfa90c74770f2607eea629b86f/grpcio-1.76.0-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:b331680e46239e090f5b3cead313cc772f6caa7d0fc8de349337563125361a4a", size = 7049550, upload-time = "2025-10-21T16:22:23.637Z" }, + { url = "https://files.pythonhosted.org/packages/43/28/40a5be3f9a86949b83e7d6a2ad6011d993cbe9b6bd27bea881f61c7788b6/grpcio-1.76.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:2229ae655ec4e8999599469559e97630185fdd53ae1e8997d147b7c9b2b72cba", size = 6575564, upload-time = "2025-10-21T16:22:26.016Z" }, + { url = "https://files.pythonhosted.org/packages/4b/a9/1be18e6055b64467440208a8559afac243c66a8b904213af6f392dc2212f/grpcio-1.76.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:490fa6d203992c47c7b9e4a9d39003a0c2bcc1c9aa3c058730884bbbb0ee9f09", size = 7176236, upload-time = "2025-10-21T16:22:28.362Z" }, + { url = "https://files.pythonhosted.org/packages/0f/55/dba05d3fcc151ce6e81327541d2cc8394f442f6b350fead67401661bf041/grpcio-1.76.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:479496325ce554792dba6548fae3df31a72cef7bad71ca2e12b0e58f9b336bfc", size = 8125795, upload-time = "2025-10-21T16:22:31.075Z" }, + { url = "https://files.pythonhosted.org/packages/4a/45/122df922d05655f63930cf42c9e3f72ba20aadb26c100ee105cad4ce4257/grpcio-1.76.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1c9b93f79f48b03ada57ea24725d83a30284a012ec27eab2cf7e50a550cbbbcc", size = 7592214, upload-time = "2025-10-21T16:22:33.831Z" }, + { url = "https://files.pythonhosted.org/packages/4a/6e/0b899b7f6b66e5af39e377055fb4a6675c9ee28431df5708139df2e93233/grpcio-1.76.0-cp314-cp314-win32.whl", hash = "sha256:747fa73efa9b8b1488a95d0ba1039c8e2dca0f741612d80415b1e1c560febf4e", size = 4062961, upload-time = "2025-10-21T16:22:36.468Z" }, + { url = "https://files.pythonhosted.org/packages/19/41/0b430b01a2eb38ee887f88c1f07644a1df8e289353b78e82b37ef988fb64/grpcio-1.76.0-cp314-cp314-win_amd64.whl", hash = "sha256:922fa70ba549fce362d2e2871ab542082d66e2aaf0c19480ea453905b01f384e", size = 4834462, upload-time = "2025-10-21T16:22:39.772Z" }, +] + +[[package]] +name = "grpcio-status" +version = "1.76.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "googleapis-common-protos" }, + { name = "grpcio" }, + { name = "protobuf" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3f/46/e9f19d5be65e8423f886813a2a9d0056ba94757b0c5007aa59aed1a961fa/grpcio_status-1.76.0.tar.gz", hash = "sha256:25fcbfec74c15d1a1cb5da3fab8ee9672852dc16a5a9eeb5baf7d7a9952943cd", size = 13679, upload-time = "2025-10-21T16:28:52.545Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8c/cc/27ba60ad5a5f2067963e6a858743500df408eb5855e98be778eaef8c9b02/grpcio_status-1.76.0-py3-none-any.whl", hash = "sha256:380568794055a8efbbd8871162df92012e0228a5f6dffaf57f2a00c534103b18", size = 14425, upload-time = "2025-10-21T16:28:40.853Z" }, +] + [[package]] name = "idna" version = "3.11" @@ -360,6 +932,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ff/62/85c4c919272577931d407be5ba5d71c20f0b616d31a0befe0ae45bb79abd/imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", size = 8769, upload-time = "2022-07-01T12:21:02.467Z" }, ] +[[package]] +name = "importlib-metadata" +version = "8.7.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "zipp" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f3/49/3b30cad09e7771a4982d9975a8cbf64f00d4a1ececb53297f1d9a7be1b10/importlib_metadata-8.7.1.tar.gz", hash = "sha256:49fef1ae6440c182052f407c8d34a68f72efc36db9ca90dc0113398f2fdde8bb", size = 57107, upload-time = "2025-12-21T10:00:19.278Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fa/5e/f8e9a1d23b9c20a551a8a02ea3637b4642e22c2626e3a13a9a29cdea99eb/importlib_metadata-8.7.1-py3-none-any.whl", hash = "sha256:5a1f80bf1daa489495071efbb095d75a634cf28a8bc299581244063b53176151", size = 27865, upload-time = "2025-12-21T10:00:18.329Z" }, +] + [[package]] name = "iniconfig" version = "2.3.0" @@ -369,6 +953,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, ] +[[package]] +name = "isodate" +version = "0.7.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/54/4d/e940025e2ce31a8ce1202635910747e5a87cc3a6a6bb2d00973375014749/isodate-0.7.2.tar.gz", hash = "sha256:4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6", size = 29705, upload-time = "2024-10-08T23:04:11.5Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/15/aa/0aca39a37d3c7eb941ba736ede56d689e7be91cab5d9ca846bde3999eba6/isodate-0.7.2-py3-none-any.whl", hash = "sha256:28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15", size = 22320, upload-time = "2024-10-08T23:04:09.501Z" }, +] + [[package]] name = "jinja2" version = "3.1.6" @@ -381,6 +974,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, ] +[[package]] +name = "jmespath" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz", hash = "sha256:90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe", size = 25843, upload-time = "2022-06-17T18:00:12.224Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/31/b4/b9b800c45527aadd64d5b442f9b932b00648617eb5d63d2c7a6587b7cafc/jmespath-1.0.1-py3-none-any.whl", hash = "sha256:02e2e4cc71b5bcab88332eebf907519190dd9e6e82107fa7f83b1003a6252980", size = 20256, upload-time = "2022-06-17T18:00:10.251Z" }, +] + [[package]] name = "kombu" version = "5.6.1" @@ -625,6 +1227,46 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/df/af/cd3290a647df567645353feed451ef4feaf5844496ced69c4dcb84295ff4/nodejs_wheel_binaries-24.12.0-py2.py3-none-win_arm64.whl", hash = "sha256:d0c2273b667dd7e3f55e369c0085957b702144b1b04bfceb7ce2411e58333757", size = 39048104, upload-time = "2025-12-11T21:12:23.495Z" }, ] +[[package]] +name = "opentelemetry-api" +version = "1.39.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "importlib-metadata" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/97/b9/3161be15bb8e3ad01be8be5a968a9237c3027c5be504362ff800fca3e442/opentelemetry_api-1.39.1.tar.gz", hash = "sha256:fbde8c80e1b937a2c61f20347e91c0c18a1940cecf012d62e65a7caf08967c9c", size = 65767, upload-time = "2025-12-11T13:32:39.182Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cf/df/d3f1ddf4bb4cb50ed9b1139cc7b1c54c34a1e7ce8fd1b9a37c0d1551a6bd/opentelemetry_api-1.39.1-py3-none-any.whl", hash = "sha256:2edd8463432a7f8443edce90972169b195e7d6a05500cd29e6d13898187c9950", size = 66356, upload-time = "2025-12-11T13:32:17.304Z" }, +] + +[[package]] +name = "opentelemetry-sdk" +version = "1.39.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-api" }, + { name = "opentelemetry-semantic-conventions" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/eb/fb/c76080c9ba07e1e8235d24cdcc4d125ef7aa3edf23eb4e497c2e50889adc/opentelemetry_sdk-1.39.1.tar.gz", hash = "sha256:cf4d4563caf7bff906c9f7967e2be22d0d6b349b908be0d90fb21c8e9c995cc6", size = 171460, upload-time = "2025-12-11T13:32:49.369Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7c/98/e91cf858f203d86f4eccdf763dcf01cf03f1dae80c3750f7e635bfa206b6/opentelemetry_sdk-1.39.1-py3-none-any.whl", hash = "sha256:4d5482c478513ecb0a5d938dcc61394e647066e0cc2676bee9f3af3f3f45f01c", size = 132565, upload-time = "2025-12-11T13:32:35.069Z" }, +] + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.60b1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "opentelemetry-api" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/91/df/553f93ed38bf22f4b999d9be9c185adb558982214f33eae539d3b5cd0858/opentelemetry_semantic_conventions-0.60b1.tar.gz", hash = "sha256:87c228b5a0669b748c76d76df6c364c369c28f1c465e50f661e39737e84bc953", size = 137935, upload-time = "2025-12-11T13:32:50.487Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7a/5e/5958555e09635d09b75de3c4f8b9cae7335ca545d77392ffe7331534c402/opentelemetry_semantic_conventions-0.60b1-py3-none-any.whl", hash = "sha256:9fa8c8b0c110da289809292b0591220d3a7b53c1526a23021e977d68597893fb", size = 219982, upload-time = "2025-12-11T13:32:36.955Z" }, +] + [[package]] name = "packaging" version = "25.0" @@ -690,6 +1332,107 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/84/03/0d3ce49e2505ae70cf43bc5bb3033955d2fc9f932163e84dc0779cc47f48/prompt_toolkit-3.0.52-py3-none-any.whl", hash = "sha256:9aac639a3bbd33284347de5ad8d68ecc044b91a762dc39b7c21095fcd6a19955", size = 391431, upload-time = "2025-08-27T15:23:59.498Z" }, ] +[[package]] +name = "proto-plus" +version = "1.27.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "protobuf" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/01/89/9cbe2f4bba860e149108b683bc2efec21f14d5f7ed6e25562ad86acbc373/proto_plus-1.27.0.tar.gz", hash = "sha256:873af56dd0d7e91836aee871e5799e1c6f1bda86ac9a983e0bb9f0c266a568c4", size = 56158, upload-time = "2025-12-16T13:46:25.729Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cd/24/3b7a0818484df9c28172857af32c2397b6d8fcd99d9468bd4684f98ebf0a/proto_plus-1.27.0-py3-none-any.whl", hash = "sha256:1baa7f81cf0f8acb8bc1f6d085008ba4171eaf669629d1b6d1673b21ed1c0a82", size = 50205, upload-time = "2025-12-16T13:46:24.76Z" }, +] + +[[package]] +name = "protobuf" +version = "6.33.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/34/44/e49ecff446afeec9d1a66d6bbf9adc21e3c7cea7803a920ca3773379d4f6/protobuf-6.33.2.tar.gz", hash = "sha256:56dc370c91fbb8ac85bc13582c9e373569668a290aa2e66a590c2a0d35ddb9e4", size = 444296, upload-time = "2025-12-06T00:17:53.311Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bc/91/1e3a34881a88697a7354ffd177e8746e97a722e5e8db101544b47e84afb1/protobuf-6.33.2-cp310-abi3-win32.whl", hash = "sha256:87eb388bd2d0f78febd8f4c8779c79247b26a5befad525008e49a6955787ff3d", size = 425603, upload-time = "2025-12-06T00:17:41.114Z" }, + { url = "https://files.pythonhosted.org/packages/64/20/4d50191997e917ae13ad0a235c8b42d8c1ab9c3e6fd455ca16d416944355/protobuf-6.33.2-cp310-abi3-win_amd64.whl", hash = "sha256:fc2a0e8b05b180e5fc0dd1559fe8ebdae21a27e81ac77728fb6c42b12c7419b4", size = 436930, upload-time = "2025-12-06T00:17:43.278Z" }, + { url = "https://files.pythonhosted.org/packages/b2/ca/7e485da88ba45c920fb3f50ae78de29ab925d9e54ef0de678306abfbb497/protobuf-6.33.2-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:d9b19771ca75935b3a4422957bc518b0cecb978b31d1dd12037b088f6bcc0e43", size = 427621, upload-time = "2025-12-06T00:17:44.445Z" }, + { url = "https://files.pythonhosted.org/packages/7d/4f/f743761e41d3b2b2566748eb76bbff2b43e14d5fcab694f494a16458b05f/protobuf-6.33.2-cp39-abi3-manylinux2014_aarch64.whl", hash = "sha256:b5d3b5625192214066d99b2b605f5783483575656784de223f00a8d00754fc0e", size = 324460, upload-time = "2025-12-06T00:17:45.678Z" }, + { url = "https://files.pythonhosted.org/packages/b1/fa/26468d00a92824020f6f2090d827078c09c9c587e34cbfd2d0c7911221f8/protobuf-6.33.2-cp39-abi3-manylinux2014_s390x.whl", hash = "sha256:8cd7640aee0b7828b6d03ae518b5b4806fdfc1afe8de82f79c3454f8aef29872", size = 339168, upload-time = "2025-12-06T00:17:46.813Z" }, + { url = "https://files.pythonhosted.org/packages/56/13/333b8f421738f149d4fe5e49553bc2a2ab75235486259f689b4b91f96cec/protobuf-6.33.2-cp39-abi3-manylinux2014_x86_64.whl", hash = "sha256:1f8017c48c07ec5859106533b682260ba3d7c5567b1ca1f24297ce03384d1b4f", size = 323270, upload-time = "2025-12-06T00:17:48.253Z" }, + { url = "https://files.pythonhosted.org/packages/0e/15/4f02896cc3df04fc465010a4c6a0cd89810f54617a32a70ef531ed75d61c/protobuf-6.33.2-py3-none-any.whl", hash = "sha256:7636aad9bb01768870266de5dc009de2d1b936771b38a793f73cbbf279c91c5c", size = 170501, upload-time = "2025-12-06T00:17:52.211Z" }, +] + +[[package]] +name = "pyasn1" +version = "0.6.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034", size = 145322, upload-time = "2024-09-10T22:41:42.55Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c8/f1/d6a797abb14f6283c0ddff96bbdd46937f64122b8c925cab503dd37f8214/pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629", size = 83135, upload-time = "2024-09-11T16:00:36.122Z" }, +] + +[[package]] +name = "pyasn1-modules" +version = "0.4.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyasn1" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e9/e6/78ebbb10a8c8e4b61a59249394a4a594c1a7af95593dc933a349c8d00964/pyasn1_modules-0.4.2.tar.gz", hash = "sha256:677091de870a80aae844b1ca6134f54652fa2c8c5a52aa396440ac3106e941e6", size = 307892, upload-time = "2025-03-28T02:41:22.17Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/47/8d/d529b5d697919ba8c11ad626e835d4039be708a35b0d22de83a269a6682c/pyasn1_modules-0.4.2-py3-none-any.whl", hash = "sha256:29253a9207ce32b64c3ac6600edc75368f98473906e8fd1043bd6b5b1de2c14a", size = 181259, upload-time = "2025-03-28T02:41:19.028Z" }, +] + +[[package]] +name = "pycparser" +version = "2.23" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fe/cf/d2d3b9f5699fb1e4615c8e32ff220203e43b248e1dfcc6736ad9057731ca/pycparser-2.23.tar.gz", hash = "sha256:78816d4f24add8f10a06d6f05b4d424ad9e96cfebf68a4ddc99c65c0720d00c2", size = 173734, upload-time = "2025-09-09T13:23:47.91Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/e3/59cd50310fc9b59512193629e1984c1f95e5c8ae6e5d8c69532ccc65a7fe/pycparser-2.23-py3-none-any.whl", hash = "sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934", size = 118140, upload-time = "2025-09-09T13:23:46.651Z" }, +] + +[[package]] +name = "pycurl" +version = "7.45.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/3d/01255f1cde24401f54bb3727d0e5d3396b67fc04964f287d5d473155f176/pycurl-7.45.7.tar.gz", hash = "sha256:9d43013002eab2fd6d0dcc671cd1e9149e2fc1c56d5e796fad94d076d6cb69ef", size = 241098, upload-time = "2025-09-24T13:37:17.067Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/37/c9/e4184b4d50b5e6ebfc2a8a3076171f09a404736d789e8cc2429c120c9730/pycurl-7.45.7-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c21c3262244f7b2af27636bc1052cb861a70df933b8bc188a7fb8fe3c895b608", size = 3796067, upload-time = "2025-09-24T13:35:56.249Z" }, + { url = "https://files.pythonhosted.org/packages/60/99/808de664fe4ce041f5d660d04222b2c80bdf28d621cca186a570da881b48/pycurl-7.45.7-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9903eabe2578143487d2387947d28323e12df49e142ffb0e3b5709fc6c942c47", size = 3903386, upload-time = "2025-09-24T13:35:58.234Z" }, + { url = "https://files.pythonhosted.org/packages/83/66/b962cc586ea1a593af9ba43e0ac5c9b632bebe5d6441bde281db5f6879dc/pycurl-7.45.7-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:fb97f8f3f7754a5a00da450248de79d83e34938db04486efd26db81526dc25b4", size = 5173438, upload-time = "2025-09-24T13:36:00.061Z" }, + { url = "https://files.pythonhosted.org/packages/9c/bc/1bf01ca26724f1df389142219acf4c56493219f91b844230a705ef49b457/pycurl-7.45.7-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:26fcc5b982fdc7c49ab9dd84910e986ef2631f1b57e02ecefd5393366f7acbe6", size = 4876980, upload-time = "2025-09-24T13:36:02.133Z" }, + { url = "https://files.pythonhosted.org/packages/59/c9/61139320188d3806dbff4a9cf0b565c5ad1e8169ff7597d80d28d6100f53/pycurl-7.45.7-cp310-cp310-win32.whl", hash = "sha256:38492a48bd51252b70d6008b2f38a62b8ddb55ed7d4c905717eca290c94ef125", size = 2738552, upload-time = "2025-09-24T13:36:03.755Z" }, + { url = "https://files.pythonhosted.org/packages/85/42/e4d89ed4593bed2c7ccfec972351fa6e54fd02082a04e01e247d16c74df3/pycurl-7.45.7-cp310-cp310-win_amd64.whl", hash = "sha256:2101c343f425545d8329004971d3549a1c553fb2b027c23ddfffebdd7b3fb309", size = 3299529, upload-time = "2025-09-24T13:36:05.406Z" }, + { url = "https://files.pythonhosted.org/packages/b9/b1/923d75ec2bcb39bef889ce47f706ab07fbb050ac528712af586acd641028/pycurl-7.45.7-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f17264adc95a7f92a148d17c55eee885da640cbd98cf9169e643029d79bb18c7", size = 3795020, upload-time = "2025-09-24T13:36:07.115Z" }, + { url = "https://files.pythonhosted.org/packages/92/f9/edf6965ab5260257fad3ba962474908150ca45125b415a561ec710f6b5b6/pycurl-7.45.7-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0bcfeaf766372ec40e3830d4ad6ebc3064e8a0bd145214d4291d17ed6017f3e3", size = 3902808, upload-time = "2025-09-24T13:36:08.827Z" }, + { url = "https://files.pythonhosted.org/packages/a4/61/2c3aea6481d9012e9b8e7264225ac57a3fa03ff02b1b6c3a4e89a8b78bdf/pycurl-7.45.7-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:788df7ab964f03894c616e742e088f1bf209a54465f61541ba77901a9e1cd701", size = 5178287, upload-time = "2025-09-24T13:36:10.613Z" }, + { url = "https://files.pythonhosted.org/packages/ad/b7/e3524703c4a74d9e080a0f4bd6c7ec829bd1ed0a8d5f8c22eb91de8ba947/pycurl-7.45.7-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:3d19b4a94c2e20976cbc7773e5398bae19e3bc65a0894fcd01d8477bfc5fdb2f", size = 4881508, upload-time = "2025-09-24T13:36:12.305Z" }, + { url = "https://files.pythonhosted.org/packages/57/4c/721eeb17205aee5ff68511230b23b2cb0d70ffdf7aa9d393abdffa5e326c/pycurl-7.45.7-cp311-cp311-win32.whl", hash = "sha256:d5d7bc6e01d74548e93d5b9b3e38c3a91b6f54a36f2fe13407cac035b57f0c1f", size = 2738302, upload-time = "2025-09-24T13:36:14.078Z" }, + { url = "https://files.pythonhosted.org/packages/88/3f/c3ff543ad28c3e94f8db8044142a2c9963960ff976aeb1b09f4761967ab9/pycurl-7.45.7-cp311-cp311-win_amd64.whl", hash = "sha256:94a3c02381b62b2f0498f4ea3a3bd8b96ae2a6a905fcfd198547805894793a5b", size = 3299170, upload-time = "2025-09-24T13:36:15.898Z" }, + { url = "https://files.pythonhosted.org/packages/3b/d3/77cf5cef99e83cf9e088e4a4539b933cdccf2bfabbb32f55d0273f9efd11/pycurl-7.45.7-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:cd69340f5a49d6e4f67723db6ea4459c554d2210c3dd4da99950d6d405ddafb4", size = 3795471, upload-time = "2025-09-24T13:36:17.608Z" }, + { url = "https://files.pythonhosted.org/packages/18/f9/42137fcace6403a1670dc203a16fce443f53da7b14cdc28f05053008e56b/pycurl-7.45.7-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:752a5bbbd1b148b61d69be718e2c1c89a1b16de27a21e6382d28c8d2a33e9bf1", size = 3903182, upload-time = "2025-09-24T13:36:19.353Z" }, + { url = "https://files.pythonhosted.org/packages/9f/db/46134f8e822527a39fd4ed0e5150992274f1368a4fe8402818cc45470ffe/pycurl-7.45.7-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:5fa5afd86d86e156051c7d7d6de34f6c03a7a64e4794ac0d72379bee8fcafafd", size = 5188809, upload-time = "2025-09-24T13:36:21.444Z" }, + { url = "https://files.pythonhosted.org/packages/e1/f8/9a6148258b056202d5872fcd5e4d512ad9ee487c0f7b5dddd631004432b4/pycurl-7.45.7-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:f463a7f7c12b322b4f72af908f863b4da1f71dae344dd75f50d30c33ff0f197a", size = 4893965, upload-time = "2025-09-24T13:36:23.108Z" }, + { url = "https://files.pythonhosted.org/packages/41/16/bbf5da7e0108dafddb70347f299f6de54f1364079a66653759c9e9fb099d/pycurl-7.45.7-cp312-cp312-win32.whl", hash = "sha256:83c217e0c7aea28bbd9512e27fb6f9ef9b9f398dff57ebe223ecaa043bcd08fa", size = 2736232, upload-time = "2025-09-24T13:36:25.072Z" }, + { url = "https://files.pythonhosted.org/packages/a8/16/ab7d73ed3d2a31a9d9bb8a44710b8f95f6ea24bd260967f07ae67c36e8c4/pycurl-7.45.7-cp312-cp312-win_amd64.whl", hash = "sha256:150b1d2e98bcf760878b3891e6f2f937a4b2a90c559ffc6add65aeb5844bc66a", size = 3296191, upload-time = "2025-09-24T13:36:27.242Z" }, + { url = "https://files.pythonhosted.org/packages/1a/0c/b6442a204c13d68e339d18c7f16a30b0178ad1efed644fe411f8a404934c/pycurl-7.45.7-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8d39cc233c7c3303072758b088ad7ccde0a5dcb30ce752f2f8a31428a07faac1", size = 3795397, upload-time = "2025-09-24T13:36:29.362Z" }, + { url = "https://files.pythonhosted.org/packages/e5/23/dae7f5bf59f31908fd10797e03e9af6ad70ee0fe8a71783bcced68ca7db4/pycurl-7.45.7-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:824a785d01500da47fe6935dbadc4b0a14577405c25d01327a94717578dd2b1d", size = 3903225, upload-time = "2025-09-24T13:36:31.393Z" }, + { url = "https://files.pythonhosted.org/packages/33/93/016d37e76b172d508706828319389a08be4cb669daab8cdac6947b699f80/pycurl-7.45.7-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:998335e6b69691c097e3a74214901c71773e0a7a8d3d0cc87c60d6969eb8b584", size = 5189262, upload-time = "2025-09-24T13:36:33.752Z" }, + { url = "https://files.pythonhosted.org/packages/24/e3/039ed3b136fb008354047881a3f36e5647d67d97d7b7620123fa8b9c515f/pycurl-7.45.7-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:00824c3c64d5e935d0325e6a000bb0242622cd763d1e202c1a8df455bc58da58", size = 4895224, upload-time = "2025-09-24T13:36:35.449Z" }, + { url = "https://files.pythonhosted.org/packages/9a/52/f2326e0ddb2c6ab74a46c90aff0aac565cc4f804f03ac6a454cf7c75cb37/pycurl-7.45.7-cp313-cp313-win32.whl", hash = "sha256:bfe49668ba0a7fba183cf0e189bb8da515793da8f383d8d157ac8647143dc516", size = 2736217, upload-time = "2025-09-24T13:36:37.152Z" }, + { url = "https://files.pythonhosted.org/packages/96/d5/d7214c92b97fe8541efcdf42a35e5b0852e6c57340f9266e4f4acccfa492/pycurl-7.45.7-cp313-cp313-win_amd64.whl", hash = "sha256:3d9d718c366983bc65b149f0947f016929b4001f604f2523e6de5a49907f4474", size = 3296259, upload-time = "2025-09-24T13:36:38.886Z" }, + { url = "https://files.pythonhosted.org/packages/85/bb/18c4e53ef9a8d52451336aae1e44768dfb639ba46dd02f331c5dc9220bc3/pycurl-7.45.7-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:6157ac0daf30ffc28446c54ebbd073c8c11b45cba9c45256619e218a07a31312", size = 3794861, upload-time = "2025-09-24T13:36:40.509Z" }, + { url = "https://files.pythonhosted.org/packages/ce/23/ea963df437b8b0fd4e2ff5909dbfd800364231a95588de2b6446ffbdd1c8/pycurl-7.45.7-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:09ac9a855273a77f7c6a72f05be430646c47a298d403a75876c2188ea5d77534", size = 3903002, upload-time = "2025-09-24T13:36:42.765Z" }, + { url = "https://files.pythonhosted.org/packages/4c/33/6432144d3961ff862c1ac933f4851828f8947d615aa46b50b91162224af9/pycurl-7.45.7-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:0263e94d2ea3cd25b5fcf96527f521dc29b8a73a9b19e71223b6e2452f5cb35a", size = 5186571, upload-time = "2025-09-24T13:36:44.584Z" }, + { url = "https://files.pythonhosted.org/packages/44/91/635beb1e8c5a8b2a031fb09bd64e5c2abd332cebb9211739539ab385e731/pycurl-7.45.7-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:54cffa56a5ead14915f1f0d3e8fabf6fcea3056a8e5f971fc1caebb9715bd9b1", size = 4891741, upload-time = "2025-09-24T13:36:46.7Z" }, + { url = "https://files.pythonhosted.org/packages/77/bd/51ffbf6c4a3c5bcdad2f3175c5b5980fff4dd668e2556593530030430fcf/pycurl-7.45.7-cp314-cp314-win32.whl", hash = "sha256:09e426cf5e61e5b37c30903734204f75023baa6e4bfe574e037f12e53ec3f0ba", size = 2817391, upload-time = "2025-09-24T13:36:48.766Z" }, + { url = "https://files.pythonhosted.org/packages/f1/68/c7c7f4b2372568eff3a12046364fdd74e382778563ee26727a1b016702bc/pycurl-7.45.7-cp314-cp314-win_amd64.whl", hash = "sha256:8eab3a83670d83966c7a0df4fa02cf2272499966066bfaa810444c427cb653b0", size = 3403530, upload-time = "2025-09-24T13:36:50.825Z" }, + { url = "https://files.pythonhosted.org/packages/e1/66/b65ae067433f37fd4c2b89aec9b0ab31b35cd3846e77854e7ec47bfb9d13/pycurl-7.45.7-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:69f16d6709f3305da1043ee9edb5e1715212b75011779d58c4bd8fc9ad9fc88a", size = 3798020, upload-time = "2025-09-24T13:36:53.259Z" }, + { url = "https://files.pythonhosted.org/packages/5d/31/af6edb607b7d359b54df63ee561650fe7f94347f86e7c600e0042af595cc/pycurl-7.45.7-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:435f140afa59eb0cece57e6364348977af768add452d49a8547a26fc90dc2bfa", size = 3905273, upload-time = "2025-09-24T13:36:55.386Z" }, + { url = "https://files.pythonhosted.org/packages/79/35/4825905afb55037db15d2d2c9a45253ca8951559ef5f62afd277c98d1ec2/pycurl-7.45.7-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:ff50a3d787c3d059f330d7cb7325b40416bcb0f43f5006b396a6e61871df0ebf", size = 5247322, upload-time = "2025-09-24T13:36:57.568Z" }, + { url = "https://files.pythonhosted.org/packages/28/fc/716a3e9d335aa12f09471842e49e3db9eb792a06ddc6203a6fb1b90b7f7a/pycurl-7.45.7-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:5ed0cab4e05558ba112111585ae2a85627ab48d6185547fc4ba8ec8e2cfecd0d", size = 4947252, upload-time = "2025-09-24T13:36:59.26Z" }, + { url = "https://files.pythonhosted.org/packages/43/05/b8274ad3740b76f029031921b1831f9a7f9fdc419333c85488b25dcde87a/pycurl-7.45.7-cp314-cp314t-win32.whl", hash = "sha256:e79f90c0af413933dedc79a1717f49076f08b32ff4a42776d6c38ba37125717e", size = 2824929, upload-time = "2025-09-24T13:37:01.665Z" }, + { url = "https://files.pythonhosted.org/packages/70/c1/3982528967a42eff566d7e94fce0c8a0cf293c398a38465f87709440f260/pycurl-7.45.7-cp314-cp314t-win_amd64.whl", hash = "sha256:bdb72c53445b1c09315940c81a14a3635dfde6710aea703976ce9617209830e7", size = 3412632, upload-time = "2025-09-24T13:37:03.852Z" }, +] + [[package]] name = "pygments" version = "2.19.2" @@ -699,6 +1442,77 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, ] +[[package]] +name = "pymongo" +version = "4.15.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "dnspython" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/24/a0/5c324fe6735b2bc189779ff46e981a59d495a74594f45542159125d77256/pymongo-4.15.5.tar.gz", hash = "sha256:3a8d6bf2610abe0c97c567cf98bf5bba3e90ccc93cc03c9dde75fa11e4267b42", size = 2471889, upload-time = "2025-12-02T18:44:30.992Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/33/e4/d80061be4e53125597dd2916171c87986043b190e50c1834fff455e71d42/pymongo-4.15.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a01a2054d50b50c121c720739a2216d855c48726b0002894de9b991cdd68a2a5", size = 811318, upload-time = "2025-12-02T18:42:12.09Z" }, + { url = "https://files.pythonhosted.org/packages/fb/b3/c499fe0814e4d3a84fa3ff5df5133bf847529d8b5a051e6108b5a25b75c7/pymongo-4.15.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5e57968139d81367117ed7b75d921445a575d4d7e61536f5e860475df92ac0a9", size = 811676, upload-time = "2025-12-02T18:42:14.396Z" }, + { url = "https://files.pythonhosted.org/packages/62/71/8e21a8a680546b3a90afbb878a16fe2a7cb0f7d9652aa675c172e57856a1/pymongo-4.15.5-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:266aa37e3673e5dcfdd359a81d27131fc133e49cf8e5d9f9f27a5845fac2cd1f", size = 1185485, upload-time = "2025-12-02T18:42:16.147Z" }, + { url = "https://files.pythonhosted.org/packages/03/56/bdc292a7b01aa2aba806883dbcacc3be837d65425453aa2bc27954ba5a55/pymongo-4.15.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2883da6bd0545cc2f12672f6a609b33d48e099a220872ca2bf9bf29fe96a32c3", size = 1203866, upload-time = "2025-12-02T18:42:18.018Z" }, + { url = "https://files.pythonhosted.org/packages/8b/e2/12bebc7e93a81c2f804ffcc94997f61f0e2cd2c11bf0f01da8e0e1425e5c/pymongo-4.15.5-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2fc32b354a608ec748d89bbe236b74b967890667eea1af54e92dfd8fbf26df52", size = 1242550, upload-time = "2025-12-02T18:42:19.898Z" }, + { url = "https://files.pythonhosted.org/packages/0d/ac/c48f6f59a660ec44052ee448dea1c71da85cfaa4a0c17c726d4ee2db7716/pymongo-4.15.5-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3c006cbaa4b40d296dd2bb8828976866c876ead4c39032b761dcf26f1ba56fde", size = 1232844, upload-time = "2025-12-02T18:42:21.709Z" }, + { url = "https://files.pythonhosted.org/packages/89/cc/6368befca7a2f3b51460755a373f78b72003aeee95e8e138cbd479c307f4/pymongo-4.15.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ce21e3dc5939b83d03f871090d83ac29fef055bd057f8d3074b6cad10f86b04c", size = 1200192, upload-time = "2025-12-02T18:42:23.605Z" }, + { url = "https://files.pythonhosted.org/packages/9d/97/bc810a017ebb20e6e301fa8c5b21c5e53691fdde2cfd39bd9c450e957b14/pymongo-4.15.5-cp310-cp310-win32.whl", hash = "sha256:1b545dcf66a9f06e9b501bfb0438e1eb9af67336e8a5cf36c4bc0a5d3fbe7a37", size = 798338, upload-time = "2025-12-02T18:42:25.438Z" }, + { url = "https://files.pythonhosted.org/packages/46/17/3be0b476a6bfb3a51bf1750323b5eddf883dddb6482ccb8dbcab2c6c48ad/pymongo-4.15.5-cp310-cp310-win_amd64.whl", hash = "sha256:1ecc544f515f828f05d3c56cd98063ba3ef8b75f534c63de43306d59f1e93fcd", size = 808153, upload-time = "2025-12-02T18:42:26.889Z" }, + { url = "https://files.pythonhosted.org/packages/bf/0a/39f9daf16d695abd58987bb5e2c164b5a64e42b8d53d3c43bc06e4aa7dfc/pymongo-4.15.5-cp310-cp310-win_arm64.whl", hash = "sha256:1151968ab90db146f0591b6c7db27ce4f73c7ffa0bbddc1d7fb7cb14c9f0b967", size = 800943, upload-time = "2025-12-02T18:42:28.668Z" }, + { url = "https://files.pythonhosted.org/packages/0c/ea/e43387c2ed78a60ad917c45f4d4de4f6992929d63fe15af4c2e624f093a9/pymongo-4.15.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:57157a4b936e28e2fbe7017b2f6a751da5e284675cab371f2c596d4e0e4f58f3", size = 865894, upload-time = "2025-12-02T18:42:30.496Z" }, + { url = "https://files.pythonhosted.org/packages/5e/8c/f2c9c55adb9709a4b2244d8d8d9ec05e4abb274e03fe8388b58a34ae08b0/pymongo-4.15.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e2a34a7391f4cc54fc584e49db6f7c3929221a9da08b3af2d2689884a5943843", size = 866235, upload-time = "2025-12-02T18:42:31.862Z" }, + { url = "https://files.pythonhosted.org/packages/5e/aa/bdf3553d7309b0ebc0c6edc23f43829b1758431f2f2f7385d2427b20563b/pymongo-4.15.5-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:be040c8cdaf9c2d5ae9ab60a67ecab453ec19d9ccd457a678053fdceab5ee4c8", size = 1429787, upload-time = "2025-12-02T18:42:33.829Z" }, + { url = "https://files.pythonhosted.org/packages/b3/55/80a8eefc88f578fde56489e5278ba5caa5ee9b6f285959ed2b98b44e2133/pymongo-4.15.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:defe93944526b1774265c16acf014689cb1b0b18eb84a7b370083b214f9e18cd", size = 1456747, upload-time = "2025-12-02T18:42:35.805Z" }, + { url = "https://files.pythonhosted.org/packages/1d/54/6a7ec290c7ab22aab117ab60e7375882ec5af7433eaf077f86e187a3a9e8/pymongo-4.15.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:816e66116f0ef868eff0463a8b28774af8b547466dbad30c8e82bf0325041848", size = 1514670, upload-time = "2025-12-02T18:42:37.737Z" }, + { url = "https://files.pythonhosted.org/packages/65/8a/5822aa20b274ee8a8821bf0284f131e7fc555b0758c3f2a82c51ae73a3c6/pymongo-4.15.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66c7b332532e0f021d784d04488dbf7ed39b7e7d6d5505e282ec8e9cf1025791", size = 1500711, upload-time = "2025-12-02T18:42:39.61Z" }, + { url = "https://files.pythonhosted.org/packages/32/ca/63984e32b4d745a25445c9da1159dfe4568a03375f32bb1a9e009dccb023/pymongo-4.15.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:acc46a9e47efad8c5229e644a3774169013a46ee28ac72d1fa4edd67c0b7ee9b", size = 1452021, upload-time = "2025-12-02T18:42:41.323Z" }, + { url = "https://files.pythonhosted.org/packages/f1/23/0d6988f3fdfcacae2ac8d7b76eb24f80ebee9eb607c53bcebfad75b7fd85/pymongo-4.15.5-cp311-cp311-win32.whl", hash = "sha256:b9836c28ba350d8182a51f32ef9bb29f0c40e82ba1dfb9e4371cd4d94338a55d", size = 844483, upload-time = "2025-12-02T18:42:42.814Z" }, + { url = "https://files.pythonhosted.org/packages/8e/04/dedff8a5a9539e5b6128d8d2458b9c0c83ebd38b43389620a0d97223f114/pymongo-4.15.5-cp311-cp311-win_amd64.whl", hash = "sha256:3a45876c5c2ab44e2a249fb542eba2a026f60d6ab04c7ef3924eae338d9de790", size = 859194, upload-time = "2025-12-02T18:42:45.025Z" }, + { url = "https://files.pythonhosted.org/packages/67/e5/fb6f49bceffe183e66831c2eebd2ea14bd65e2816aeaf8e2fc018fd8c344/pymongo-4.15.5-cp311-cp311-win_arm64.whl", hash = "sha256:e4a48fc5c712b3db85c9987cfa7fde0366b7930018de262919afd9e52cfbc375", size = 848377, upload-time = "2025-12-02T18:42:47.19Z" }, + { url = "https://files.pythonhosted.org/packages/3c/4e/8f9fcb2dc9eab1fb0ed02da31e7f4847831d9c0ef08854a296588b97e8ed/pymongo-4.15.5-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c33477af1a50d1b4d86555e098fc2cf5992d839ad538dea0c00a8682162b7a75", size = 920955, upload-time = "2025-12-02T18:42:48.812Z" }, + { url = "https://files.pythonhosted.org/packages/d2/b4/c0808bed1f82b3008909b9562615461e59c3b66f8977e502ea87c88b08a4/pymongo-4.15.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e6b30defa4a52d3698cd84d608963a8932f7e9b6ec5130087e7082552ac685e5", size = 920690, upload-time = "2025-12-02T18:42:50.832Z" }, + { url = "https://files.pythonhosted.org/packages/12/f3/feea83150c6a0cd3b44d5f705b1c74bff298a36f82d665f597bf89d42b3f/pymongo-4.15.5-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:45fec063f5672e6173bcb09b492431e3641cc74399c2b996fcb995881c2cac61", size = 1690351, upload-time = "2025-12-02T18:42:53.402Z" }, + { url = "https://files.pythonhosted.org/packages/d7/4e/15924d33d8d429e4c41666090017c6ac5e7ccc4ce5e435a2df09e45220a8/pymongo-4.15.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b8c6813110c0d9fde18674b7262f47a2270ae46c0ddd05711e6770caa3c9a3fb", size = 1726089, upload-time = "2025-12-02T18:42:56.187Z" }, + { url = "https://files.pythonhosted.org/packages/a5/49/650ff29dc5f9cf090dfbd6fb248c56d8a10d268b6f46b10fb02fbda3c762/pymongo-4.15.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:e8ec48d1db9f44c737b13be4299a1782d5fde3e75423acbbbe927cb37ebbe87d", size = 1800637, upload-time = "2025-12-02T18:42:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/7d/18/f34661ade670ee42331543f4aa229569ac7ef45907ecda41b777137b9f40/pymongo-4.15.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:1f410694fdd76631ead7df6544cdeadaf2407179196c3642fced8e48bb21d0a6", size = 1785480, upload-time = "2025-12-02T18:43:00.626Z" }, + { url = "https://files.pythonhosted.org/packages/10/b6/378bb26937f6b366754484145826aca2d2361ac05b0bacd45a35876abcef/pymongo-4.15.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8c46765d6ac5727a899190aacdeec7a57f8c93346124ddd7e12633b573e2e65", size = 1718548, upload-time = "2025-12-02T18:43:02.32Z" }, + { url = "https://files.pythonhosted.org/packages/58/79/31b8afba36f794a049633e105e45c30afaa0e1c0bab48332d999e87d4860/pymongo-4.15.5-cp312-cp312-win32.whl", hash = "sha256:647118a58dca7d3547714fc0b383aebf81f5852f4173dfd77dd34e80eea9d29b", size = 891319, upload-time = "2025-12-02T18:43:04.699Z" }, + { url = "https://files.pythonhosted.org/packages/c8/31/a7e6d8c5657d922872ac75ab1c0a1335bfb533d2b4dad082d5d04089abbb/pymongo-4.15.5-cp312-cp312-win_amd64.whl", hash = "sha256:099d3e2dddfc75760c6a8fadfb99c1e88824a99c2c204a829601241dff9da049", size = 910919, upload-time = "2025-12-02T18:43:06.555Z" }, + { url = "https://files.pythonhosted.org/packages/1c/b4/286c12fa955ae0597cd4c763d87c986e7ade681d4b11a81766f62f079c79/pymongo-4.15.5-cp312-cp312-win_arm64.whl", hash = "sha256:649cb906882c4058f467f334fb277083998ba5672ffec6a95d6700db577fd31a", size = 896357, upload-time = "2025-12-02T18:43:08.801Z" }, + { url = "https://files.pythonhosted.org/packages/9b/92/e70db1a53bc0bb5defe755dee66b5dfbe5e514882183ffb696d6e1d38aa2/pymongo-4.15.5-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2b736226f9001bbbd02f822acb9b9b6d28319f362f057672dfae2851f7da6125", size = 975324, upload-time = "2025-12-02T18:43:11.074Z" }, + { url = "https://files.pythonhosted.org/packages/a4/90/dd78c059a031b942fa36d71796e94a0739ea9fb4251fcd971e9579192611/pymongo-4.15.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:60ea9f07fbbcc7c88f922082eb27436dce6756730fdef76a3a9b4c972d0a57a3", size = 975129, upload-time = "2025-12-02T18:43:13.345Z" }, + { url = "https://files.pythonhosted.org/packages/40/72/87cf1bb75ef296456912eb7c6d51ebe7a36dbbe9bee0b8a9cd02a62a8a6e/pymongo-4.15.5-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:20af63218ae42870eaee31fb8cc4ce9e3af7f04ea02fc98ad751fb7a9c8d7be3", size = 1950973, upload-time = "2025-12-02T18:43:15.225Z" }, + { url = "https://files.pythonhosted.org/packages/8c/68/dfa507c8e5cebee4e305825b436c34f5b9ba34488a224b7e112a03dbc01e/pymongo-4.15.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20d9c11625392f1f8dec7688de5ce344e110ca695344efa313ae4839f13bd017", size = 1995259, upload-time = "2025-12-02T18:43:16.869Z" }, + { url = "https://files.pythonhosted.org/packages/85/9d/832578e5ed7f682a09441bbc0881ffd506b843396ef4b34ec53bd38b2fb2/pymongo-4.15.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1202b3e5357b161acb7b7cc98e730288a5c15544e5ef7254b33931cb9a27c36e", size = 2086591, upload-time = "2025-12-02T18:43:19.559Z" }, + { url = "https://files.pythonhosted.org/packages/0a/99/ca8342a0cefd2bb1392187ef8fe01432855e3b5cd1e640495246bcd65542/pymongo-4.15.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:63af710e9700dbf91abccf119c5f5533b9830286d29edb073803d3b252862c0d", size = 2070200, upload-time = "2025-12-02T18:43:21.214Z" }, + { url = "https://files.pythonhosted.org/packages/3f/7d/f4a9c1fceaaf71524ff9ff964cece0315dcc93df4999a49f064564875bff/pymongo-4.15.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f22eeb86861cf7b8ee6886361d52abb88e3cd96c6f6d102e45e2604fc6e9e316", size = 1985263, upload-time = "2025-12-02T18:43:23.415Z" }, + { url = "https://files.pythonhosted.org/packages/d8/15/f942535bcc6e22d3c26c7e730daf296ffe69d8ce474c430ea7e551f8cf33/pymongo-4.15.5-cp313-cp313-win32.whl", hash = "sha256:aad6efe82b085bf77cec2a047ded2c810e93eced3ccf1a8e3faec3317df3cd52", size = 938143, upload-time = "2025-12-02T18:43:26.081Z" }, + { url = "https://files.pythonhosted.org/packages/02/2a/c92a6927d676dd376d1ae05c680139c5cad068b22e5f0c8cb61014448894/pymongo-4.15.5-cp313-cp313-win_amd64.whl", hash = "sha256:ccc801f6d71ebee2ec2fb3acc64b218fa7cdb7f57933b2f8eee15396b662a0a0", size = 962603, upload-time = "2025-12-02T18:43:27.816Z" }, + { url = "https://files.pythonhosted.org/packages/3a/f0/cdf78e9ed9c26fb36b8d75561ebf3c7fe206ff1c3de2e1b609fccdf3a55b/pymongo-4.15.5-cp313-cp313-win_arm64.whl", hash = "sha256:f043abdf20845bf29a554e95e4fe18d7d7a463095d6a1547699a12f80da91e02", size = 944308, upload-time = "2025-12-02T18:43:29.371Z" }, + { url = "https://files.pythonhosted.org/packages/03/0c/49713e0f8f41110e8b2bcce7c88570b158cf43dd53a0d01d4e1c772c7ede/pymongo-4.15.5-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:ba0e75a390334221744e2666fd2d4c82419b580c9bc8d6e0d2d61459d263f3af", size = 1029996, upload-time = "2025-12-02T18:43:31.58Z" }, + { url = "https://files.pythonhosted.org/packages/23/de/1df5d7b49647e9e4511054f750c1109cb8e160763b286b96879917170618/pymongo-4.15.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:853ec7da97642eabaf94d3de4453a86365729327d920af167bf14b2e87b24dce", size = 1029612, upload-time = "2025-12-02T18:43:33.69Z" }, + { url = "https://files.pythonhosted.org/packages/8b/19/3a051228e5beb0b421d725bb2ab5207a260c718d9b5be5b85cfe963733e3/pymongo-4.15.5-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7631304106487480ebbd8acbe44ff1e69d1fdc27e83d9753dc1fd227cea10761", size = 2211814, upload-time = "2025-12-02T18:43:35.769Z" }, + { url = "https://files.pythonhosted.org/packages/bf/b3/989531a056c4388ef18245d1a6d6b3ec5c538666b000764286119efbf194/pymongo-4.15.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:50505181365eba5d4d35c462870b3614c8eddd0b2407c89377c1a59380640dd9", size = 2264629, upload-time = "2025-12-02T18:43:37.479Z" }, + { url = "https://files.pythonhosted.org/packages/ea/5f/8b3339fec44d0ba6d9388a19340fb1534c85ab6aa9fd8fb9c1af146bb72a/pymongo-4.15.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3b75ec7006471299a571d6db1c5609ea4aa9c847a701e9b2953a8ede705d82db", size = 2371823, upload-time = "2025-12-02T18:43:39.866Z" }, + { url = "https://files.pythonhosted.org/packages/d4/7f/706bf45cf12990b6cb73e6290b048944a51592de7a597052a761eea90b8d/pymongo-4.15.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:c3fc24cb1f4ec60ed83162d4bba0c26abc6c9ae78c928805583673f3b3ea6984", size = 2351860, upload-time = "2025-12-02T18:43:42.002Z" }, + { url = "https://files.pythonhosted.org/packages/f3/c5/fdcc81c20c67a61ba1073122c9ab42c937dd6f914004747e9ceefa4cead3/pymongo-4.15.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:21d17bb2934b0640863361c08dd06991f128a97f9bee19425a499227be9ae6b4", size = 2251349, upload-time = "2025-12-02T18:43:43.924Z" }, + { url = "https://files.pythonhosted.org/packages/0c/1c/e540ccac0685b234a23574dce3c8e077cd59bcb73ab19bcab1915894d3a6/pymongo-4.15.5-cp314-cp314-win32.whl", hash = "sha256:5a3974236cb842b4ef50a5a6bfad9c7d83a713af68ea3592ba240bbcb863305a", size = 992901, upload-time = "2025-12-02T18:43:45.732Z" }, + { url = "https://files.pythonhosted.org/packages/89/31/eb72c53bc897cb50b57000d71ce9bdcfc9c84ba4c7f6d55348df47b241d8/pymongo-4.15.5-cp314-cp314-win_amd64.whl", hash = "sha256:73fa8a7eee44fd95ba7d5cf537340ff3ff34efeb1f7d6790532d0a6ed4dee575", size = 1021205, upload-time = "2025-12-02T18:43:47.756Z" }, + { url = "https://files.pythonhosted.org/packages/ea/4a/74a7cc350d60953d27b5636906b43b232b501cee07f70f6513ac603097e8/pymongo-4.15.5-cp314-cp314-win_arm64.whl", hash = "sha256:d41288ca2a3eb9ac7c8cad4ea86ef8d63b69dc46c9b65c2bbd35331ec2a0fc57", size = 1000616, upload-time = "2025-12-02T18:43:49.677Z" }, + { url = "https://files.pythonhosted.org/packages/1a/22/1e557868b9b207d7dbf7706412251b28a82d4b958e007b6f2569d59ada3d/pymongo-4.15.5-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:552670f0c8bff103656d4e4b1f2c018f789c9de03f7615ed5e547d5b1b83cda0", size = 1086723, upload-time = "2025-12-02T18:43:51.432Z" }, + { url = "https://files.pythonhosted.org/packages/aa/9c/2e24c2da289e1d3b9bc4e0850136a364473bddfbe8b19b33d2bb5d30ee0d/pymongo-4.15.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:41891b45f6ff1e23cfd1b7fbe40286664ad4507e2d2aa61c6d8c40eb6e11dded", size = 1086653, upload-time = "2025-12-02T18:43:53.131Z" }, + { url = "https://files.pythonhosted.org/packages/c6/be/4c2460c9ec91a891c754b91914ce700cc46009dae40183a85e26793dfae9/pymongo-4.15.5-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:524a8a593ae2eb1ec6db761daf0c03f98824e9882ab7df3d458d0c76c7ade255", size = 2531627, upload-time = "2025-12-02T18:43:55.141Z" }, + { url = "https://files.pythonhosted.org/packages/a0/48/cea56d04eb6bbd8b8943ff73d7cf26b94f715fccb23cf7ef9a4f853725a0/pymongo-4.15.5-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e7ceb35c41b86711a1b284c604e2b944a2d46cb1b8dd3f8b430a9155491378f2", size = 2603767, upload-time = "2025-12-02T18:43:57.188Z" }, + { url = "https://files.pythonhosted.org/packages/d9/ff/6743e351f8e0d5c3f388deb15f0cdbb77d2439eb3fba7ebcdf7878719517/pymongo-4.15.5-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3be2336715924be3a861b5e40c634376fd6bfe6dd1892d391566aa5a88a31307", size = 2725216, upload-time = "2025-12-02T18:43:59.463Z" }, + { url = "https://files.pythonhosted.org/packages/d4/90/fa532b6320b3ba61872110ff6f674bd54b54a592c0c64719e4f46852d0b6/pymongo-4.15.5-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d65df9c015e33f74ea9d1abf474971abca21e347a660384f8227dbdab75a33ca", size = 2704804, upload-time = "2025-12-02T18:44:01.415Z" }, + { url = "https://files.pythonhosted.org/packages/e1/84/1905c269aced043973b9528d94678e62e2eba249e70490c3c32dc70e2501/pymongo-4.15.5-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:83c05bea05e151754357f8e6bbb80d5accead5110dc58f64e283173c71ec9de2", size = 2582274, upload-time = "2025-12-02T18:44:03.427Z" }, + { url = "https://files.pythonhosted.org/packages/7e/af/78c13179961e418396ec6ef53c0f1c855f1e9f1176d10909e8345d65366a/pymongo-4.15.5-cp314-cp314t-win32.whl", hash = "sha256:7c285614a3e8570b03174a25db642e449b0e7f77a6c9e487b73b05c9bf228ee6", size = 1044015, upload-time = "2025-12-02T18:44:05.318Z" }, + { url = "https://files.pythonhosted.org/packages/b0/d5/49012f03418dce976124da339f3a6afbe6959cb0468ca6302596fe272926/pymongo-4.15.5-cp314-cp314t-win_amd64.whl", hash = "sha256:aae7d96f7b2b1a2753349130797543e61e93ee2ace8faa7fbe0565e2eb5d815f", size = 1078481, upload-time = "2025-12-02T18:44:07.215Z" }, + { url = "https://files.pythonhosted.org/packages/5e/fc/f352a070d8ff6f388ce344c5ddb82348a38e0d1c99346fa6bfdef07134fe/pymongo-4.15.5-cp314-cp314t-win_arm64.whl", hash = "sha256:576a7d4b99465d38112c72f7f3d345f9d16aeeff0f923a3b298c13e15ab4f0ad", size = 1051166, upload-time = "2025-12-02T18:44:09.048Z" }, +] + [[package]] name = "pytest" version = "9.0.2" @@ -738,6 +1552,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/70/94/784178ca5dd892a98f113cdd923372024dc04b8d40abe77ca76b5fb90ca6/pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798", size = 510782, upload-time = "2021-02-01T08:07:15.659Z" }, ] +[[package]] +name = "redis" +version = "7.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "async-timeout", marker = "python_full_version < '3.11.3'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/c8/983d5c6579a411d8a99bc5823cc5712768859b5ce2c8afe1a65b37832c81/redis-7.1.0.tar.gz", hash = "sha256:b1cc3cfa5a2cb9c2ab3ba700864fb0ad75617b41f01352ce5779dabf6d5f9c3c", size = 4796669, upload-time = "2025-11-19T15:54:39.961Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/89/f0/8956f8a86b20d7bb9d6ac0187cf4cd54d8065bc9a1a09eb8011d4d326596/redis-7.1.0-py3-none-any.whl", hash = "sha256:23c52b208f92b56103e17c5d06bdc1a6c2c0b3106583985a76a18f83b265de2b", size = 354159, upload-time = "2025-11-19T15:54:38.064Z" }, +] + [[package]] name = "requests" version = "2.32.5" @@ -762,6 +1588,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/04/54/6f679c435d28e0a568d8e8a7c0a93a09010818634c3c3907fc98d8983770/roman_numerals-4.1.0-py3-none-any.whl", hash = "sha256:647ba99caddc2cc1e55a51e4360689115551bf4476d90e8162cf8c345fe233c7", size = 7676, upload-time = "2025-12-17T18:25:33.098Z" }, ] +[[package]] +name = "rsa" +version = "4.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyasn1" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/da/8a/22b7beea3ee0d44b1916c0c1cb0ee3af23b700b6da9f04991899d0c555d4/rsa-4.9.1.tar.gz", hash = "sha256:e7bdbfdb5497da4c07dfd35530e1a902659db6ff241e39d9953cad06ebd0ae75", size = 29034, upload-time = "2025-04-16T09:51:18.218Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/8d/0133e4eb4beed9e425d9a98ed6e081a55d195481b7632472be1af08d2f6b/rsa-4.9.1-py3-none-any.whl", hash = "sha256:68635866661c6836b8d39430f97a996acbd61bfa49406748ea243539fe239762", size = 34696, upload-time = "2025-04-16T09:51:17.142Z" }, +] + [[package]] name = "ruff" version = "0.14.9" @@ -788,13 +1626,25 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/26/09/7a9520315decd2334afa65ed258fed438f070e31f05a2e43dd480a5e5911/ruff-0.14.9-py3-none-win_arm64.whl", hash = "sha256:8e821c366517a074046d92f0e9213ed1c13dbc5b37a7fc20b07f79b64d62cc84", size = 13744730, upload-time = "2025-12-11T21:39:29.659Z" }, ] +[[package]] +name = "s3transfer" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "botocore" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/05/04/74127fc843314818edfa81b5540e26dd537353b123a4edc563109d8f17dd/s3transfer-0.16.0.tar.gz", hash = "sha256:8e990f13268025792229cd52fa10cb7163744bf56e719e0b9cb925ab79abf920", size = 153827, upload-time = "2025-12-01T02:30:59.114Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fc/51/727abb13f44c1fcf6d145979e1535a35794db0f6e450a0cb46aa24732fe2/s3transfer-0.16.0-py3-none-any.whl", hash = "sha256:18e25d66fed509e3868dc1572b3f427ff947dd2c56f844a5bf09481ad3f3b2fe", size = 86830, upload-time = "2025-12-01T02:30:57.729Z" }, +] + [[package]] name = "six" -version = "1.15.0" +version = "1.17.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", size = 33917, upload-time = "2020-05-21T15:25:55.142Z" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced", size = 10963, upload-time = "2020-05-21T15:25:54.177Z" }, + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, ] [[package]] @@ -842,7 +1692,9 @@ name = "sphinx" version = "9.0.4" source = { registry = "https://pypi.org/simple" } resolution-markers = [ - "python_full_version >= '3.11'", + "python_full_version >= '3.14'", + "python_full_version == '3.13.*'", + "python_full_version >= '3.11' and python_full_version < '3.13'", ] dependencies = [ { name = "alabaster", marker = "python_full_version >= '3.11'" }, @@ -922,6 +1774,55 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072, upload-time = "2024-07-29T01:10:08.203Z" }, ] +[[package]] +name = "sqlalchemy" +version = "2.0.45" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/be/f9/5e4491e5ccf42f5d9cfc663741d261b3e6e1683ae7812114e7636409fcc6/sqlalchemy-2.0.45.tar.gz", hash = "sha256:1632a4bda8d2d25703fdad6363058d882541bdaaee0e5e3ddfa0cd3229efce88", size = 9869912, upload-time = "2025-12-09T21:05:16.737Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/70/75b1387d72e2847220441166c5eb4e9846dd753895208c13e6d66523b2d9/sqlalchemy-2.0.45-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c64772786d9eee72d4d3784c28f0a636af5b0a29f3fe26ff11f55efe90c0bd85", size = 2154148, upload-time = "2025-12-10T20:03:21.023Z" }, + { url = "https://files.pythonhosted.org/packages/d8/a4/7805e02323c49cb9d1ae5cd4913b28c97103079765f520043f914fca4cb3/sqlalchemy-2.0.45-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7ae64ebf7657395824a19bca98ab10eb9a3ecb026bf09524014f1bb81cb598d4", size = 3233051, upload-time = "2025-12-09T22:06:04.768Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ec/32ae09139f61bef3de3142e85c47abdee8db9a55af2bb438da54a4549263/sqlalchemy-2.0.45-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f02325709d1b1a1489f23a39b318e175a171497374149eae74d612634b234c0", size = 3232781, upload-time = "2025-12-09T22:09:54.435Z" }, + { url = "https://files.pythonhosted.org/packages/ad/bd/bf7b869b6f5585eac34222e1cf4405f4ba8c3b85dd6b1af5d4ce8bca695f/sqlalchemy-2.0.45-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d2c3684fca8a05f0ac1d9a21c1f4a266983a7ea9180efb80ffeb03861ecd01a0", size = 3182096, upload-time = "2025-12-09T22:06:06.169Z" }, + { url = "https://files.pythonhosted.org/packages/21/6a/c219720a241bb8f35c88815ccc27761f5af7fdef04b987b0e8a2c1a6dcaa/sqlalchemy-2.0.45-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:040f6f0545b3b7da6b9317fc3e922c9a98fc7243b2a1b39f78390fc0942f7826", size = 3205109, upload-time = "2025-12-09T22:09:55.969Z" }, + { url = "https://files.pythonhosted.org/packages/bd/c4/6ccf31b2bc925d5d95fab403ffd50d20d7c82b858cf1a4855664ca054dce/sqlalchemy-2.0.45-cp310-cp310-win32.whl", hash = "sha256:830d434d609fe7bfa47c425c445a8b37929f140a7a44cdaf77f6d34df3a7296a", size = 2114240, upload-time = "2025-12-09T21:29:54.007Z" }, + { url = "https://files.pythonhosted.org/packages/de/29/a27a31fca07316def418db6f7c70ab14010506616a2decef1906050a0587/sqlalchemy-2.0.45-cp310-cp310-win_amd64.whl", hash = "sha256:0209d9753671b0da74da2cfbb9ecf9c02f72a759e4b018b3ab35f244c91842c7", size = 2137615, upload-time = "2025-12-09T21:29:55.85Z" }, + { url = "https://files.pythonhosted.org/packages/a2/1c/769552a9d840065137272ebe86ffbb0bc92b0f1e0a68ee5266a225f8cd7b/sqlalchemy-2.0.45-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:2e90a344c644a4fa871eb01809c32096487928bd2038bf10f3e4515cb688cc56", size = 2153860, upload-time = "2025-12-10T20:03:23.843Z" }, + { url = "https://files.pythonhosted.org/packages/f3/f8/9be54ff620e5b796ca7b44670ef58bc678095d51b0e89d6e3102ea468216/sqlalchemy-2.0.45-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b8c8b41b97fba5f62349aa285654230296829672fc9939cd7f35aab246d1c08b", size = 3309379, upload-time = "2025-12-09T22:06:07.461Z" }, + { url = "https://files.pythonhosted.org/packages/f6/2b/60ce3ee7a5ae172bfcd419ce23259bb874d2cddd44f67c5df3760a1e22f9/sqlalchemy-2.0.45-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:12c694ed6468333a090d2f60950e4250b928f457e4962389553d6ba5fe9951ac", size = 3309948, upload-time = "2025-12-09T22:09:57.643Z" }, + { url = "https://files.pythonhosted.org/packages/a3/42/bac8d393f5db550e4e466d03d16daaafd2bad1f74e48c12673fb499a7fc1/sqlalchemy-2.0.45-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:f7d27a1d977a1cfef38a0e2e1ca86f09c4212666ce34e6ae542f3ed0a33bc606", size = 3261239, upload-time = "2025-12-09T22:06:08.879Z" }, + { url = "https://files.pythonhosted.org/packages/6f/12/43dc70a0528c59842b04ea1c1ed176f072a9b383190eb015384dd102fb19/sqlalchemy-2.0.45-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d62e47f5d8a50099b17e2bfc1b0c7d7ecd8ba6b46b1507b58cc4f05eefc3bb1c", size = 3284065, upload-time = "2025-12-09T22:09:59.454Z" }, + { url = "https://files.pythonhosted.org/packages/cf/9c/563049cf761d9a2ec7bc489f7879e9d94e7b590496bea5bbee9ed7b4cc32/sqlalchemy-2.0.45-cp311-cp311-win32.whl", hash = "sha256:3c5f76216e7b85770d5bb5130ddd11ee89f4d52b11783674a662c7dd57018177", size = 2113480, upload-time = "2025-12-09T21:29:57.03Z" }, + { url = "https://files.pythonhosted.org/packages/bc/fa/09d0a11fe9f15c7fa5c7f0dd26be3d235b0c0cbf2f9544f43bc42efc8a24/sqlalchemy-2.0.45-cp311-cp311-win_amd64.whl", hash = "sha256:a15b98adb7f277316f2c276c090259129ee4afca783495e212048daf846654b2", size = 2138407, upload-time = "2025-12-09T21:29:58.556Z" }, + { url = "https://files.pythonhosted.org/packages/2d/c7/1900b56ce19bff1c26f39a4ce427faec7716c81ac792bfac8b6a9f3dca93/sqlalchemy-2.0.45-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b3ee2aac15169fb0d45822983631466d60b762085bc4535cd39e66bea362df5f", size = 3333760, upload-time = "2025-12-09T22:11:02.66Z" }, + { url = "https://files.pythonhosted.org/packages/0a/93/3be94d96bb442d0d9a60e55a6bb6e0958dd3457751c6f8502e56ef95fed0/sqlalchemy-2.0.45-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba547ac0b361ab4f1608afbc8432db669bd0819b3e12e29fb5fa9529a8bba81d", size = 3348268, upload-time = "2025-12-09T22:13:49.054Z" }, + { url = "https://files.pythonhosted.org/packages/48/4b/f88ded696e61513595e4a9778f9d3f2bf7332cce4eb0c7cedaabddd6687b/sqlalchemy-2.0.45-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:215f0528b914e5c75ef2559f69dca86878a3beeb0c1be7279d77f18e8d180ed4", size = 3278144, upload-time = "2025-12-09T22:11:04.14Z" }, + { url = "https://files.pythonhosted.org/packages/ed/6a/310ecb5657221f3e1bd5288ed83aa554923fb5da48d760a9f7622afeb065/sqlalchemy-2.0.45-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:107029bf4f43d076d4011f1afb74f7c3e2ea029ec82eb23d8527d5e909e97aa6", size = 3313907, upload-time = "2025-12-09T22:13:50.598Z" }, + { url = "https://files.pythonhosted.org/packages/5c/39/69c0b4051079addd57c84a5bfb34920d87456dd4c90cf7ee0df6efafc8ff/sqlalchemy-2.0.45-cp312-cp312-win32.whl", hash = "sha256:0c9f6ada57b58420a2c0277ff853abe40b9e9449f8d7d231763c6bc30f5c4953", size = 2112182, upload-time = "2025-12-09T21:39:30.824Z" }, + { url = "https://files.pythonhosted.org/packages/f7/4e/510db49dd89fc3a6e994bee51848c94c48c4a00dc905e8d0133c251f41a7/sqlalchemy-2.0.45-cp312-cp312-win_amd64.whl", hash = "sha256:8defe5737c6d2179c7997242d6473587c3beb52e557f5ef0187277009f73e5e1", size = 2139200, upload-time = "2025-12-09T21:39:32.321Z" }, + { url = "https://files.pythonhosted.org/packages/6a/c8/7cc5221b47a54edc72a0140a1efa56e0a2730eefa4058d7ed0b4c4357ff8/sqlalchemy-2.0.45-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fe187fc31a54d7fd90352f34e8c008cf3ad5d064d08fedd3de2e8df83eb4a1cf", size = 3277082, upload-time = "2025-12-09T22:11:06.167Z" }, + { url = "https://files.pythonhosted.org/packages/0e/50/80a8d080ac7d3d321e5e5d420c9a522b0aa770ec7013ea91f9a8b7d36e4a/sqlalchemy-2.0.45-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:672c45cae53ba88e0dad74b9027dddd09ef6f441e927786b05bec75d949fbb2e", size = 3293131, upload-time = "2025-12-09T22:13:52.626Z" }, + { url = "https://files.pythonhosted.org/packages/da/4c/13dab31266fc9904f7609a5dc308a2432a066141d65b857760c3bef97e69/sqlalchemy-2.0.45-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:470daea2c1ce73910f08caf10575676a37159a6d16c4da33d0033546bddebc9b", size = 3225389, upload-time = "2025-12-09T22:11:08.093Z" }, + { url = "https://files.pythonhosted.org/packages/74/04/891b5c2e9f83589de202e7abaf24cd4e4fa59e1837d64d528829ad6cc107/sqlalchemy-2.0.45-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9c6378449e0940476577047150fd09e242529b761dc887c9808a9a937fe990c8", size = 3266054, upload-time = "2025-12-09T22:13:54.262Z" }, + { url = "https://files.pythonhosted.org/packages/f1/24/fc59e7f71b0948cdd4cff7a286210e86b0443ef1d18a23b0d83b87e4b1f7/sqlalchemy-2.0.45-cp313-cp313-win32.whl", hash = "sha256:4b6bec67ca45bc166c8729910bd2a87f1c0407ee955df110d78948f5b5827e8a", size = 2110299, upload-time = "2025-12-09T21:39:33.486Z" }, + { url = "https://files.pythonhosted.org/packages/c0/c5/d17113020b2d43073412aeca09b60d2009442420372123b8d49cc253f8b8/sqlalchemy-2.0.45-cp313-cp313-win_amd64.whl", hash = "sha256:afbf47dc4de31fa38fd491f3705cac5307d21d4bb828a4f020ee59af412744ee", size = 2136264, upload-time = "2025-12-09T21:39:36.801Z" }, + { url = "https://files.pythonhosted.org/packages/3d/8d/bb40a5d10e7a5f2195f235c0b2f2c79b0bf6e8f00c0c223130a4fbd2db09/sqlalchemy-2.0.45-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:83d7009f40ce619d483d26ac1b757dfe3167b39921379a8bd1b596cf02dab4a6", size = 3521998, upload-time = "2025-12-09T22:13:28.622Z" }, + { url = "https://files.pythonhosted.org/packages/75/a5/346128b0464886f036c039ea287b7332a410aa2d3fb0bb5d404cb8861635/sqlalchemy-2.0.45-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:d8a2ca754e5415cde2b656c27900b19d50ba076aa05ce66e2207623d3fe41f5a", size = 3473434, upload-time = "2025-12-09T22:13:30.188Z" }, + { url = "https://files.pythonhosted.org/packages/cc/64/4e1913772646b060b025d3fc52ce91a58967fe58957df32b455de5a12b4f/sqlalchemy-2.0.45-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7f46ec744e7f51275582e6a24326e10c49fbdd3fc99103e01376841213028774", size = 3272404, upload-time = "2025-12-09T22:11:09.662Z" }, + { url = "https://files.pythonhosted.org/packages/b3/27/caf606ee924282fe4747ee4fd454b335a72a6e018f97eab5ff7f28199e16/sqlalchemy-2.0.45-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:883c600c345123c033c2f6caca18def08f1f7f4c3ebeb591a63b6fceffc95cce", size = 3277057, upload-time = "2025-12-09T22:13:56.213Z" }, + { url = "https://files.pythonhosted.org/packages/85/d0/3d64218c9724e91f3d1574d12eb7ff8f19f937643815d8daf792046d88ab/sqlalchemy-2.0.45-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:2c0b74aa79e2deade948fe8593654c8ef4228c44ba862bb7c9585c8e0db90f33", size = 3222279, upload-time = "2025-12-09T22:11:11.1Z" }, + { url = "https://files.pythonhosted.org/packages/24/10/dd7688a81c5bc7690c2a3764d55a238c524cd1a5a19487928844cb247695/sqlalchemy-2.0.45-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:8a420169cef179d4c9064365f42d779f1e5895ad26ca0c8b4c0233920973db74", size = 3244508, upload-time = "2025-12-09T22:13:57.932Z" }, + { url = "https://files.pythonhosted.org/packages/aa/41/db75756ca49f777e029968d9c9fee338c7907c563267740c6d310a8e3f60/sqlalchemy-2.0.45-cp314-cp314-win32.whl", hash = "sha256:e50dcb81a5dfe4b7b4a4aa8f338116d127cb209559124f3694c70d6cd072b68f", size = 2113204, upload-time = "2025-12-09T21:39:38.365Z" }, + { url = "https://files.pythonhosted.org/packages/89/a2/0e1590e9adb292b1d576dbcf67ff7df8cf55e56e78d2c927686d01080f4b/sqlalchemy-2.0.45-cp314-cp314-win_amd64.whl", hash = "sha256:4748601c8ea959e37e03d13dcda4a44837afcd1b21338e637f7c935b8da06177", size = 2138785, upload-time = "2025-12-09T21:39:39.503Z" }, + { url = "https://files.pythonhosted.org/packages/42/39/f05f0ed54d451156bbed0e23eb0516bcad7cbb9f18b3bf219c786371b3f0/sqlalchemy-2.0.45-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cd337d3526ec5298f67d6a30bbbe4ed7e5e68862f0bf6dd21d289f8d37b7d60b", size = 3522029, upload-time = "2025-12-09T22:13:32.09Z" }, + { url = "https://files.pythonhosted.org/packages/54/0f/d15398b98b65c2bce288d5ee3f7d0a81f77ab89d9456994d5c7cc8b2a9db/sqlalchemy-2.0.45-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:9a62b446b7d86a3909abbcd1cd3cc550a832f99c2bc37c5b22e1925438b9367b", size = 3475142, upload-time = "2025-12-09T22:13:33.739Z" }, + { url = "https://files.pythonhosted.org/packages/bf/e1/3ccb13c643399d22289c6a9786c1a91e3dcbb68bce4beb44926ac2c557bf/sqlalchemy-2.0.45-py3-none-any.whl", hash = "sha256:5225a288e4c8cc2308dbdd874edad6e7d0fd38eac1e9e5f23503425c8eee20d0", size = 1936672, upload-time = "2025-12-09T21:54:52.608Z" }, +] + [[package]] name = "sqlparse" version = "0.4.1" @@ -980,6 +1881,27 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/77/b8/0135fadc89e73be292b473cb820b4f5a08197779206b33191e801feeae40/tomli-2.3.0-py3-none-any.whl", hash = "sha256:e95b1af3c5b07d9e643909b5abbec77cd9f1217e6d0bca72b0234736b9fb1f1b", size = 14408, upload-time = "2025-10-08T22:01:46.04Z" }, ] +[[package]] +name = "types-awscrt" +version = "0.30.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/30/1f/febd2df22e24f77b759db0dd9ecdd7f07f055e6a4dbbb699c5eb34b617ef/types_awscrt-0.30.0.tar.gz", hash = "sha256:362fd8f5eaebcfcd922cb9fd8274fb375df550319f78031ee3779eac0b9ecc79", size = 17761, upload-time = "2025-12-12T01:55:59.626Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5b/5f/15999051fca2949a67562c3f80fae2dd5d3404a3f97b326b614533843281/types_awscrt-0.30.0-py3-none-any.whl", hash = "sha256:8204126e01a00eaa4a746e7a0076538ca0e4e3f52408adec0ab9b471bb0bb64b", size = 42392, upload-time = "2025-12-12T01:55:58.194Z" }, +] + +[[package]] +name = "types-cffi" +version = "1.17.0.20250915" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "types-setuptools" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2a/98/ea454cea03e5f351323af6a482c65924f3c26c515efd9090dede58f2b4b6/types_cffi-1.17.0.20250915.tar.gz", hash = "sha256:4362e20368f78dabd5c56bca8004752cc890e07a71605d9e0d9e069dbaac8c06", size = 17229, upload-time = "2025-09-15T03:01:25.31Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/aa/ec/092f2b74b49ec4855cdb53050deb9699f7105b8fda6fe034c0781b8687f3/types_cffi-1.17.0.20250915-py3-none-any.whl", hash = "sha256:cef4af1116c83359c11bb4269283c50f0688e9fc1d7f0eeb390f3661546da52c", size = 20112, upload-time = "2025-09-15T03:01:24.187Z" }, +] + [[package]] name = "types-docutils" version = "0.22.3.20251115" @@ -989,6 +1911,50 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9c/01/61ac9eb38f1f978b47443dc6fd2e0a3b0f647c2da741ddad30771f1b2b6f/types_docutils-0.22.3.20251115-py3-none-any.whl", hash = "sha256:c6e53715b65395d00a75a3a8a74e352c669bc63959e65a207dffaa22f4a2ad6e", size = 91951, upload-time = "2025-11-15T02:59:56.413Z" }, ] +[[package]] +name = "types-pyopenssl" +version = "24.1.0.20240722" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography" }, + { name = "types-cffi" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/93/29/47a346550fd2020dac9a7a6d033ea03fccb92fa47c726056618cc889745e/types-pyOpenSSL-24.1.0.20240722.tar.gz", hash = "sha256:47913b4678a01d879f503a12044468221ed8576263c1540dcb0484ca21b08c39", size = 8458, upload-time = "2024-07-22T02:32:22.558Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/05/c868a850b6fbb79c26f5f299b768ee0adc1f9816d3461dcf4287916f655b/types_pyOpenSSL-24.1.0.20240722-py3-none-any.whl", hash = "sha256:6a7a5d2ec042537934cfb4c9d4deb0e16c4c6250b09358df1f083682fe6fda54", size = 7499, upload-time = "2024-07-22T02:32:21.232Z" }, +] + +[[package]] +name = "types-redis" +version = "4.6.0.20241004" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cryptography" }, + { name = "types-pyopenssl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3a/95/c054d3ac940e8bac4ca216470c80c26688a0e79e09f520a942bb27da3386/types-redis-4.6.0.20241004.tar.gz", hash = "sha256:5f17d2b3f9091ab75384153bfa276619ffa1cf6a38da60e10d5e6749cc5b902e", size = 49679, upload-time = "2024-10-04T02:43:59.224Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/55/82/7d25dce10aad92d2226b269bce2f85cfd843b4477cd50245d7d40ecf8f89/types_redis-4.6.0.20241004-py3-none-any.whl", hash = "sha256:ef5da68cb827e5f606c8f9c0b49eeee4c2669d6d97122f301d3a55dc6a63f6ed", size = 58737, upload-time = "2024-10-04T02:43:57.968Z" }, +] + +[[package]] +name = "types-s3transfer" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fe/64/42689150509eb3e6e82b33ee3d89045de1592488842ddf23c56957786d05/types_s3transfer-0.16.0.tar.gz", hash = "sha256:b4636472024c5e2b62278c5b759661efeb52a81851cde5f092f24100b1ecb443", size = 13557, upload-time = "2025-12-08T08:13:09.928Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/27/e88220fe6274eccd3bdf95d9382918716d312f6f6cef6a46332d1ee2feff/types_s3transfer-0.16.0-py3-none-any.whl", hash = "sha256:1c0cd111ecf6e21437cb410f5cddb631bfb2263b77ad973e79b9c6d0cb24e0ef", size = 19247, upload-time = "2025-12-08T08:13:08.426Z" }, +] + +[[package]] +name = "types-setuptools" +version = "80.9.0.20251223" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/00/07/d1b605230730990de20477150191d6dccf6aecc037da94c9960a5d563bc8/types_setuptools-80.9.0.20251223.tar.gz", hash = "sha256:d3411059ae2f5f03985217d86ac6084efea2c9e9cacd5f0869ef950f308169b2", size = 42420, upload-time = "2025-12-23T03:18:26.752Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/78/5c/b8877da94012dbc6643e4eeca22bca9b99b295be05d161f8a403ae9387c0/types_setuptools-80.9.0.20251223-py3-none-any.whl", hash = "sha256:1b36db79d724c2287d83dc052cf887b47c0da6a2fff044378be0b019545f56e6", size = 64318, upload-time = "2025-12-23T03:18:25.868Z" }, +] + [[package]] name = "typing-extensions" version = "4.15.0" @@ -1045,3 +2011,12 @@ sdist = { url = "https://files.pythonhosted.org/packages/89/38/459b727c381504f36 wheels = [ { url = "https://files.pythonhosted.org/packages/59/7c/e39aca596badaf1b78e8f547c807b04dae603a433d3e7a7e04d67f2ef3e5/wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784", size = 30763, upload-time = "2020-06-23T16:10:28.529Z" }, ] + +[[package]] +name = "zipp" +version = "3.23.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166", size = 25547, upload-time = "2025-06-08T17:06:39.4Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2e/54/647ade08bf0db230bfea292f893923872fd20be6ac6f53b2b936ba839d75/zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e", size = 10276, upload-time = "2025-06-08T17:06:38.034Z" }, +] From 4710b8a990c30d61996b2bd2dfc6d92ae146e616 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sat, 3 Jan 2026 18:19:40 +0100 Subject: [PATCH 08/24] Remove types-redis in favor of native redis type hints redis>=7.1.0 has native type hints (py.typed marker), so types-redis is no longer needed. This also resolves the stubtest metaclass issues for PrefixedStrictRedis and PrefixedRedisPipeline. Allowlist reduced from 5 to 3 unfixable items. --- kombu-stubs/transport/redis.pyi | 4 +-- pyproject.toml | 1 - stubtest-allowlist-kombu.txt | 4 --- uv.lock | 49 --------------------------------- 4 files changed, 2 insertions(+), 56 deletions(-) diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi index 3243e71..8b52af2 100644 --- a/kombu-stubs/transport/redis.pyi +++ b/kombu-stubs/transport/redis.pyi @@ -47,13 +47,13 @@ class GlobalKeyPrefixMixin: self, transaction: bool = ..., shard_hint: Any | None = ... ) -> PrefixedRedisPipeline: ... -class PrefixedStrictRedis(GlobalKeyPrefixMixin, redis_module.Redis[Any]): +class PrefixedStrictRedis(GlobalKeyPrefixMixin, redis_module.Redis): # type: ignore[type-arg] global_keyprefix: str def __init__(self, *args: Any, **kwargs: Any) -> None: ... def pubsub(self, **kwargs: Any) -> PrefixedRedisPubSub: ... -class PrefixedRedisPipeline(GlobalKeyPrefixMixin, redis_module.client.Pipeline[Any]): +class PrefixedRedisPipeline(GlobalKeyPrefixMixin, redis_module.client.Pipeline): # type: ignore[type-arg] global_keyprefix: str def __init__(self, *args: Any, **kwargs: Any) -> None: ... diff --git a/pyproject.toml b/pyproject.toml index 8d361f8..2f2e285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,6 @@ dev = [ "redis>=7.1.0", "sqlalchemy>=2.0.45", "pymongo>=4.15.5", - "types-redis>=4.6.0.20241004", "boto3-stubs>=1.42.19", "six>=1.16.0", "pycurl>=7.45.7", diff --git a/stubtest-allowlist-kombu.txt b/stubtest-allowlist-kombu.txt index 0382cb1..ece7654 100644 --- a/stubtest-allowlist-kombu.txt +++ b/stubtest-allowlist-kombu.txt @@ -3,10 +3,6 @@ # librabbitmq is a C extension that can't be installed without the native library kombu.transport.librabbitmq -# types-redis stubs have a Protocol metaclass that differs from runtime -kombu.transport.redis.PrefixedRedisPipeline -kombu.transport.redis.PrefixedStrictRedis - # kombu bug: reprkwargs is in __all__ but not defined at runtime # See: https://github.com/celery/kombu/blob/main/kombu/utils/__init__.py kombu.utils.reprkwargs diff --git a/uv.lock b/uv.lock index 81ac2ce..25d3cd5 100644 --- a/uv.lock +++ b/uv.lock @@ -237,7 +237,6 @@ dev = [ { name = "sphinx", version = "9.0.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" }, { name = "sqlalchemy" }, { name = "types-docutils" }, - { name = "types-redis" }, ] [package.metadata] @@ -268,7 +267,6 @@ dev = [ { name = "sphinx", specifier = ">=8.1.3" }, { name = "sqlalchemy", specifier = ">=2.0.45" }, { name = "types-docutils", specifier = ">=0.22.3.20251115" }, - { name = "types-redis", specifier = ">=4.6.0.20241004" }, ] [[package]] @@ -1890,18 +1888,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5b/5f/15999051fca2949a67562c3f80fae2dd5d3404a3f97b326b614533843281/types_awscrt-0.30.0-py3-none-any.whl", hash = "sha256:8204126e01a00eaa4a746e7a0076538ca0e4e3f52408adec0ab9b471bb0bb64b", size = 42392, upload-time = "2025-12-12T01:55:58.194Z" }, ] -[[package]] -name = "types-cffi" -version = "1.17.0.20250915" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "types-setuptools" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/2a/98/ea454cea03e5f351323af6a482c65924f3c26c515efd9090dede58f2b4b6/types_cffi-1.17.0.20250915.tar.gz", hash = "sha256:4362e20368f78dabd5c56bca8004752cc890e07a71605d9e0d9e069dbaac8c06", size = 17229, upload-time = "2025-09-15T03:01:25.31Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/aa/ec/092f2b74b49ec4855cdb53050deb9699f7105b8fda6fe034c0781b8687f3/types_cffi-1.17.0.20250915-py3-none-any.whl", hash = "sha256:cef4af1116c83359c11bb4269283c50f0688e9fc1d7f0eeb390f3661546da52c", size = 20112, upload-time = "2025-09-15T03:01:24.187Z" }, -] - [[package]] name = "types-docutils" version = "0.22.3.20251115" @@ -1911,32 +1897,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9c/01/61ac9eb38f1f978b47443dc6fd2e0a3b0f647c2da741ddad30771f1b2b6f/types_docutils-0.22.3.20251115-py3-none-any.whl", hash = "sha256:c6e53715b65395d00a75a3a8a74e352c669bc63959e65a207dffaa22f4a2ad6e", size = 91951, upload-time = "2025-11-15T02:59:56.413Z" }, ] -[[package]] -name = "types-pyopenssl" -version = "24.1.0.20240722" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cryptography" }, - { name = "types-cffi" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/93/29/47a346550fd2020dac9a7a6d033ea03fccb92fa47c726056618cc889745e/types-pyOpenSSL-24.1.0.20240722.tar.gz", hash = "sha256:47913b4678a01d879f503a12044468221ed8576263c1540dcb0484ca21b08c39", size = 8458, upload-time = "2024-07-22T02:32:22.558Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/98/05/c868a850b6fbb79c26f5f299b768ee0adc1f9816d3461dcf4287916f655b/types_pyOpenSSL-24.1.0.20240722-py3-none-any.whl", hash = "sha256:6a7a5d2ec042537934cfb4c9d4deb0e16c4c6250b09358df1f083682fe6fda54", size = 7499, upload-time = "2024-07-22T02:32:21.232Z" }, -] - -[[package]] -name = "types-redis" -version = "4.6.0.20241004" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cryptography" }, - { name = "types-pyopenssl" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/3a/95/c054d3ac940e8bac4ca216470c80c26688a0e79e09f520a942bb27da3386/types-redis-4.6.0.20241004.tar.gz", hash = "sha256:5f17d2b3f9091ab75384153bfa276619ffa1cf6a38da60e10d5e6749cc5b902e", size = 49679, upload-time = "2024-10-04T02:43:59.224Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/55/82/7d25dce10aad92d2226b269bce2f85cfd843b4477cd50245d7d40ecf8f89/types_redis-4.6.0.20241004-py3-none-any.whl", hash = "sha256:ef5da68cb827e5f606c8f9c0b49eeee4c2669d6d97122f301d3a55dc6a63f6ed", size = 58737, upload-time = "2024-10-04T02:43:57.968Z" }, -] - [[package]] name = "types-s3transfer" version = "0.16.0" @@ -1946,15 +1906,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/98/27/e88220fe6274eccd3bdf95d9382918716d312f6f6cef6a46332d1ee2feff/types_s3transfer-0.16.0-py3-none-any.whl", hash = "sha256:1c0cd111ecf6e21437cb410f5cddb631bfb2263b77ad973e79b9c6d0cb24e0ef", size = 19247, upload-time = "2025-12-08T08:13:08.426Z" }, ] -[[package]] -name = "types-setuptools" -version = "80.9.0.20251223" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/00/07/d1b605230730990de20477150191d6dccf6aecc037da94c9960a5d563bc8/types_setuptools-80.9.0.20251223.tar.gz", hash = "sha256:d3411059ae2f5f03985217d86ac6084efea2c9e9cacd5f0869ef950f308169b2", size = 42420, upload-time = "2025-12-23T03:18:26.752Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/78/5c/b8877da94012dbc6643e4eeca22bca9b99b295be05d161f8a403ae9387c0/types_setuptools-80.9.0.20251223-py3-none-any.whl", hash = "sha256:1b36db79d724c2287d83dc052cf887b47c0da6a2fff044378be0b019545f56e6", size = 64318, upload-time = "2025-12-23T03:18:25.868Z" }, -] - [[package]] name = "typing-extensions" version = "4.15.0" From ecde52e81d28808d61502dd91acc3c2bd2a3ba51 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sat, 3 Jan 2026 19:05:20 +0100 Subject: [PATCH 09/24] Improve librabbitmq transport stub Write comprehensive stub based on kombu source code since librabbitmq is abandoned (last release 2018, Python 3.6 max) and cannot be installed. The stub now includes Message, Channel, Connection, and Transport classes with proper signatures matching the kombu transport implementation. --- kombu-stubs/transport/librabbitmq.pyi | 75 +++++++++++++++++++++++++-- 1 file changed, 70 insertions(+), 5 deletions(-) diff --git a/kombu-stubs/transport/librabbitmq.pyi b/kombu-stubs/transport/librabbitmq.pyi index f20d448..d1119a0 100644 --- a/kombu-stubs/transport/librabbitmq.pyi +++ b/kombu-stubs/transport/librabbitmq.pyi @@ -1,11 +1,76 @@ +"""librabbitmq transport stubs. + +Note: librabbitmq is abandoned (last release 2018, Python 3.6 max). +These stubs are based on the kombu transport source code. +""" + from typing import Any -from kombu.transport.virtual import Transport as VirtualTransport +from kombu.transport import base + +DEFAULT_PORT: int +DEFAULT_SSL_PORT: int +NO_SSL_ERROR: str +W_VERSION: str + +class Message(base.Message): + def __init__( + self, channel: Channel, props: dict[str, Any], + info: dict[str, Any], body: bytes + ) -> None: ... + +class Channel(base.StdChannel): + Message: type[Message] + + def prepare_message( + self, body: bytes, priority: int | None = ..., + content_type: str | None = ..., content_encoding: str | None = ..., + headers: dict[str, Any] | None = ..., properties: dict[str, Any] | None = ... + ) -> tuple[bytes, dict[str, Any]]: ... + def prepare_queue_arguments( # type: ignore[override] + self, arguments: dict[str, Any] | None, **kwargs: Any + ) -> dict[bytes, Any]: ... + +_Channel = Channel + +class Connection: + Channel: type[_Channel] + Message: type[Message] + channels: dict[int, _Channel] + callbacks: dict[str, Any] + client: Any + + def channel(self) -> _Channel: ... + def drain_events(self, **kwargs: Any) -> None: ... + def close(self) -> None: ... + def fileno(self) -> int: ... + @property + def connected(self) -> bool: ... + @property + def server_properties(self) -> dict[str, Any]: ... + +_Connection = Connection + +class Transport(base.Transport): + Connection: type[_Connection] -class Transport(VirtualTransport): + default_port: int + default_ssl_port: int + connection_errors: tuple[type[BaseException], ...] + channel_errors: tuple[type[BaseException], ...] driver_type: str driver_name: str + implements: Any -class Channel: - connection: Any - def __init__(self, connection: Any, **kwargs: Any) -> None: ... + def __init__(self, client: Any, **kwargs: Any) -> None: ... + def driver_version(self) -> str: ... + def create_channel(self, connection: _Connection) -> _Channel: ... + def drain_events(self, connection: _Connection, **kwargs: Any) -> None: ... + def establish_connection(self) -> _Connection: ... + def close_connection(self, connection: _Connection) -> None: ... + def verify_connection(self, connection: _Connection) -> bool: ... + def register_with_event_loop(self, connection: _Connection, loop: Any) -> None: ... + def get_manager(self, *args: Any, **kwargs: Any) -> Any: ... + def qos_semantics_matches_spec(self, connection: _Connection) -> bool: ... + @property + def default_connection_params(self) -> dict[str, Any]: ... From 643283857ac8979df1f040faab3b96da7ed2ef3d Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sat, 3 Jan 2026 19:09:41 +0100 Subject: [PATCH 10/24] Remove librabbitmq stub (legacy transport) --- kombu-stubs/transport/librabbitmq.pyi | 76 --------------------------- stubtest-allowlist-kombu.txt | 3 +- 2 files changed, 2 insertions(+), 77 deletions(-) delete mode 100644 kombu-stubs/transport/librabbitmq.pyi diff --git a/kombu-stubs/transport/librabbitmq.pyi b/kombu-stubs/transport/librabbitmq.pyi deleted file mode 100644 index d1119a0..0000000 --- a/kombu-stubs/transport/librabbitmq.pyi +++ /dev/null @@ -1,76 +0,0 @@ -"""librabbitmq transport stubs. - -Note: librabbitmq is abandoned (last release 2018, Python 3.6 max). -These stubs are based on the kombu transport source code. -""" - -from typing import Any - -from kombu.transport import base - -DEFAULT_PORT: int -DEFAULT_SSL_PORT: int -NO_SSL_ERROR: str -W_VERSION: str - -class Message(base.Message): - def __init__( - self, channel: Channel, props: dict[str, Any], - info: dict[str, Any], body: bytes - ) -> None: ... - -class Channel(base.StdChannel): - Message: type[Message] - - def prepare_message( - self, body: bytes, priority: int | None = ..., - content_type: str | None = ..., content_encoding: str | None = ..., - headers: dict[str, Any] | None = ..., properties: dict[str, Any] | None = ... - ) -> tuple[bytes, dict[str, Any]]: ... - def prepare_queue_arguments( # type: ignore[override] - self, arguments: dict[str, Any] | None, **kwargs: Any - ) -> dict[bytes, Any]: ... - -_Channel = Channel - -class Connection: - Channel: type[_Channel] - Message: type[Message] - channels: dict[int, _Channel] - callbacks: dict[str, Any] - client: Any - - def channel(self) -> _Channel: ... - def drain_events(self, **kwargs: Any) -> None: ... - def close(self) -> None: ... - def fileno(self) -> int: ... - @property - def connected(self) -> bool: ... - @property - def server_properties(self) -> dict[str, Any]: ... - -_Connection = Connection - -class Transport(base.Transport): - Connection: type[_Connection] - - default_port: int - default_ssl_port: int - connection_errors: tuple[type[BaseException], ...] - channel_errors: tuple[type[BaseException], ...] - driver_type: str - driver_name: str - implements: Any - - def __init__(self, client: Any, **kwargs: Any) -> None: ... - def driver_version(self) -> str: ... - def create_channel(self, connection: _Connection) -> _Channel: ... - def drain_events(self, connection: _Connection, **kwargs: Any) -> None: ... - def establish_connection(self) -> _Connection: ... - def close_connection(self, connection: _Connection) -> None: ... - def verify_connection(self, connection: _Connection) -> bool: ... - def register_with_event_loop(self, connection: _Connection, loop: Any) -> None: ... - def get_manager(self, *args: Any, **kwargs: Any) -> Any: ... - def qos_semantics_matches_spec(self, connection: _Connection) -> bool: ... - @property - def default_connection_params(self) -> dict[str, Any]: ... diff --git a/stubtest-allowlist-kombu.txt b/stubtest-allowlist-kombu.txt index ece7654..ef344c4 100644 --- a/stubtest-allowlist-kombu.txt +++ b/stubtest-allowlist-kombu.txt @@ -1,6 +1,7 @@ # Unfixable stubtest errors for kombu -# librabbitmq is a C extension that can't be installed without the native library +# librabbitmq is a legacy C extension (abandoned 2018, Python 3.6 max) +# No stub provided - use pyamqp transport instead kombu.transport.librabbitmq # kombu bug: reprkwargs is in __all__ but not defined at runtime From 316199a3de54156c917c50fb5d132ef5ae3f576a Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sat, 3 Jan 2026 19:13:49 +0100 Subject: [PATCH 11/24] Clean up stubs: remove unused imports, format with ruff --- amqp-stubs/__init__.pyi | 11 ++- amqp-stubs/exceptions.pyi | 3 - amqp-stubs/method_framing.pyi | 1 - kombu-stubs/abstract.pyi | 1 - kombu-stubs/asynchronous/aws/__init__.pyi | 2 +- kombu-stubs/asynchronous/aws/connection.pyi | 50 ++++++++--- kombu-stubs/asynchronous/aws/ext.pyi | 2 - .../asynchronous/aws/sqs/connection.pyi | 86 +++++++++++-------- kombu-stubs/asynchronous/aws/sqs/message.pyi | 1 - kombu-stubs/asynchronous/aws/sqs/queue.pyi | 47 +++++----- kombu-stubs/asynchronous/http/__init__.pyi | 2 - kombu-stubs/asynchronous/hub.pyi | 8 +- kombu-stubs/asynchronous/timer.pyi | 1 - kombu-stubs/clocks.pyi | 2 - kombu-stubs/common.pyi | 9 +- kombu-stubs/compression.pyi | 1 - kombu-stubs/connection.pyi | 40 +++++++-- kombu-stubs/exceptions.pyi | 2 + kombu-stubs/mixins.pyi | 4 +- kombu-stubs/pidbox.pyi | 20 ++--- kombu-stubs/pools.pyi | 4 +- kombu-stubs/transport/SQS.pyi | 18 ++-- kombu-stubs/transport/azureservicebus.pyi | 10 +-- kombu-stubs/transport/azurestoragequeues.pyi | 8 +- kombu-stubs/transport/base.pyi | 8 +- kombu-stubs/transport/confluentkafka.pyi | 2 +- kombu-stubs/transport/gcpubsub.pyi | 3 +- kombu-stubs/transport/mongodb.pyi | 3 +- kombu-stubs/transport/redis.pyi | 8 +- kombu-stubs/transport/virtual/base.pyi | 36 +++----- kombu-stubs/utils/__init__.pyi | 4 +- kombu-stubs/utils/compat.pyi | 4 +- kombu-stubs/utils/eventio.pyi | 1 - kombu-stubs/utils/functional.pyi | 4 +- kombu-stubs/utils/imports.pyi | 4 +- kombu-stubs/utils/objects.pyi | 13 ++- kombu-stubs/utils/scheduling.pyi | 11 +-- 37 files changed, 223 insertions(+), 211 deletions(-) diff --git a/amqp-stubs/__init__.pyi b/amqp-stubs/__init__.pyi index 72b8676..510f5d6 100644 --- a/amqp-stubs/__init__.pyi +++ b/amqp-stubs/__init__.pyi @@ -90,8 +90,15 @@ class promise: ignore_result: bool = ..., ) -> None: ... def __call__(self, *args: Any, **kwargs: Any) -> Any: ... - def then(self, callback: Callable[..., Any], on_error: Callable[..., Any] | None = ...) -> promise: ... - def throw(self, exc: BaseException | None = ..., tb: Any | None = ..., propagate: bool = ...) -> None: ... + def then( + self, callback: Callable[..., Any], on_error: Callable[..., Any] | None = ... + ) -> promise: ... + def throw( + self, + exc: BaseException | None = ..., + tb: Any | None = ..., + propagate: bool = ..., + ) -> None: ... def throw1(self, exc: BaseException | None = ...) -> None: ... def cancel(self) -> None: ... @property diff --git a/amqp-stubs/exceptions.pyi b/amqp-stubs/exceptions.pyi index 13f74dc..2349f25 100644 --- a/amqp-stubs/exceptions.pyi +++ b/amqp-stubs/exceptions.pyi @@ -1,5 +1,3 @@ -from typing import Any - __all__ = ( "AMQPError", "ConnectionError", @@ -110,7 +108,6 @@ class InternalError(IrrecoverableConnectionError): code: int class MessageNacked(Exception): ... - class AMQPDeprecationWarning(UserWarning): ... def error_for_code( diff --git a/amqp-stubs/method_framing.pyi b/amqp-stubs/method_framing.pyi index e10c4fe..3725c5a 100644 --- a/amqp-stubs/method_framing.pyi +++ b/amqp-stubs/method_framing.pyi @@ -1,5 +1,4 @@ from collections.abc import Callable -from io import BytesIO as Buffer from typing import Any from amqp.basic_message import Message as Message diff --git a/kombu-stubs/abstract.pyi b/kombu-stubs/abstract.pyi index e23d3da..65b0bbe 100644 --- a/kombu-stubs/abstract.pyi +++ b/kombu-stubs/abstract.pyi @@ -17,7 +17,6 @@ class Object: class MaybeChannelBound(Object): @property def can_cache_declaration(self) -> bool: ... - def __call__( self: _MaybeChannelBoundT, channel: StdChannel | Connection ) -> _MaybeChannelBoundT: ... diff --git a/kombu-stubs/asynchronous/aws/__init__.pyi b/kombu-stubs/asynchronous/aws/__init__.pyi index 944d938..ae3a55c 100644 --- a/kombu-stubs/asynchronous/aws/__init__.pyi +++ b/kombu-stubs/asynchronous/aws/__init__.pyi @@ -5,5 +5,5 @@ from kombu.asynchronous.aws.sqs.connection import AsyncSQSConnection def connect_sqs( aws_access_key_id: str | None = ..., aws_secret_access_key: str | None = ..., - **kwargs: Any + **kwargs: Any, ) -> AsyncSQSConnection: ... diff --git a/kombu-stubs/asynchronous/aws/connection.pyi b/kombu-stubs/asynchronous/aws/connection.pyi index 91800b4..f8143ff 100644 --- a/kombu-stubs/asynchronous/aws/connection.pyi +++ b/kombu-stubs/asynchronous/aws/connection.pyi @@ -76,25 +76,49 @@ class AsyncAWSQueryConnection(AsyncConnection): STATUS_CODES_TIMEOUT: tuple[int, ...] def __init__( - self, sqs_connection: Any, http_client: Any = ..., - http_client_params: dict[str, Any] | None = ..., **kwargs: Any + self, + sqs_connection: Any, + http_client: Any = ..., + http_client_params: dict[str, Any] | None = ..., + **kwargs: Any, ) -> None: ... def make_request( - self, operation: str, params_: dict[str, Any], path: str, verb: str, - callback: Any = ..., protocol_params: dict[str, Any] | None = ... + self, + operation: str, + params_: dict[str, Any], + path: str, + verb: str, + callback: Any = ..., + protocol_params: dict[str, Any] | None = ..., ) -> promise: ... def get_list( - self, operation: str, params: dict[str, Any], markers: Any, - path: str = ..., parent: Any = ..., verb: str = ..., - callback: Any = ..., protocol_params: dict[str, Any] | None = ... + self, + operation: str, + params: dict[str, Any], + markers: Any, + path: str = ..., + parent: Any = ..., + verb: str = ..., + callback: Any = ..., + protocol_params: dict[str, Any] | None = ..., ) -> promise: ... def get_object( - self, operation: str, params: dict[str, Any], path: str = ..., - parent: Any = ..., verb: str = ..., callback: Any = ..., - protocol_params: dict[str, Any] | None = ... + self, + operation: str, + params: dict[str, Any], + path: str = ..., + parent: Any = ..., + verb: str = ..., + callback: Any = ..., + protocol_params: dict[str, Any] | None = ..., ) -> promise: ... def get_status( - self, operation: str, params: dict[str, Any], path: str = ..., - parent: Any = ..., verb: str = ..., callback: Any = ..., - protocol_params: dict[str, Any] | None = ... + self, + operation: str, + params: dict[str, Any], + path: str = ..., + parent: Any = ..., + verb: str = ..., + callback: Any = ..., + protocol_params: dict[str, Any] | None = ..., ) -> promise: ... diff --git a/kombu-stubs/asynchronous/aws/ext.pyi b/kombu-stubs/asynchronous/aws/ext.pyi index 2b5c8ee..f22d4e5 100644 --- a/kombu-stubs/asynchronous/aws/ext.pyi +++ b/kombu-stubs/asynchronous/aws/ext.pyi @@ -1,5 +1,3 @@ -from typing import Any - import boto3 as boto3 from botocore import exceptions as exceptions from botocore.awsrequest import AWSRequest as AWSRequest diff --git a/kombu-stubs/asynchronous/aws/sqs/connection.pyi b/kombu-stubs/asynchronous/aws/sqs/connection.pyi index 2a4bff5..430f7a1 100644 --- a/kombu-stubs/asynchronous/aws/sqs/connection.pyi +++ b/kombu-stubs/asynchronous/aws/sqs/connection.pyi @@ -3,7 +3,6 @@ from typing import Any from vine import promise from kombu.asynchronous.aws.connection import AsyncAWSQueryConnection -from kombu.asynchronous.aws.sqs.message import AsyncMessage from kombu.asynchronous.aws.sqs.queue import AsyncQueue __all__ = ("AsyncSQSConnection",) @@ -13,80 +12,91 @@ class AsyncSQSConnection(AsyncAWSQueryConnection): message_attribute_names: list[str] def __init__( - self, sqs_connection: Any, debug: int = ..., + self, + sqs_connection: Any, + debug: int = ..., region: str | None = ..., message_system_attribute_names: list[str] | None = ..., message_attribute_names: list[str] | None = ..., - **kwargs: Any + **kwargs: Any, ) -> None: ... def make_request( - self, operation_name: str, params: dict[str, Any], queue_url: str, - verb: str, callback: Any = ..., - protocol_params: dict[str, Any] | None = ... + self, + operation_name: str, + params: dict[str, Any], + queue_url: str, + verb: str, + callback: Any = ..., + protocol_params: dict[str, Any] | None = ..., ) -> promise: ... def create_queue( - self, queue_name: str, visibility_timeout: int | None = ..., - callback: Any = ... + self, queue_name: str, visibility_timeout: int | None = ..., callback: Any = ... ) -> promise: ... def delete_queue( - self, queue: AsyncQueue, force_deletion: bool = ..., - callback: Any = ... + self, queue: AsyncQueue, force_deletion: bool = ..., callback: Any = ... ) -> promise: ... def get_queue_url(self, queue: str) -> str: ... def get_queue_attributes( self, queue: AsyncQueue, attribute: str = ..., callback: Any = ... ) -> promise: ... def set_queue_attribute( - self, queue: AsyncQueue, attribute: str, value: Any, - callback: Any = ... + self, queue: AsyncQueue, attribute: str, value: Any, callback: Any = ... ) -> promise: ... def receive_message( - self, queue: AsyncQueue, queue_url: str, number_messages: int = ..., - visibility_timeout: int | None = ..., attributes: list[str] | None = ..., - wait_time_seconds: int | None = ..., callback: Any = ... + self, + queue: AsyncQueue, + queue_url: str, + number_messages: int = ..., + visibility_timeout: int | None = ..., + attributes: list[str] | None = ..., + wait_time_seconds: int | None = ..., + callback: Any = ..., ) -> promise: ... def delete_message( - self, queue: str | AsyncQueue, receipt_handle: str, - callback: Any = ... + self, queue: str | AsyncQueue, receipt_handle: str, callback: Any = ... ) -> promise: ... def delete_message_batch( self, queue: AsyncQueue, messages: list[Any], callback: Any = ... ) -> promise: ... def delete_message_from_handle( - self, queue: str | AsyncQueue, receipt_handle: str, - callback: Any = ... + self, queue: str | AsyncQueue, receipt_handle: str, callback: Any = ... ) -> promise: ... def send_message( - self, queue: AsyncQueue, message_content: str, - delay_seconds: int | None = ..., callback: Any = ... + self, + queue: AsyncQueue, + message_content: str, + delay_seconds: int | None = ..., + callback: Any = ..., ) -> promise: ... def send_message_batch( - self, queue: AsyncQueue, messages: list[tuple[str, str, int]], - callback: Any = ... + self, + queue: AsyncQueue, + messages: list[tuple[str, str, int]], + callback: Any = ..., ) -> promise: ... def change_message_visibility( - self, queue: AsyncQueue, receipt_handle: str, - visibility_timeout: int, callback: Any = ... + self, + queue: AsyncQueue, + receipt_handle: str, + visibility_timeout: int, + callback: Any = ..., ) -> promise: ... def change_message_visibility_batch( - self, queue: AsyncQueue, messages: list[tuple[Any, int]], - callback: Any = ... - ) -> promise: ... - def get_all_queues( - self, prefix: str = ..., callback: Any = ... - ) -> promise: ... - def get_queue( - self, queue_name: str, callback: Any = ... - ) -> promise: ... - def lookup( - self, queue_name: str, callback: Any = ... + self, queue: AsyncQueue, messages: list[tuple[Any, int]], callback: Any = ... ) -> promise: ... + def get_all_queues(self, prefix: str = ..., callback: Any = ...) -> promise: ... + def get_queue(self, queue_name: str, callback: Any = ...) -> promise: ... + def lookup(self, queue_name: str, callback: Any = ...) -> promise: ... def get_dead_letter_source_queues( self, queue: AsyncQueue, callback: Any = ... ) -> promise: ... def add_permission( - self, queue: AsyncQueue, label: str, aws_account_id: str, - action_name: str, callback: Any = ... + self, + queue: AsyncQueue, + label: str, + aws_account_id: str, + action_name: str, + callback: Any = ..., ) -> promise: ... def remove_permission( self, queue: AsyncQueue, label: str, callback: Any = ... diff --git a/kombu-stubs/asynchronous/aws/sqs/message.pyi b/kombu-stubs/asynchronous/aws/sqs/message.pyi index 75b616a..6cc13ac 100644 --- a/kombu-stubs/asynchronous/aws/sqs/message.pyi +++ b/kombu-stubs/asynchronous/aws/sqs/message.pyi @@ -3,7 +3,6 @@ from typing import Any from kombu.message import Message class BaseAsyncMessage(Message): ... - class AsyncRawMessage(BaseAsyncMessage): ... class AsyncMessage(BaseAsyncMessage): diff --git a/kombu-stubs/asynchronous/aws/sqs/queue.pyi b/kombu-stubs/asynchronous/aws/sqs/queue.pyi index 3e497f4..45d321e 100644 --- a/kombu-stubs/asynchronous/aws/sqs/queue.pyi +++ b/kombu-stubs/asynchronous/aws/sqs/queue.pyi @@ -13,8 +13,10 @@ class AsyncQueue: visibility_timeout: int | None def __init__( - self, connection: Any = ..., url: str | None = ..., - message_class: type[AsyncMessage] = ... + self, + connection: Any = ..., + url: str | None = ..., + message_class: type[AsyncMessage] = ..., ) -> None: ... def _NA(self, *args: Any, **kwargs: Any) -> NoReturn: ... def clear(self, *args: Any, **kwargs: Any) -> NoReturn: ... @@ -28,45 +30,38 @@ class AsyncQueue: def save_to_file(self, *args: Any, **kwargs: Any) -> NoReturn: ... def save_to_filename(self, *args: Any, **kwargs: Any) -> NoReturn: ... def save_to_s3(self, *args: Any, **kwargs: Any) -> NoReturn: ... - def get_attributes( - self, attributes: str = ..., callback: Any = ... - ) -> promise: ... + def get_attributes(self, attributes: str = ..., callback: Any = ...) -> promise: ... def set_attribute( self, attribute: str, value: Any, callback: Any = ... ) -> promise: ... def get_timeout(self, callback: Any = ...) -> promise: ... def _coerce_field_value(self, key: str, type: type, response: Any) -> Any: ... - def set_timeout( - self, visibility_timeout: int, callback: Any = ... - ) -> promise: ... + def set_timeout(self, visibility_timeout: int, callback: Any = ...) -> promise: ... def _on_timeout_set(self, visibility_timeout: int | None) -> int | None: ... def add_permission( - self, label: str, aws_account_id: str, action_name: str, - callback: Any = ... - ) -> promise: ... - def remove_permission( - self, label: str, callback: Any = ... + self, label: str, aws_account_id: str, action_name: str, callback: Any = ... ) -> promise: ... + def remove_permission(self, label: str, callback: Any = ...) -> promise: ... def read( - self, visibility_timeout: int | None = ..., - wait_time_seconds: int | None = ..., callback: Any = ... + self, + visibility_timeout: int | None = ..., + wait_time_seconds: int | None = ..., + callback: Any = ..., ) -> promise: ... def write( - self, message: Any, delay_seconds: int | None = ..., - callback: Any = ... - ) -> promise: ... - def write_batch( - self, messages: list[Any], callback: Any = ... + self, message: Any, delay_seconds: int | None = ..., callback: Any = ... ) -> promise: ... + def write_batch(self, messages: list[Any], callback: Any = ...) -> promise: ... def _on_message_sent(self, orig_message: Any, new_message: Any) -> Any: ... def get_messages( - self, num_messages: int = ..., visibility_timeout: int | None = ..., - attributes: Any = ..., wait_time_seconds: int | None = ..., - callback: Any = ... - ) -> promise: ... - def delete_message( - self, message: Any, callback: Any = ... + self, + num_messages: int = ..., + visibility_timeout: int | None = ..., + attributes: Any = ..., + wait_time_seconds: int | None = ..., + callback: Any = ..., ) -> promise: ... + def delete_message(self, message: Any, callback: Any = ...) -> promise: ... def delete_message_batch( self, messages: list[Any], callback: Any = ... ) -> promise: ... diff --git a/kombu-stubs/asynchronous/http/__init__.pyi b/kombu-stubs/asynchronous/http/__init__.pyi index e5bb49f..f3d26d1 100644 --- a/kombu-stubs/asynchronous/http/__init__.pyi +++ b/kombu-stubs/asynchronous/http/__init__.pyi @@ -1,5 +1,3 @@ -from typing import Any - from kombu.asynchronous.http.base import Headers as Headers from kombu.asynchronous.http.base import Request as Request from kombu.asynchronous.http.base import Response as Response diff --git a/kombu-stubs/asynchronous/hub.pyi b/kombu-stubs/asynchronous/hub.pyi index 0848c63..0fa7119 100644 --- a/kombu-stubs/asynchronous/hub.pyi +++ b/kombu-stubs/asynchronous/hub.pyi @@ -45,9 +45,7 @@ class Hub: def call_later( self, delay: float, callback: Callable[..., Any], *args: Any ) -> Any: ... - def call_at( - self, when: float, callback: Callable[..., Any], *args: Any - ) -> Any: ... + def call_at(self, when: float, callback: Callable[..., Any], *args: Any) -> Any: ... def call_repeatedly( self, delay: float, callback: Callable[..., Any], *args: Any ) -> Any: ... @@ -74,7 +72,9 @@ class Hub: WRITE: int = ..., ERR: int = ..., ) -> Generator[None, None, None]: ... - def on_callback_error(self, callback: Callable[..., Any], exc: BaseException) -> None: ... + def on_callback_error( + self, callback: Callable[..., Any], exc: BaseException + ) -> None: ... def repr_active(self) -> str: ... def repr_events(self, events: list[tuple[int, int]]) -> str: ... @property diff --git a/kombu-stubs/asynchronous/timer.pyi b/kombu-stubs/asynchronous/timer.pyi index ebf7da1..8ddd407 100644 --- a/kombu-stubs/asynchronous/timer.pyi +++ b/kombu-stubs/asynchronous/timer.pyi @@ -1,6 +1,5 @@ from collections.abc import Callable, Iterator from datetime import datetime -from time import monotonic from types import TracebackType from typing import Any, NamedTuple from zoneinfo import ZoneInfo diff --git a/kombu-stubs/clocks.pyi b/kombu-stubs/clocks.pyi index f207a0f..a71f615 100644 --- a/kombu-stubs/clocks.pyi +++ b/kombu-stubs/clocks.pyi @@ -1,4 +1,3 @@ -from operator import itemgetter from threading import Lock from typing import Any @@ -16,7 +15,6 @@ class timetuple(tuple[int | None, float, str, Any]): def __gt__(self, other: tuple[Any, ...]) -> bool: ... def __le__(self, other: tuple[Any, ...]) -> bool: ... def __ge__(self, other: tuple[Any, ...]) -> bool: ... - @property def clock(self) -> int | None: ... @property diff --git a/kombu-stubs/common.pyi b/kombu-stubs/common.pyi index d7488a9..86dc651 100644 --- a/kombu-stubs/common.pyi +++ b/kombu-stubs/common.pyi @@ -50,7 +50,10 @@ class QoS: def set(self, pcount: int) -> int: ... def maybe_declare( - entity: Any, channel: StdChannel | None = ..., retry: bool = ..., **retry_policy: Any + entity: Any, + channel: StdChannel | None = ..., + retry: bool = ..., + **retry_policy: Any, ) -> bool: ... def uuid(_uuid: Callable[[], UUID] = ...) -> str: ... def itermessages( @@ -103,7 +106,9 @@ def ignore_errors( conn: Connection, fun: Callable[..., Any] | None = ..., *args: Any, **kwargs: Any ) -> Any: ... def revive_connection( - connection: Connection, channel: StdChannel, on_revive: Callable[..., Any] | None = ... + connection: Connection, + channel: StdChannel, + on_revive: Callable[..., Any] | None = ..., ) -> StdChannel: ... def declaration_cached(entity: Any, channel: StdChannel) -> bool: ... def oid_from(instance: Any, threads: bool = ...) -> str: ... diff --git a/kombu-stubs/compression.pyi b/kombu-stubs/compression.pyi index fddeed0..08788fe 100644 --- a/kombu-stubs/compression.pyi +++ b/kombu-stubs/compression.pyi @@ -1,5 +1,4 @@ from collections.abc import Callable, Iterable -from typing import Any __all__ = ( "register", diff --git a/kombu-stubs/connection.pyi b/kombu-stubs/connection.pyi index 38b3870..ae9097d 100644 --- a/kombu-stubs/connection.pyi +++ b/kombu-stubs/connection.pyi @@ -18,7 +18,12 @@ class Resource: limit: int | None preload: int | None - def __init__(self, limit: int | None = ..., preload: int | None = ..., close_after_fork: bool | None = ...) -> None: ... + def __init__( + self, + limit: int | None = ..., + preload: int | None = ..., + close_after_fork: bool | None = ..., + ) -> None: ... def setup(self) -> None: ... def acquire(self, block: bool = ..., timeout: float | None = ...) -> Any: ... def prepare(self, resource: Any) -> Any: ... @@ -28,7 +33,13 @@ class Resource: def collect_resource(self, resource: Any) -> None: ... def replace(self, resource: Any) -> None: ... def force_close_all(self, close_pool: bool = ...) -> None: ... - def resize(self, limit: int, force: bool = ..., ignore_errors: bool = ..., reset: bool = ...) -> None: ... + def resize( + self, + limit: int, + force: bool = ..., + ignore_errors: bool = ..., + reset: bool = ..., + ) -> None: ... class Connection: port: int | None @@ -105,7 +116,10 @@ class Connection: timeout: int | None = ..., ) -> Self: ... def autoretry( - self, fun: Callable[..., _T], channel: StdChannel | None = ..., **ensure_options: Any + self, + fun: Callable[..., _T], + channel: StdChannel | None = ..., + **ensure_options: Any, ) -> _T: ... def ensure( self, @@ -136,7 +150,9 @@ class Connection: ) -> str: ... def Pool(self, limit: int | None = ..., **kwargs: Any) -> ConnectionPool: ... def ChannelPool(self, limit: int | None = ..., **kwargs: Any) -> ChannelPool: ... - def Producer(self, channel: StdChannel | None = ..., *args: Any, **kwargs: Any) -> Producer: ... + def Producer( + self, channel: StdChannel | None = ..., *args: Any, **kwargs: Any + ) -> Producer: ... def Consumer( self, queues: Any | None = ..., @@ -205,19 +221,27 @@ class ConnectionPool(Resource): LimitExceeded: type[Exception] connection: Connection - def __init__(self, connection: Connection, limit: int | None = ..., **kwargs: Any) -> None: ... + def __init__( + self, connection: Connection, limit: int | None = ..., **kwargs: Any + ) -> None: ... def new(self) -> Connection: ... def prepare(self, resource: Connection) -> Connection: ... def release_resource(self, resource: Connection) -> None: ... def close_resource(self, resource: Connection) -> None: ... - def collect_resource(self, resource: Connection, socket_timeout: float | None = ...) -> None: ... - def acquire_channel(self, block: bool = ...) -> Generator[StdChannel, None, None]: ... + def collect_resource( + self, resource: Connection, socket_timeout: float | None = ... + ) -> None: ... + def acquire_channel( + self, block: bool = ... + ) -> Generator[StdChannel, None, None]: ... class ChannelPool(Resource): LimitExceeded: type[Exception] connection: Connection - def __init__(self, connection: Connection, limit: int | None = ..., **kwargs: Any) -> None: ... + def __init__( + self, connection: Connection, limit: int | None = ..., **kwargs: Any + ) -> None: ... def new(self) -> StdChannel: ... def prepare(self, channel: StdChannel) -> StdChannel: ... def release_resource(self, resource: StdChannel) -> None: ... diff --git a/kombu-stubs/exceptions.pyi b/kombu-stubs/exceptions.pyi index 14f2581..9fcb11d 100644 --- a/kombu-stubs/exceptions.pyi +++ b/kombu-stubs/exceptions.pyi @@ -40,8 +40,10 @@ class ChannelLimitExceeded(LimitExceeded): ... class VersionMismatch(KombuError): ... class SerializerNotInstalled(KombuError): ... class ContentDisallowed(SerializerNotInstalled): ... + class ResourceError(KombuError): code: int + class InconsistencyError(ConnectionError): ... class HttpError(Exception): diff --git a/kombu-stubs/mixins.pyi b/kombu-stubs/mixins.pyi index 49d491f..f6fe679 100644 --- a/kombu-stubs/mixins.pyi +++ b/kombu-stubs/mixins.pyi @@ -44,7 +44,9 @@ class ConsumerMixin: def maybe_conn_error(self, fun: Callable[..., Any] | None) -> Any: ... def create_connection(self) -> Connection: ... def establish_connection(self) -> Connection: ... - def Consumer(self) -> tuple[Connection, StdChannel, Sequence[MessagingConsumer]]: ... + def Consumer( + self, + ) -> tuple[Connection, StdChannel, Sequence[MessagingConsumer]]: ... @property def restart_limit(self) -> TokenBucket: ... @property diff --git a/kombu-stubs/pidbox.pyi b/kombu-stubs/pidbox.pyi index 9af4658..2fcd4af 100644 --- a/kombu-stubs/pidbox.pyi +++ b/kombu-stubs/pidbox.pyi @@ -38,7 +38,9 @@ class Node: ) -> _ConsumerType: ... def handler(self, fun: Callable[..., Any]) -> Callable[..., Any]: ... def listen( - self, channel: StdChannel | None = ..., callback: Callable[..., Any] | None = ... + self, + channel: StdChannel | None = ..., + callback: Callable[..., Any] | None = ..., ) -> _ConsumerType: ... def dispatch( self, @@ -52,15 +54,9 @@ class Node: self, body: Any, message: Message | None = ... ) -> None: ... def handle_message(self, body: Any, message: Message | None = ...) -> None: ... - def handle( - self, method: str, arguments: dict[str, Any] | None = ... - ) -> Any: ... - def handle_call( - self, method: str, arguments: dict[str, Any] | None - ) -> Any: ... - def handle_cast( - self, method: str, arguments: dict[str, Any] | None - ) -> Any: ... + def handle(self, method: str, arguments: dict[str, Any] | None = ...) -> Any: ... + def handle_call(self, method: str, arguments: dict[str, Any] | None) -> Any: ... + def handle_cast(self, method: str, arguments: dict[str, Any] | None) -> Any: ... def reply( self, data: Any, @@ -135,9 +131,7 @@ class Mailbox: command: str, kwargs: dict[str, Any] | None = ..., ) -> None: ... - def abcast( - self, command: str, kwargs: dict[str, Any] | None = ... - ) -> None: ... + def abcast(self, command: str, kwargs: dict[str, Any] | None = ...) -> None: ... def multi_call( self, command: str, diff --git a/kombu-stubs/pools.pyi b/kombu-stubs/pools.pyi index 7577916..b1723af 100644 --- a/kombu-stubs/pools.pyi +++ b/kombu-stubs/pools.pyi @@ -46,7 +46,9 @@ class ProducerPool: def setup(self) -> None: ... def create_producer(self) -> _ProducerType: ... def new(self) -> _ProducerType: ... - def acquire(self, block: bool = ..., timeout: float | None = ...) -> _ProducerType: ... + def acquire( + self, block: bool = ..., timeout: float | None = ... + ) -> _ProducerType: ... def prepare(self, p: _ProducerType) -> _ProducerType: ... def release(self, resource: _ProducerType) -> None: ... def close_resource(self, resource: _ProducerType) -> None: ... diff --git a/kombu-stubs/transport/SQS.pyi b/kombu-stubs/transport/SQS.pyi index f381d83..5c8aab0 100644 --- a/kombu-stubs/transport/SQS.pyi +++ b/kombu-stubs/transport/SQS.pyi @@ -21,8 +21,11 @@ class DoesNotExistQueueException(Exception): ... class QoS(VirtualQoS): def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... def apply_backoff_policy( - self, routing_key: str, delivery_tag: int, - backoff_policy: dict[int, int], backoff_tasks: list[str] + self, + routing_key: str, + delivery_tag: int, + backoff_policy: dict[int, int], + backoff_tasks: list[str], ) -> None: ... def extract_task_name_and_number_of_retries( self, delivery_tag: int @@ -52,15 +55,16 @@ class Channel(VirtualChannel): def drain_events( self, timeout: float | None = ..., callback: Any | None = ..., **kwargs: Any ) -> None: ... - def entity_name( - self, name: str, table: dict[int, int] = ... - ) -> str: ... + def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... def canonical_queue_name(self, queue_name: str) -> str: ... def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... def close(self) -> None: ... def new_sqs_client( - self, region: str, access_key_id: str, - secret_access_key: str, session_token: str | None = ... + self, + region: str, + access_key_id: str, + secret_access_key: str, + session_token: str | None = ..., ) -> Any: ... def sqs(self, queue: str | None = ...) -> Any: ... def asynsqs(self, queue: str | None = ...) -> Any: ... diff --git a/kombu-stubs/transport/azureservicebus.pyi b/kombu-stubs/transport/azureservicebus.pyi index 135290a..9d2c27e 100644 --- a/kombu-stubs/transport/azureservicebus.pyi +++ b/kombu-stubs/transport/azureservicebus.pyi @@ -1,4 +1,4 @@ -from typing import Any, NamedTuple +from typing import Any from azure.servicebus import ServiceBusClient, ServiceBusReceiver, ServiceBusSender from azure.servicebus.management import ServiceBusAdministrationClient @@ -36,9 +36,7 @@ class Channel(VirtualChannel): self, queue: str, no_ack: bool, *args: Any, **kwargs: Any ) -> str: ... def basic_cancel(self, consumer_tag: str) -> None: ... - def entity_name( - self, name: str, table: dict[int, int] | None = ... - ) -> str: ... + def entity_name(self, name: str, table: dict[int, int] | None = ...) -> str: ... def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... # type: ignore[override] def close(self) -> None: ... @cached_property @@ -76,6 +74,4 @@ class Transport(VirtualTransport): @staticmethod def parse_uri(uri: str) -> tuple[str, Any]: ... @classmethod - def as_uri( - cls, uri: str, include_password: bool = ..., mask: str = ... - ) -> str: ... + def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... diff --git a/kombu-stubs/transport/azurestoragequeues.pyi b/kombu-stubs/transport/azurestoragequeues.pyi index 733258b..4445c42 100644 --- a/kombu-stubs/transport/azurestoragequeues.pyi +++ b/kombu-stubs/transport/azurestoragequeues.pyi @@ -18,9 +18,7 @@ class Channel(VirtualChannel): def basic_consume( self, queue: str, no_ack: bool, *args: Any, **kwargs: Any ) -> str: ... - def entity_name( - self, name: str, table: dict[int, int] = ... - ) -> str: ... + def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... @property def queue_service(self) -> QueueServiceClient: ... @property @@ -42,6 +40,4 @@ class Transport(VirtualTransport): @staticmethod def parse_uri(uri: str) -> tuple[Any, str]: ... @classmethod - def as_uri( - cls, uri: str, include_password: bool = ..., mask: str = ... - ) -> str: ... + def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... diff --git a/kombu-stubs/transport/base.pyi b/kombu-stubs/transport/base.pyi index 5e337a7..debfe21 100644 --- a/kombu-stubs/transport/base.pyi +++ b/kombu-stubs/transport/base.pyi @@ -49,12 +49,8 @@ class Transport: mask: str = ..., ) -> str: ... def get_manager(self, *args: Any, **kwargs: Any) -> _ManagementType: ... - def register_with_event_loop( - self, connection: Any, loop: Any - ) -> None: ... - def unregister_from_event_loop( - self, connection: Any, loop: Any - ) -> None: ... + def register_with_event_loop(self, connection: Any, loop: Any) -> None: ... + def unregister_from_event_loop(self, connection: Any, loop: Any) -> None: ... @property def default_connection_params(self) -> dict[str, Any]: ... @cached_property diff --git a/kombu-stubs/transport/confluentkafka.pyi b/kombu-stubs/transport/confluentkafka.pyi index 745f930..5e6ea16 100644 --- a/kombu-stubs/transport/confluentkafka.pyi +++ b/kombu-stubs/transport/confluentkafka.pyi @@ -1,7 +1,7 @@ from logging import Logger from typing import Any -from confluent_kafka import KafkaException, Consumer, Producer # type: ignore[import-untyped] +from confluent_kafka import KafkaException # type: ignore[import-untyped] from confluent_kafka.admin import AdminClient # type: ignore[import-untyped] from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Message as VirtualMessage diff --git a/kombu-stubs/transport/gcpubsub.pyi b/kombu-stubs/transport/gcpubsub.pyi index bfd618f..71a8d86 100644 --- a/kombu-stubs/transport/gcpubsub.pyi +++ b/kombu-stubs/transport/gcpubsub.pyi @@ -1,6 +1,5 @@ import dataclasses -import threading -from concurrent.futures import Future, ThreadPoolExecutor +from concurrent.futures import ThreadPoolExecutor from logging import Logger from typing import Any diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi index f034109..dd5b7d8 100644 --- a/kombu-stubs/transport/mongodb.pyi +++ b/kombu-stubs/transport/mongodb.pyi @@ -1,7 +1,6 @@ -from datetime import datetime, timedelta +from datetime import datetime from typing import Any, Iterator -from pymongo import errors from pymongo.collection import Collection from pymongo.cursor import Cursor from pymongo.database import Database diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi index 8b52af2..4516129 100644 --- a/kombu-stubs/transport/redis.pyi +++ b/kombu-stubs/transport/redis.pyi @@ -29,9 +29,7 @@ def get_redis_ConnectionError() -> type[Exception]: ... class MutexHeld(Exception): ... @contextmanager -def Mutex( - client: Any, name: str, expire: int -) -> Generator[None, None, None]: ... +def Mutex(client: Any, name: str, expire: int) -> Generator[None, None, None]: ... class GlobalKeyPrefixMixin: PREFIXED_SIMPLE_COMMANDS: list[str] @@ -47,13 +45,13 @@ class GlobalKeyPrefixMixin: self, transaction: bool = ..., shard_hint: Any | None = ... ) -> PrefixedRedisPipeline: ... -class PrefixedStrictRedis(GlobalKeyPrefixMixin, redis_module.Redis): # type: ignore[type-arg] +class PrefixedStrictRedis(GlobalKeyPrefixMixin, redis_module.Redis): global_keyprefix: str def __init__(self, *args: Any, **kwargs: Any) -> None: ... def pubsub(self, **kwargs: Any) -> PrefixedRedisPubSub: ... -class PrefixedRedisPipeline(GlobalKeyPrefixMixin, redis_module.client.Pipeline): # type: ignore[type-arg] +class PrefixedRedisPipeline(GlobalKeyPrefixMixin, redis_module.client.Pipeline): global_keyprefix: str def __init__(self, *args: Any, **kwargs: Any) -> None: ... diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi index 4b7f735..4dec22e 100644 --- a/kombu-stubs/transport/virtual/base.pyi +++ b/kombu-stubs/transport/virtual/base.pyi @@ -41,7 +41,6 @@ class Base64: def decode(self, s: str) -> bytes: ... class NotEquivalentError(Exception): ... - class UndeliverableWarning(UserWarning): ... class BrokerState: @@ -49,13 +48,9 @@ class BrokerState: bindings: dict[binding_key_t, queue_binding_t] | None queue_index: dict[str, set[binding_key_t]] | None - def __init__( - self, exchanges: dict[str, dict[str, Any]] | None = ... - ) -> None: ... + def __init__(self, exchanges: dict[str, dict[str, Any]] | None = ...) -> None: ... def clear(self) -> None: ... - def has_binding( - self, queue: str, exchange: str, routing_key: str - ) -> bool: ... + def has_binding(self, queue: str, exchange: str, routing_key: str) -> bool: ... def binding_declare( self, queue: str, @@ -63,9 +58,7 @@ class BrokerState: routing_key: str, arguments: dict[str, Any] | None, ) -> None: ... - def binding_delete( - self, queue: str, exchange: str, routing_key: str - ) -> None: ... + def binding_delete(self, queue: str, exchange: str, routing_key: str) -> None: ... def queue_bindings_delete(self, queue: str) -> None: ... def queue_bindings(self, queue: str) -> Generator[queue_binding_t, None, None]: ... @@ -77,9 +70,7 @@ class QoS: _delivered: OrderedDict[int, Any] | None _dirty: set[int] | None - def __init__( - self, channel: AbstractChannel, prefetch_count: int = ... - ) -> None: ... + def __init__(self, channel: AbstractChannel, prefetch_count: int = ...) -> None: ... def can_consume(self) -> bool: ... def can_consume_max_estimate(self) -> int: ... def append(self, message: Any, delivery_tag: int) -> None: ... @@ -88,9 +79,7 @@ class QoS: def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... def restore_unacked(self) -> None: ... def restore_unacked_once(self, stderr: Any | None = ...) -> None: ... - def restore_visible( - self, *args: Any, **kwargs: Any - ) -> None: ... + def restore_visible(self, *args: Any, **kwargs: Any) -> None: ... class Message(BaseMessage): def __init__( @@ -110,7 +99,12 @@ class AbstractChannel: def _delete(self, queue: str, *args: Any, **kwargs: Any) -> None: ... def _new_queue(self, queue: str, **kwargs: Any) -> None: ... def _has_queue(self, queue: str, **kwargs: Any) -> bool: ... - def _poll(self, cycle: FairCycle, callback: Callable[..., Any], timeout: float | None = ...) -> None: ... + def _poll( + self, + cycle: FairCycle, + callback: Callable[..., Any], + timeout: float | None = ..., + ) -> None: ... # Channel inherits from AbstractChannel and StdChannel (multiple inheritance) class Channel(AbstractChannel, StdChannel): @@ -237,17 +231,13 @@ class Channel(AbstractChannel, StdChannel): def encode_body( self, body: bytes, encoding: str | None = ... ) -> tuple[Any, str]: ... - def decode_body( - self, body: Any, encoding: str | None = ... - ) -> bytes: ... + def decode_body(self, body: Any, encoding: str | None = ...) -> bytes: ... def drain_events( self, timeout: float | None = ..., callback: Callable[..., Any] | None = ... ) -> None: ... def get_exchanges(self) -> list[str]: ... def get_table(self, exchange: str) -> list[tuple[str, str, str]]: ... - def typeof( - self, exchange: str, default: str = ... - ) -> ExchangeType: ... + def typeof(self, exchange: str, default: str = ...) -> ExchangeType: ... def list_bindings(self) -> Generator[tuple[str, str, str], None, None]: ... def message_to_python(self, raw_message: Any) -> _MessageType: ... def prepare_message( diff --git a/kombu-stubs/utils/__init__.pyi b/kombu-stubs/utils/__init__.pyi index cb16b99..805c3e2 100644 --- a/kombu-stubs/utils/__init__.pyi +++ b/kombu-stubs/utils/__init__.pyi @@ -35,9 +35,7 @@ _T = TypeVar("_T") class EqualityDict(dict[Any, Any]): ... def uuid(_uuid: Callable[[], UUID] = ...) -> str: ... -def maybe_list( - obj: Any, scalars: tuple[type[Any], ...] = ... -) -> list[Any] | None: ... +def maybe_list(obj: Any, scalars: tuple[type[Any], ...] = ...) -> list[Any] | None: ... def fxrange( start: float = ..., stop: float | None = ..., diff --git a/kombu-stubs/utils/compat.pyi b/kombu-stubs/utils/compat.pyi index 0c1b5e4..2d4196e 100644 --- a/kombu-stubs/utils/compat.pyi +++ b/kombu-stubs/utils/compat.pyi @@ -17,7 +17,5 @@ def maybe_fileno(f: Any) -> int | None: ... @contextmanager def nested(*managers: Any) -> Generator[tuple[Any, ...], None, None]: ... def register_after_fork(obj: Any, func: Callable[..., Any]) -> None: ... -def reraise( - tp: type[_ExcT], value: _ExcT, tb: TracebackType | None = ... -) -> _ExcT: ... +def reraise(tp: type[_ExcT], value: _ExcT, tb: TracebackType | None = ...) -> _ExcT: ... def coro(gen: Callable[..., Generator[_T, Any, Any]]) -> Callable[..., _T]: ... diff --git a/kombu-stubs/utils/eventio.pyi b/kombu-stubs/utils/eventio.pyi index 14d199d..3bcfd72 100644 --- a/kombu-stubs/utils/eventio.pyi +++ b/kombu-stubs/utils/eventio.pyi @@ -1,4 +1,3 @@ -from collections.abc import Callable from typing import Any __all__ = ("poll",) diff --git a/kombu-stubs/utils/functional.pyi b/kombu-stubs/utils/functional.pyi index 2414844..53203ef 100644 --- a/kombu-stubs/utils/functional.pyi +++ b/kombu-stubs/utils/functional.pyi @@ -68,9 +68,7 @@ def retry_over_time( callback: Callable[[], None] | None = ..., timeout: float | None = ..., ) -> _T: ... -def reprkwargs( - kwargs: dict[str, Any], sep: str = ..., fmt: str = ... -) -> str: ... +def reprkwargs(kwargs: dict[str, Any], sep: str = ..., fmt: str = ...) -> str: ... promise = lazy maybe_promise = maybe_evaluate diff --git a/kombu-stubs/utils/imports.pyi b/kombu-stubs/utils/imports.pyi index d8e88bf..f5ec8d0 100644 --- a/kombu-stubs/utils/imports.pyi +++ b/kombu-stubs/utils/imports.pyi @@ -14,6 +14,4 @@ def symbol_by_name( default: _T | None = ..., **kwargs: Any, ) -> Any: ... -def reraise( - tp: type[_ExcT], value: _ExcT, tb: TracebackType | None = ... -) -> _ExcT: ... +def reraise(tp: type[_ExcT], value: _ExcT, tb: TracebackType | None = ...) -> _ExcT: ... diff --git a/kombu-stubs/utils/objects.pyi b/kombu-stubs/utils/objects.pyi index e1e0465..c9d736f 100644 --- a/kombu-stubs/utils/objects.pyi +++ b/kombu-stubs/utils/objects.pyi @@ -19,15 +19,12 @@ class cached_property(Generic[_T]): fdel: Callable[[Any], None] | None = ..., ) -> None: ... @overload - def __get__(self, instance: None, owner: type[Any] | None = ...) -> cached_property[_T]: ... + def __get__( + self, instance: None, owner: type[Any] | None = ... + ) -> cached_property[_T]: ... @overload def __get__(self, instance: _S, owner: type[_S] | None = ...) -> _T: ... def __set__(self, instance: Any, value: _T) -> None: ... def __delete__(self, instance: Any) -> None: ... - def setter( - self, fset: Callable[[Any, _T], None] - ) -> cached_property[_T]: ... - def deleter( - self, fdel: Callable[[Any], None] - ) -> cached_property[_T]: ... - + def setter(self, fset: Callable[[Any, _T], None]) -> cached_property[_T]: ... + def deleter(self, fdel: Callable[[Any], None]) -> cached_property[_T]: ... diff --git a/kombu-stubs/utils/scheduling.pyi b/kombu-stubs/utils/scheduling.pyi index 94bd6e4..e58f53d 100644 --- a/kombu-stubs/utils/scheduling.pyi +++ b/kombu-stubs/utils/scheduling.pyi @@ -12,11 +12,8 @@ class round_robin_cycle(Generic[_T]): def consume(self, n: int) -> Iterator[_T]: ... def rotate(self, last_used: _T) -> None: ... -class priority_cycle(round_robin_cycle[_T]): - ... - -class sorted_cycle(round_robin_cycle[_T]): - ... +class priority_cycle(round_robin_cycle[_T]): ... +class sorted_cycle(round_robin_cycle[_T]): ... class FairCycle: fun: Callable[..., Any] @@ -30,7 +27,5 @@ class FairCycle: resources: Sequence[Any], predicate: type[BaseException] = ..., ) -> None: ... - def get( - self, callback: Callable[..., _T], **kwargs: Any - ) -> _T: ... + def get(self, callback: Callable[..., _T], **kwargs: Any) -> _T: ... def close(self) -> None: ... From 8351fa631f5bd1102c747d100ea65664a0e7c606 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sat, 3 Jan 2026 23:39:05 +0100 Subject: [PATCH 12/24] Enable PYI ruff rules and fix violations - Use Self return type for __enter__ and __new__ methods (PYI034) - Use object instead of Any for __exit__ *args (PYI036) - Assign values to __slots__ instead of annotations (PYI035) - Remove unused TypeVars (PYI018) - Sort imports and __all__ entries (I001, RUF022) - Import from collections.abc instead of typing (UP035) - Fix forward reference issues in qpid.pyi - Fix Mailbox.type shadowing builtin type in pidbox.pyi --- amqp-stubs/__init__.pyi | 96 ++++++++++++++----- amqp-stubs/abstract_channel.pyi | 9 +- amqp-stubs/connection.pyi | 6 +- amqp-stubs/exceptions.pyi | 38 ++++---- amqp-stubs/platform.pyi | 2 +- amqp-stubs/transport.pyi | 4 +- amqp-stubs/utils.pyi | 1 - kombu-stubs/__init__.pyi | 16 ++-- kombu-stubs/abstract.pyi | 19 ++-- kombu-stubs/asynchronous/__init__.pyi | 2 +- kombu-stubs/asynchronous/aws/connection.pyi | 2 +- kombu-stubs/asynchronous/aws/ext.pyi | 2 +- .../asynchronous/aws/sqs/connection.pyi | 3 +- kombu-stubs/asynchronous/aws/sqs/queue.pyi | 3 +- kombu-stubs/asynchronous/http/__init__.pyi | 2 +- kombu-stubs/asynchronous/http/base.pyi | 6 +- kombu-stubs/asynchronous/semaphore.pyi | 4 +- kombu-stubs/asynchronous/timer.pyi | 4 +- kombu-stubs/clocks.pyi | 9 +- kombu-stubs/common.pyi | 10 +- kombu-stubs/compat.pyi | 12 +-- kombu-stubs/compression.pyi | 8 +- kombu-stubs/connection.pyi | 2 +- kombu-stubs/exceptions.pyi | 28 +++--- kombu-stubs/log.pyi | 2 +- kombu-stubs/matcher.pyi | 3 +- kombu-stubs/messaging.pyi | 5 +- kombu-stubs/pidbox.pyi | 14 +-- kombu-stubs/pools.pyi | 8 +- kombu-stubs/serialization.pyi | 2 +- kombu-stubs/simple.pyi | 2 +- kombu-stubs/transport/base.pyi | 4 +- kombu-stubs/transport/gcpubsub.pyi | 6 +- kombu-stubs/transport/mongodb.pyi | 9 +- kombu-stubs/transport/pyamqp.pyi | 1 - kombu-stubs/transport/qpid.pyi | 4 +- kombu-stubs/transport/sqlalchemy/__init__.pyi | 4 +- kombu-stubs/transport/sqlalchemy/models.pyi | 4 +- kombu-stubs/transport/virtual/__init__.pyi | 12 +-- kombu-stubs/transport/virtual/base.pyi | 6 +- kombu-stubs/utils/__init__.pyi | 18 ++-- kombu-stubs/utils/collections.pyi | 2 +- kombu-stubs/utils/debug.pyi | 2 +- kombu-stubs/utils/functional.pyi | 6 +- kombu-stubs/utils/time.pyi | 2 +- 45 files changed, 218 insertions(+), 186 deletions(-) diff --git a/amqp-stubs/__init__.pyi b/amqp-stubs/__init__.pyi index 510f5d6..1b1c0b6 100644 --- a/amqp-stubs/__init__.pyi +++ b/amqp-stubs/__init__.pyi @@ -1,69 +1,119 @@ from collections.abc import Callable, Mapping, Sequence from typing import Any +from amqp.basic_message import Message as Message from amqp.channel import Channel as Channel from amqp.connection import Connection as Connection +from amqp.exceptions import ( + AccessRefused as AccessRefused, +) from amqp.exceptions import ( AMQPError as AMQPError, +) +from amqp.exceptions import ( AMQPNotImplementedError as AMQPNotImplementedError, - AccessRefused as AccessRefused, +) +from amqp.exceptions import ( ChannelError as ChannelError, +) +from amqp.exceptions import ( ChannelNotOpen as ChannelNotOpen, +) +from amqp.exceptions import ( ConnectionError as ConnectionError, +) +from amqp.exceptions import ( ConnectionForced as ConnectionForced, +) +from amqp.exceptions import ( ConsumerCancelled as ConsumerCancelled, +) +from amqp.exceptions import ( ContentTooLarge as ContentTooLarge, +) +from amqp.exceptions import ( FrameError as FrameError, +) +from amqp.exceptions import ( FrameSyntaxError as FrameSyntaxError, +) +from amqp.exceptions import ( InternalError as InternalError, +) +from amqp.exceptions import ( InvalidCommand as InvalidCommand, +) +from amqp.exceptions import ( InvalidPath as InvalidPath, +) +from amqp.exceptions import ( IrrecoverableChannelError as IrrecoverableChannelError, +) +from amqp.exceptions import ( IrrecoverableConnectionError as IrrecoverableConnectionError, +) +from amqp.exceptions import ( NoConsumers as NoConsumers, +) +from amqp.exceptions import ( NotAllowed as NotAllowed, +) +from amqp.exceptions import ( NotFound as NotFound, +) +from amqp.exceptions import ( PreconditionFailed as PreconditionFailed, +) +from amqp.exceptions import ( RecoverableChannelError as RecoverableChannelError, +) +from amqp.exceptions import ( RecoverableConnectionError as RecoverableConnectionError, +) +from amqp.exceptions import ( ResourceError as ResourceError, +) +from amqp.exceptions import ( ResourceLocked as ResourceLocked, +) +from amqp.exceptions import ( UnexpectedFrame as UnexpectedFrame, +) +from amqp.exceptions import ( error_for_code as error_for_code, ) -from amqp.basic_message import Message as Message __all__ = ( - "Connection", - "Channel", - "Message", - "promise", "AMQPError", - "ConnectionError", - "RecoverableConnectionError", - "IrrecoverableConnectionError", + "AMQPNotImplementedError", + "AccessRefused", + "Channel", "ChannelError", - "RecoverableChannelError", - "IrrecoverableChannelError", + "ChannelNotOpen", + "Connection", + "ConnectionError", + "ConnectionForced", "ConsumerCancelled", "ContentTooLarge", - "NoConsumers", - "ConnectionForced", - "InvalidPath", - "AccessRefused", - "NotFound", - "ResourceLocked", - "PreconditionFailed", "FrameError", "FrameSyntaxError", + "InternalError", "InvalidCommand", - "ChannelNotOpen", - "UnexpectedFrame", - "ResourceError", + "InvalidPath", + "IrrecoverableChannelError", + "IrrecoverableConnectionError", + "Message", + "NoConsumers", "NotAllowed", - "AMQPNotImplementedError", - "InternalError", + "NotFound", + "PreconditionFailed", + "RecoverableChannelError", + "RecoverableConnectionError", + "ResourceError", + "ResourceLocked", + "UnexpectedFrame", "error_for_code", + "promise", ) class promise: diff --git a/amqp-stubs/abstract_channel.pyi b/amqp-stubs/abstract_channel.pyi index 8dc1a29..f0899e6 100644 --- a/amqp-stubs/abstract_channel.pyi +++ b/amqp-stubs/abstract_channel.pyi @@ -1,11 +1,10 @@ from collections.abc import Callable from logging import Logger -from typing import Any - -from vine import promise +from typing import Any, Self from amqp.exceptions import AMQPNotImplementedError as AMQPNotImplementedError from amqp.exceptions import RecoverableConnectionError as RecoverableConnectionError +from vine import promise __all__ = ("AbstractChannel",) @@ -20,8 +19,8 @@ class AbstractChannel: method_queue: list[Any] def __init__(self, connection: Any, channel_id: int | None) -> None: ... - def __enter__(self) -> AbstractChannel: ... - def __exit__(self, *args: Any) -> None: ... + def __enter__(self) -> Self: ... + def __exit__(self, *args: object) -> None: ... def close(self) -> None: ... def dispatch_method( self, method_sig: tuple[int, int], payload: bytes, content: Any diff --git a/amqp-stubs/connection.pyi b/amqp-stubs/connection.pyi index 2268b5f..67adcab 100644 --- a/amqp-stubs/connection.pyi +++ b/amqp-stubs/connection.pyi @@ -1,6 +1,6 @@ from collections.abc import Callable, Mapping from socket import socket -from typing import Any, TypeAlias +from typing import Any, Self, TypeAlias from amqp.channel import Channel as _ChannelType @@ -77,8 +77,8 @@ class Connection: frame_writer: Callable[..., Any] = ..., **kwargs: Any, ) -> None: ... - def __enter__(self) -> Connection: ... - def __exit__(self, *eargs: Any) -> None: ... + def __enter__(self) -> Self: ... + def __exit__(self, *eargs: object) -> None: ... def Transport( self, host: str, diff --git a/amqp-stubs/exceptions.pyi b/amqp-stubs/exceptions.pyi index 2349f25..e194e2c 100644 --- a/amqp-stubs/exceptions.pyi +++ b/amqp-stubs/exceptions.pyi @@ -1,31 +1,31 @@ __all__ = ( + "AMQPDeprecationWarning", "AMQPError", - "ConnectionError", + "AMQPNotImplementedError", + "AccessRefused", "ChannelError", - "RecoverableConnectionError", - "IrrecoverableConnectionError", - "RecoverableChannelError", - "IrrecoverableChannelError", + "ChannelNotOpen", + "ConnectionError", + "ConnectionForced", "ConsumerCancelled", "ContentTooLarge", - "NoConsumers", - "ConnectionForced", - "InvalidPath", - "AccessRefused", - "NotFound", - "ResourceLocked", - "PreconditionFailed", "FrameError", "FrameSyntaxError", - "InvalidCommand", - "ChannelNotOpen", - "UnexpectedFrame", - "ResourceError", - "NotAllowed", - "AMQPNotImplementedError", "InternalError", + "InvalidCommand", + "InvalidPath", + "IrrecoverableChannelError", + "IrrecoverableConnectionError", "MessageNacked", - "AMQPDeprecationWarning", + "NoConsumers", + "NotAllowed", + "NotFound", + "PreconditionFailed", + "RecoverableChannelError", + "RecoverableConnectionError", + "ResourceError", + "ResourceLocked", + "UnexpectedFrame", ) class AMQPError(Exception): diff --git a/amqp-stubs/platform.pyi b/amqp-stubs/platform.pyi index 02ca76a..6a4fd41 100644 --- a/amqp-stubs/platform.pyi +++ b/amqp-stubs/platform.pyi @@ -1,6 +1,6 @@ import re -__all__ = ("LINUX_VERSION", "SOL_TCP", "KNOWN_TCP_OPTS") +__all__ = ("KNOWN_TCP_OPTS", "LINUX_VERSION", "SOL_TCP") LINUX_VERSION: tuple[int, int, int] SOL_TCP: int diff --git a/amqp-stubs/transport.pyi b/amqp-stubs/transport.pyi index 06a075a..3f4ea57 100644 --- a/amqp-stubs/transport.pyi +++ b/amqp-stubs/transport.pyi @@ -1,9 +1,9 @@ import re -from collections.abc import Callable, Mapping +from collections.abc import Callable, Generator, Mapping from contextlib import contextmanager from socket import socket from ssl import SSLError as SSLError -from typing import Any, Generator +from typing import Any from amqp.exceptions import UnexpectedFrame as UnexpectedFrame diff --git a/amqp-stubs/utils.pyi b/amqp-stubs/utils.pyi index e16bd60..e29a07c 100644 --- a/amqp-stubs/utils.pyi +++ b/amqp-stubs/utils.pyi @@ -5,7 +5,6 @@ from typing import Any, TypeVar from amqp import promise as promise _T = TypeVar("_T") -_F = TypeVar("_F", bound=Callable[..., Any]) class NullHandler(Handler): def emit(self, record: Any) -> None: ... diff --git a/kombu-stubs/__init__.pyi b/kombu-stubs/__init__.pyi index 47b5594..0f0cc48 100644 --- a/kombu-stubs/__init__.pyi +++ b/kombu-stubs/__init__.pyi @@ -13,21 +13,21 @@ from kombu.pools import Connections as _Connections from kombu.pools import Producers as _Producers __all__ = ( - "Connection", "BrokerConnection", + "Connection", + "Consumer", "Exchange", - "Queue", - "binding", "Message", - "Consumer", "Producer", + "Queue", + "binding", "connections", - "producers", - "parse_url", + "disable_insecure_serializers", + "enable_insecure_serializers", "eventloop", + "parse_url", + "producers", "uuid", - "enable_insecure_serializers", - "disable_insecure_serializers", ) BrokerConnection = Connection diff --git a/kombu-stubs/abstract.pyi b/kombu-stubs/abstract.pyi index 65b0bbe..3f4b249 100644 --- a/kombu-stubs/abstract.pyi +++ b/kombu-stubs/abstract.pyi @@ -1,11 +1,10 @@ -from typing import Any, TypeVar +from typing import Any from kombu.connection import Connection from kombu.transport.base import StdChannel +from typing_extensions import Self -__all__ = ("Object", "MaybeChannelBound") - -_MaybeChannelBoundT = TypeVar("_MaybeChannelBoundT", bound="MaybeChannelBound") +__all__ = ("MaybeChannelBound", "Object") class Object: attrs: tuple[tuple[str, Any], ...] @@ -17,15 +16,9 @@ class Object: class MaybeChannelBound(Object): @property def can_cache_declaration(self) -> bool: ... - def __call__( - self: _MaybeChannelBoundT, channel: StdChannel | Connection - ) -> _MaybeChannelBoundT: ... - def bind( - self: _MaybeChannelBoundT, channel: StdChannel | Connection - ) -> _MaybeChannelBoundT: ... - def maybe_bind( - self: _MaybeChannelBoundT, channel: StdChannel | Connection - ) -> _MaybeChannelBoundT: ... + def __call__(self, channel: StdChannel | Connection) -> Self: ... + def bind(self, channel: StdChannel | Connection) -> Self: ... + def maybe_bind(self, channel: StdChannel | Connection) -> Self: ... def revive(self, channel: StdChannel) -> None: ... def when_bound(self) -> None: ... @property diff --git a/kombu-stubs/asynchronous/__init__.pyi b/kombu-stubs/asynchronous/__init__.pyi index 4c01560..57dc534 100644 --- a/kombu-stubs/asynchronous/__init__.pyi +++ b/kombu-stubs/asynchronous/__init__.pyi @@ -2,7 +2,7 @@ from kombu.asynchronous.hub import Hub as Hub from kombu.asynchronous.hub import get_event_loop as get_event_loop from kombu.asynchronous.hub import set_event_loop as set_event_loop -__all__ = ("READ", "WRITE", "ERR", "Hub", "get_event_loop", "set_event_loop") +__all__ = ("ERR", "READ", "WRITE", "Hub", "get_event_loop", "set_event_loop") READ: int WRITE: int diff --git a/kombu-stubs/asynchronous/aws/connection.pyi b/kombu-stubs/asynchronous/aws/connection.pyi index f8143ff..3bfeae7 100644 --- a/kombu-stubs/asynchronous/aws/connection.pyi +++ b/kombu-stubs/asynchronous/aws/connection.pyi @@ -4,7 +4,7 @@ from typing import Any from kombu.asynchronous.http.base import Request as _Request from vine import promise -__all__ = ("AsyncHTTPSConnection", "AsyncConnection") +__all__ = ("AsyncConnection", "AsyncHTTPSConnection") def message_from_headers(hdr: list[tuple[str, str]]) -> Any: ... diff --git a/kombu-stubs/asynchronous/aws/ext.pyi b/kombu-stubs/asynchronous/aws/ext.pyi index f22d4e5..ba944e5 100644 --- a/kombu-stubs/asynchronous/aws/ext.pyi +++ b/kombu-stubs/asynchronous/aws/ext.pyi @@ -4,4 +4,4 @@ from botocore.awsrequest import AWSRequest as AWSRequest from botocore.httpsession import get_cert_path as get_cert_path from botocore.response import get_response as get_response -__all__ = ("exceptions", "AWSRequest", "get_response", "get_cert_path") +__all__ = ("AWSRequest", "exceptions", "get_cert_path", "get_response") diff --git a/kombu-stubs/asynchronous/aws/sqs/connection.pyi b/kombu-stubs/asynchronous/aws/sqs/connection.pyi index 430f7a1..fb56fba 100644 --- a/kombu-stubs/asynchronous/aws/sqs/connection.pyi +++ b/kombu-stubs/asynchronous/aws/sqs/connection.pyi @@ -1,9 +1,8 @@ from typing import Any -from vine import promise - from kombu.asynchronous.aws.connection import AsyncAWSQueryConnection from kombu.asynchronous.aws.sqs.queue import AsyncQueue +from vine import promise __all__ = ("AsyncSQSConnection",) diff --git a/kombu-stubs/asynchronous/aws/sqs/queue.pyi b/kombu-stubs/asynchronous/aws/sqs/queue.pyi index 45d321e..edce501 100644 --- a/kombu-stubs/asynchronous/aws/sqs/queue.pyi +++ b/kombu-stubs/asynchronous/aws/sqs/queue.pyi @@ -1,8 +1,7 @@ from typing import Any, NoReturn -from vine import promise - from kombu.asynchronous.aws.sqs.message import AsyncMessage +from vine import promise def list_first(rs: list[Any]) -> Any | None: ... diff --git a/kombu-stubs/asynchronous/http/__init__.pyi b/kombu-stubs/asynchronous/http/__init__.pyi index f3d26d1..3dcb92d 100644 --- a/kombu-stubs/asynchronous/http/__init__.pyi +++ b/kombu-stubs/asynchronous/http/__init__.pyi @@ -4,7 +4,7 @@ from kombu.asynchronous.http.base import Response as Response from kombu.asynchronous.http.curl import CurlClient from kombu.asynchronous.hub import Hub -__all__ = ("Client", "Headers", "Response", "Request") +__all__ = ("Client", "Headers", "Request", "Response") def Client(hub: Hub | None = ..., **kwargs: int) -> CurlClient: ... def get_client(hub: Hub | None = ..., **kwargs: int) -> CurlClient: ... diff --git a/kombu-stubs/asynchronous/http/base.pyi b/kombu-stubs/asynchronous/http/base.pyi index 34fe1ec..e2adbdd 100644 --- a/kombu-stubs/asynchronous/http/base.pyi +++ b/kombu-stubs/asynchronous/http/base.pyi @@ -1,9 +1,9 @@ from collections.abc import Callable, Mapping from io import BytesIO from types import TracebackType -from typing import Any +from typing import Any, Self -__all__ = ("Headers", "Response", "Request") +__all__ = ("Headers", "Request", "Response") class Headers(dict[str, str]): complete: bool @@ -102,7 +102,7 @@ class BaseClient: def add_request(self, request: _Request) -> _Request: ... def close(self) -> None: ... def on_header(self, headers: _Headers, line: bytes | str) -> None: ... - def __enter__(self) -> BaseClient: ... + def __enter__(self) -> Self: ... def __exit__( self, exc_type: type[BaseException] | None, diff --git a/kombu-stubs/asynchronous/semaphore.pyi b/kombu-stubs/asynchronous/semaphore.pyi index 9b686af..4a0bda3 100644 --- a/kombu-stubs/asynchronous/semaphore.pyi +++ b/kombu-stubs/asynchronous/semaphore.pyi @@ -1,11 +1,11 @@ from collections.abc import Callable from types import TracebackType -from typing import Any +from typing import Any, Self __all__ = ("DummyLock", "LaxBoundedSemaphore") class DummyLock: - def __enter__(self) -> DummyLock: ... + def __enter__(self) -> Self: ... def __exit__( self, exc_type: type[BaseException] | None, diff --git a/kombu-stubs/asynchronous/timer.pyi b/kombu-stubs/asynchronous/timer.pyi index 8ddd407..747446a 100644 --- a/kombu-stubs/asynchronous/timer.pyi +++ b/kombu-stubs/asynchronous/timer.pyi @@ -1,7 +1,7 @@ from collections.abc import Callable, Iterator from datetime import datetime from types import TracebackType -from typing import Any, NamedTuple +from typing import Any, NamedTuple, Self from zoneinfo import ZoneInfo __all__ = ("Entry", "Timer", "to_timestamp") @@ -50,7 +50,7 @@ class Timer: on_error: Callable[[Exception], None] | None = ..., **kwargs: Any, ) -> None: ... - def __enter__(self) -> Timer: ... + def __enter__(self) -> Self: ... def __exit__( self, exc_type: type[BaseException] | None, diff --git a/kombu-stubs/clocks.pyi b/kombu-stubs/clocks.pyi index a71f615..78aa8c9 100644 --- a/kombu-stubs/clocks.pyi +++ b/kombu-stubs/clocks.pyi @@ -1,15 +1,14 @@ from threading import Lock -from typing import Any +from typing import Any, Self __all__ = ("LamportClock", "timetuple") class timetuple(tuple[int | None, float, str, Any]): - __slots__: tuple[()] + __slots__ = () def __new__( cls, clock: int | None, timestamp: float, id: str, obj: Any = ... - ) -> timetuple: ... - def __repr__(self) -> str: ... + ) -> Self: ... def __getnewargs__(self) -> tuple[int | None, float, str, Any]: ... def __lt__(self, other: tuple[Any, ...]) -> bool: ... def __gt__(self, other: tuple[Any, ...]) -> bool: ... @@ -32,5 +31,3 @@ class LamportClock: def adjust(self, other: int) -> int: ... def forward(self) -> int: ... def sort_heap(self, h: list[tuple[int, str]]) -> tuple[int, str]: ... - def __str__(self) -> str: ... - def __repr__(self) -> str: ... diff --git a/kombu-stubs/common.pyi b/kombu-stubs/common.pyi index 86dc651..4500ae9 100644 --- a/kombu-stubs/common.pyi +++ b/kombu-stubs/common.pyi @@ -9,14 +9,14 @@ from kombu.transport.base import StdChannel __all__ = ( "Broadcast", - "maybe_declare", - "uuid", - "itermessages", - "send_reply", "collect_replies", - "insured", "drain_consumer", "eventloop", + "insured", + "itermessages", + "maybe_declare", + "send_reply", + "uuid", ) class Broadcast(Queue): diff --git a/kombu-stubs/compat.pyi b/kombu-stubs/compat.pyi index b1045ee..e2f2c92 100644 --- a/kombu-stubs/compat.pyi +++ b/kombu-stubs/compat.pyi @@ -1,6 +1,6 @@ -from collections.abc import Generator, Iterable +from collections.abc import Generator, Iterable, Iterator from types import TracebackType -from typing import Any +from typing import Any, Self from kombu.connection import Connection from kombu.entity import Exchange, Queue @@ -9,7 +9,7 @@ from kombu.messaging import Consumer as _Consumer from kombu.messaging import Producer from kombu.transport.base import StdChannel -__all__ = ("Publisher", "Consumer") +__all__ = ("Consumer", "Publisher") def entry_to_queue(queue: str, **options: Any) -> Queue: ... @@ -34,7 +34,7 @@ class Publisher(Producer): ) -> None: ... def send(self, *args: Any, **kwargs: Any) -> Any: ... def close(self) -> None: ... - def __enter__(self) -> Publisher: ... + def __enter__(self) -> Self: ... def __exit__( self, exc_type: type[BaseException] | None, @@ -69,14 +69,14 @@ class Consumer(_Consumer): ) -> None: ... def revive(self, channel: StdChannel) -> None: ... def close(self) -> None: ... - def __enter__(self) -> Consumer: ... + def __enter__(self) -> Self: ... def __exit__( self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None, ) -> None: ... - def __iter__(self) -> Generator[Message | None, None, None]: ... + def __iter__(self) -> Iterator[Message | None]: ... def fetch( self, no_ack: bool | None = ..., enable_callbacks: bool = ... ) -> Message | None: ... diff --git a/kombu-stubs/compression.pyi b/kombu-stubs/compression.pyi index 08788fe..da94bf0 100644 --- a/kombu-stubs/compression.pyi +++ b/kombu-stubs/compression.pyi @@ -1,12 +1,12 @@ from collections.abc import Callable, Iterable __all__ = ( - "register", - "encoders", - "get_encoder", - "get_decoder", "compress", "decompress", + "encoders", + "get_decoder", + "get_encoder", + "register", ) def register( diff --git a/kombu-stubs/connection.pyi b/kombu-stubs/connection.pyi index ae9097d..a427454 100644 --- a/kombu-stubs/connection.pyi +++ b/kombu-stubs/connection.pyi @@ -8,7 +8,7 @@ from kombu.transport.base import Management, StdChannel, Transport from kombu.utils.objects import cached_property from typing_extensions import Self -__all__ = ("Connection", "ConnectionPool", "ChannelPool") +__all__ = ("ChannelPool", "Connection", "ConnectionPool") _T = TypeVar("_T") diff --git a/kombu-stubs/exceptions.pyi b/kombu-stubs/exceptions.pyi index 9fcb11d..8c358c4 100644 --- a/kombu-stubs/exceptions.pyi +++ b/kombu-stubs/exceptions.pyi @@ -5,25 +5,25 @@ from amqp import ChannelError as ChannelError from amqp import ConnectionError as ConnectionError __all__ = ( - "reraise", - "KombuError", - "OperationalError", - "NotBoundError", - "MessageStateError", - "TimeoutError", - "LimitExceeded", - "ConnectionLimitExceeded", + "ChannelError", "ChannelLimitExceeded", "ConnectionError", - "ChannelError", - "VersionMismatch", - "SerializerNotInstalled", - "ResourceError", - "SerializationError", - "EncodeError", + "ConnectionLimitExceeded", "DecodeError", + "EncodeError", "HttpError", "InconsistencyError", + "KombuError", + "LimitExceeded", + "MessageStateError", + "NotBoundError", + "OperationalError", + "ResourceError", + "SerializationError", + "SerializerNotInstalled", + "TimeoutError", + "VersionMismatch", + "reraise", ) class KombuError(Exception): ... diff --git a/kombu-stubs/log.pyi b/kombu-stubs/log.pyi index ec0f9f2..b88206c 100644 --- a/kombu-stubs/log.pyi +++ b/kombu-stubs/log.pyi @@ -3,7 +3,7 @@ from typing import Any, TextIO from kombu.utils.objects import cached_property -__all__ = ("LogMixin", "LOG_LEVELS", "get_loglevel", "setup_logging") +__all__ = ("LOG_LEVELS", "LogMixin", "get_loglevel", "setup_logging") LOG_LEVELS: dict[str | int, int | str] DISABLE_TRACEBACKS: str | None diff --git a/kombu-stubs/matcher.pyi b/kombu-stubs/matcher.pyi index b830e24..82a6e0d 100644 --- a/kombu-stubs/matcher.pyi +++ b/kombu-stubs/matcher.pyi @@ -1,6 +1,7 @@ from collections.abc import Callable +from typing import TypeAlias -MatcherFunction = Callable[[str, str], bool] +MatcherFunction: TypeAlias = Callable[[str, str], bool] class MatcherNotInstalled(Exception): ... diff --git a/kombu-stubs/messaging.pyi b/kombu-stubs/messaging.pyi index e18a6c7..e75b19f 100644 --- a/kombu-stubs/messaging.pyi +++ b/kombu-stubs/messaging.pyi @@ -9,10 +9,7 @@ from kombu.message import Message from kombu.transport.base import StdChannel from typing_extensions import Self -from kombu.entity import Exchange as Exchange -from kombu.entity import Queue as Queue - -__all__ = ("Exchange", "Queue", "Producer", "Consumer") +__all__ = ("Consumer", "Exchange", "Producer", "Queue") class Producer: channel: Connection | StdChannel | None diff --git a/kombu-stubs/pidbox.pyi b/kombu-stubs/pidbox.pyi index 2fcd4af..3911b67 100644 --- a/kombu-stubs/pidbox.pyi +++ b/kombu-stubs/pidbox.pyi @@ -1,6 +1,7 @@ -from collections.abc import Callable, Sequence +import builtins +from collections.abc import Callable, Generator, Sequence from contextlib import contextmanager -from typing import Any, Generator, Type, TypeAlias +from typing import Any, TypeAlias from kombu.connection import Connection from kombu.entity import Exchange, Queue @@ -9,10 +10,9 @@ from kombu.messaging import Consumer, Producer from kombu.transport.base import StdChannel from kombu.utils.objects import cached_property -__all__ = ("Node", "Mailbox") +__all__ = ("Mailbox", "Node") _ConsumerType: TypeAlias = Consumer -_NodeType: TypeAlias = "Node" class Node: hostname: str | None @@ -84,7 +84,7 @@ class Mailbox: queue_exclusive: bool reply_queue_ttl: float | None reply_queue_expires: float | None - node_cls: Type[_NodeType] + node_cls: builtins.type[Node] def __init__( self, @@ -102,14 +102,14 @@ class Mailbox: reply_queue_ttl: float | None = ..., reply_queue_expires: float | None = ..., ) -> None: ... - def __call__(self, connection: Connection) -> _NodeType: ... + def __call__(self, connection: Connection) -> Node: ... def Node( self, hostname: str | None = ..., state: Any | None = ..., channel: StdChannel | None = ..., handlers: dict[str, Callable[..., Any]] | None = ..., - ) -> _NodeType: ... + ) -> Node: ... def get_queue(self, hostname: str) -> Queue: ... def get_reply_queue(self) -> Queue: ... @contextmanager diff --git a/kombu-stubs/pools.pyi b/kombu-stubs/pools.pyi index b1723af..c374383 100644 --- a/kombu-stubs/pools.pyi +++ b/kombu-stubs/pools.pyi @@ -4,14 +4,14 @@ from kombu.connection import Connection, ConnectionPool from kombu.messaging import Producer __all__ = ( - "ProducerPool", "PoolGroup", - "register_group", + "ProducerPool", "connections", - "producers", "get_limit", - "set_limit", + "producers", + "register_group", "reset", + "set_limit", ) _ProducerType: TypeAlias = Producer diff --git a/kombu-stubs/serialization.pyi b/kombu-stubs/serialization.pyi index 943ae59..4912210 100644 --- a/kombu-stubs/serialization.pyi +++ b/kombu-stubs/serialization.pyi @@ -2,7 +2,7 @@ import pickle as pickle from collections.abc import Callable, Container, Iterable, Mapping from typing import Any, NamedTuple, TypeAlias -__all__ = ("pickle", "loads", "dumps", "register", "unregister") +__all__ = ("dumps", "loads", "pickle", "register", "unregister") pickle_load = pickle.load diff --git a/kombu-stubs/simple.pyi b/kombu-stubs/simple.pyi index 844136f..f88bc0c 100644 --- a/kombu-stubs/simple.pyi +++ b/kombu-stubs/simple.pyi @@ -8,7 +8,7 @@ from kombu.messaging import Consumer, Producer from kombu.transport.base import StdChannel from typing_extensions import Self -__all__ = ("SimpleQueue", "SimpleBuffer") +__all__ = ("SimpleBuffer", "SimpleQueue") class SimpleBase: Empty: type[Empty] diff --git a/kombu-stubs/transport/base.pyi b/kombu-stubs/transport/base.pyi index debfe21..b6ba847 100644 --- a/kombu-stubs/transport/base.pyi +++ b/kombu-stubs/transport/base.pyi @@ -6,10 +6,10 @@ from kombu.message import Message as Message from kombu.messaging import Consumer, Producer from kombu.utils.objects import cached_property -__all__ = ("Message", "StdChannel", "Management", "Transport") +__all__ = ("Management", "Message", "StdChannel", "Transport") # Forward reference for Management to avoid name collision with Transport.Management -_ManagementType: TypeAlias = "Management" +_ManagementType: TypeAlias = Management class Management: transport: Transport diff --git a/kombu-stubs/transport/gcpubsub.pyi b/kombu-stubs/transport/gcpubsub.pyi index 71a8d86..6b99031 100644 --- a/kombu-stubs/transport/gcpubsub.pyi +++ b/kombu-stubs/transport/gcpubsub.pyi @@ -4,8 +4,10 @@ from logging import Logger from typing import Any from google.cloud.monitoring_v3 import MetricServiceClient -from google.cloud.pubsub_v1 import PublisherClient, SubscriberClient # type: ignore[import-untyped] - +from google.cloud.pubsub_v1 import ( # type: ignore[import-untyped] + PublisherClient, + SubscriberClient, +) from kombu.transport import virtual from kombu.utils.objects import cached_property diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi index dd5b7d8..2b1af28 100644 --- a/kombu-stubs/transport/mongodb.pyi +++ b/kombu-stubs/transport/mongodb.pyi @@ -1,12 +1,13 @@ +from collections.abc import Iterator from datetime import datetime -from typing import Any, Iterator +from typing import Any -from pymongo.collection import Collection -from pymongo.cursor import Cursor -from pymongo.database import Database from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from pymongo.collection import Collection +from pymongo.cursor import Cursor +from pymongo.database import Database E_SERVER_VERSION: str E_NO_TTL_INDEXES: str diff --git a/kombu-stubs/transport/pyamqp.pyi b/kombu-stubs/transport/pyamqp.pyi index 1512bfa..654c524 100644 --- a/kombu-stubs/transport/pyamqp.pyi +++ b/kombu-stubs/transport/pyamqp.pyi @@ -1,7 +1,6 @@ from typing import Any import amqp - from kombu.transport.base import Message as BaseMessage from kombu.transport.base import StdChannel from kombu.transport.base import Transport as BaseTransport diff --git a/kombu-stubs/transport/qpid.pyi b/kombu-stubs/transport/qpid.pyi index 31f7f6d..ca0d315 100644 --- a/kombu-stubs/transport/qpid.pyi +++ b/kombu-stubs/transport/qpid.pyi @@ -18,10 +18,8 @@ class AuthenticationFailure(Exception): ... class QoS(VirtualQoS): def __init__(self, session: Any, prefetch_count: int = ...) -> None: ... -_Channel = Channel - class Connection: - Channel: type[_Channel] + Channel: type[Channel] def __init__(self, **conn_info: Any) -> None: ... def close(self) -> None: ... diff --git a/kombu-stubs/transport/sqlalchemy/__init__.pyi b/kombu-stubs/transport/sqlalchemy/__init__.pyi index 71841f3..791bd90 100644 --- a/kombu-stubs/transport/sqlalchemy/__init__.pyi +++ b/kombu-stubs/transport/sqlalchemy/__init__.pyi @@ -1,10 +1,10 @@ from typing import Any -from sqlalchemy.exc import OperationalError -from sqlalchemy.orm import Session from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from sqlalchemy.exc import OperationalError +from sqlalchemy.orm import Session VERSION: tuple[int, int, int] diff --git a/kombu-stubs/transport/sqlalchemy/models.pyi b/kombu-stubs/transport/sqlalchemy/models.pyi index 4c2a9c5..a6db8a3 100644 --- a/kombu-stubs/transport/sqlalchemy/models.pyi +++ b/kombu-stubs/transport/sqlalchemy/models.pyi @@ -1,7 +1,7 @@ from typing import Any from sqlalchemy.orm import RelationshipProperty -from sqlalchemy.schema import MetaData, Column +from sqlalchemy.schema import Column, MetaData class_registry: dict[str, Any] metadata: MetaData @@ -16,7 +16,6 @@ class Queue: messages: RelationshipProperty[Any] def __init__(self, name: str) -> None: ... - def __str__(self) -> str: ... class Message: __table_args__: tuple[Any, ...] @@ -32,4 +31,3 @@ class Message: queue: Queue def __init__(self, payload: str, queue: Queue) -> None: ... - def __str__(self) -> str: ... diff --git a/kombu-stubs/transport/virtual/__init__.pyi b/kombu-stubs/transport/virtual/__init__.pyi index c937e99..3005a2e 100644 --- a/kombu-stubs/transport/virtual/__init__.pyi +++ b/kombu-stubs/transport/virtual/__init__.pyi @@ -1,17 +1,17 @@ from queue import Empty as Empty __all__ = ( + "AbstractChannel", "Base64", - "NotEquivalentError", - "UndeliverableWarning", "BrokerState", - "QoS", - "Message", - "AbstractChannel", "Channel", + "Empty", "Management", + "Message", + "NotEquivalentError", + "QoS", "Transport", - "Empty", + "UndeliverableWarning", "binding_key_t", "queue_binding_t", ) diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi index 4dec22e..a22c4b1 100644 --- a/kombu-stubs/transport/virtual/base.pyi +++ b/kombu-stubs/transport/virtual/base.pyi @@ -22,9 +22,9 @@ W_NO_CONSUMERS: str logger: logging.Logger # Forward references for type annotations to avoid name collisions with class attributes -_QoSType: TypeAlias = "QoS" -_MessageType: TypeAlias = "Message" -_ChannelType: TypeAlias = "Channel" +_QoSType: TypeAlias = QoS +_MessageType: TypeAlias = Message +_ChannelType: TypeAlias = Channel class binding_key_t(NamedTuple): queue: str diff --git a/kombu-stubs/utils/__init__.pyi b/kombu-stubs/utils/__init__.pyi index 805c3e2..b41d464 100644 --- a/kombu-stubs/utils/__init__.pyi +++ b/kombu-stubs/utils/__init__.pyi @@ -10,20 +10,20 @@ from kombu.utils.objects import cached_property as cached_property # We match the runtime __all__ exactly __all__ = ( "EqualityDict", - "uuid", - "maybe_list", + "cached_property", + "emergency_dump_state", + "fileno", "fxrange", "fxrangemax", - "retry_over_time", - "emergency_dump_state", - "cached_property", + "maybe_fileno", + "maybe_list", + "nested", "register_after_fork", - "reprkwargs", "reprcall", + "reprkwargs", + "retry_over_time", "symbol_by_name", - "nested", - "fileno", - "maybe_fileno", + "uuid", ) # Defined in __all__ but not actually implemented at runtime (kombu bug) diff --git a/kombu-stubs/utils/collections.pyi b/kombu-stubs/utils/collections.pyi index 9124d6e..a67398c 100644 --- a/kombu-stubs/utils/collections.pyi +++ b/kombu-stubs/utils/collections.pyi @@ -4,7 +4,7 @@ from typing import Any class EqualityDict(dict[Any, Any]): ... class HashedSeq(list[Any]): - __slots__: str + __slots__ = "hashvalue" # noqa: PLC0205 # must match runtime hashvalue: int def __init__(self, *seq: Any) -> None: ... diff --git a/kombu-stubs/utils/debug.pyi b/kombu-stubs/utils/debug.pyi index a3712a0..114285d 100644 --- a/kombu-stubs/utils/debug.pyi +++ b/kombu-stubs/utils/debug.pyi @@ -1,7 +1,7 @@ from logging import Logger from typing import Any -__all__ = ("setup_logging", "Logwrapped") +__all__ = ("Logwrapped", "setup_logging") class Logwrapped: instance: Any diff --git a/kombu-stubs/utils/functional.pyi b/kombu-stubs/utils/functional.pyi index 53203ef..3c0e614 100644 --- a/kombu-stubs/utils/functional.pyi +++ b/kombu-stubs/utils/functional.pyi @@ -4,12 +4,12 @@ from typing import Any, TypeVar __all__ = ( "LRUCache", - "memoize", + "dictfilter", + "is_list", "lazy", "maybe_evaluate", - "is_list", "maybe_list", - "dictfilter", + "memoize", "retry_over_time", ) diff --git a/kombu-stubs/utils/time.pyi b/kombu-stubs/utils/time.pyi index a03c195..6a14eec 100644 --- a/kombu-stubs/utils/time.pyi +++ b/kombu-stubs/utils/time.pyi @@ -1,3 +1,3 @@ __all__ = ("maybe_s_to_ms",) -def maybe_s_to_ms(v: int | float | None) -> int | None: ... +def maybe_s_to_ms(v: float | None) -> int | None: ... From d88389557a6db084253f9ca9c71afd7b7c051a1a Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sat, 3 Jan 2026 23:40:09 +0100 Subject: [PATCH 13/24] Remove stubtest allowlist for kombu --- stubtest-allowlist-kombu.txt | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 stubtest-allowlist-kombu.txt diff --git a/stubtest-allowlist-kombu.txt b/stubtest-allowlist-kombu.txt deleted file mode 100644 index ef344c4..0000000 --- a/stubtest-allowlist-kombu.txt +++ /dev/null @@ -1,13 +0,0 @@ -# Unfixable stubtest errors for kombu - -# librabbitmq is a legacy C extension (abandoned 2018, Python 3.6 max) -# No stub provided - use pyamqp transport instead -kombu.transport.librabbitmq - -# kombu bug: reprkwargs is in __all__ but not defined at runtime -# See: https://github.com/celery/kombu/blob/main/kombu/utils/__init__.py -kombu.utils.reprkwargs - -# Google Cloud Pub/Sub exceptions have a custom metaclass (_GoogleAPICallErrorMeta) -# that stubtest cannot handle -kombu.transport.gcpubsub.Transport.channel_errors From 87c63a4673c6529fa344e60ce82d2407ca87b8e0 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sat, 3 Jan 2026 23:43:20 +0100 Subject: [PATCH 14/24] Fix polling_interval type to allow None in base class --- kombu-stubs/transport/redis.pyi | 2 +- kombu-stubs/transport/virtual/base.pyi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi index 4516129..97c694f 100644 --- a/kombu-stubs/transport/redis.pyi +++ b/kombu-stubs/transport/redis.pyi @@ -185,7 +185,7 @@ _Channel = Channel class Transport(VirtualTransport): Channel: type[_Channel] - polling_interval: None # type: ignore[assignment] + polling_interval: None brpop_timeout: int default_port: int driver_type: str diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi index a22c4b1..203f47e 100644 --- a/kombu-stubs/transport/virtual/base.pyi +++ b/kombu-stubs/transport/virtual/base.pyi @@ -278,7 +278,7 @@ class Transport(BaseTransport): Cycle: type[FairCycle] Management: type[Management] - polling_interval: float + polling_interval: float | None channel_max: int channels: list[_ChannelType] | None cycle: FairCycle | None From 9db5f6102b3244525bec946f05f58385d7a99d72 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sun, 4 Jan 2026 01:27:36 +0100 Subject: [PATCH 15/24] Fix basedpyright errors - Import Self from typing_extensions for Python 3.10 compatibility - Export kombu.pools module for celery stubs - Configure basedpyright to allow legitimate variable/method overrides - Fix redis.client imports using direct imports - Widen memoize Cache parameter to accept dict --- amqp-stubs/abstract_channel.pyi | 3 ++- amqp-stubs/connection.pyi | 3 ++- kombu-stubs/__init__.pyi | 1 + kombu-stubs/asynchronous/http/base.pyi | 4 +++- kombu-stubs/asynchronous/semaphore.pyi | 4 +++- kombu-stubs/asynchronous/timer.pyi | 4 +++- kombu-stubs/clocks.pyi | 4 +++- kombu-stubs/compat.pyi | 3 ++- kombu-stubs/transport/base.pyi | 3 ++- kombu-stubs/transport/redis.pyi | 7 ++++--- kombu-stubs/transport/virtual/base.pyi | 3 ++- kombu-stubs/utils/functional.pyi | 2 +- pyproject.toml | 5 +++++ 13 files changed, 33 insertions(+), 13 deletions(-) diff --git a/amqp-stubs/abstract_channel.pyi b/amqp-stubs/abstract_channel.pyi index f0899e6..b1a894d 100644 --- a/amqp-stubs/abstract_channel.pyi +++ b/amqp-stubs/abstract_channel.pyi @@ -1,9 +1,10 @@ from collections.abc import Callable from logging import Logger -from typing import Any, Self +from typing import Any from amqp.exceptions import AMQPNotImplementedError as AMQPNotImplementedError from amqp.exceptions import RecoverableConnectionError as RecoverableConnectionError +from typing_extensions import Self from vine import promise __all__ = ("AbstractChannel",) diff --git a/amqp-stubs/connection.pyi b/amqp-stubs/connection.pyi index 67adcab..69d821e 100644 --- a/amqp-stubs/connection.pyi +++ b/amqp-stubs/connection.pyi @@ -1,8 +1,9 @@ from collections.abc import Callable, Mapping from socket import socket -from typing import Any, Self, TypeAlias +from typing import Any, TypeAlias from amqp.channel import Channel as _ChannelType +from typing_extensions import Self __all__ = ("Connection",) diff --git a/kombu-stubs/__init__.pyi b/kombu-stubs/__init__.pyi index 0f0cc48..c0af41c 100644 --- a/kombu-stubs/__init__.pyi +++ b/kombu-stubs/__init__.pyi @@ -2,6 +2,7 @@ from collections.abc import Callable, Generator from typing import Any from uuid import UUID +from kombu import pools as pools from kombu.connection import Connection as Connection from kombu.entity import Exchange as Exchange from kombu.entity import Queue as Queue diff --git a/kombu-stubs/asynchronous/http/base.pyi b/kombu-stubs/asynchronous/http/base.pyi index e2adbdd..af4e574 100644 --- a/kombu-stubs/asynchronous/http/base.pyi +++ b/kombu-stubs/asynchronous/http/base.pyi @@ -1,7 +1,9 @@ from collections.abc import Callable, Mapping from io import BytesIO from types import TracebackType -from typing import Any, Self +from typing import Any + +from typing_extensions import Self __all__ = ("Headers", "Request", "Response") diff --git a/kombu-stubs/asynchronous/semaphore.pyi b/kombu-stubs/asynchronous/semaphore.pyi index 4a0bda3..2c98afd 100644 --- a/kombu-stubs/asynchronous/semaphore.pyi +++ b/kombu-stubs/asynchronous/semaphore.pyi @@ -1,6 +1,8 @@ from collections.abc import Callable from types import TracebackType -from typing import Any, Self +from typing import Any + +from typing_extensions import Self __all__ = ("DummyLock", "LaxBoundedSemaphore") diff --git a/kombu-stubs/asynchronous/timer.pyi b/kombu-stubs/asynchronous/timer.pyi index 747446a..07baf5e 100644 --- a/kombu-stubs/asynchronous/timer.pyi +++ b/kombu-stubs/asynchronous/timer.pyi @@ -1,9 +1,11 @@ from collections.abc import Callable, Iterator from datetime import datetime from types import TracebackType -from typing import Any, NamedTuple, Self +from typing import Any, NamedTuple from zoneinfo import ZoneInfo +from typing_extensions import Self + __all__ = ("Entry", "Timer", "to_timestamp") class scheduled(NamedTuple): diff --git a/kombu-stubs/clocks.pyi b/kombu-stubs/clocks.pyi index 78aa8c9..befb1a2 100644 --- a/kombu-stubs/clocks.pyi +++ b/kombu-stubs/clocks.pyi @@ -1,5 +1,7 @@ from threading import Lock -from typing import Any, Self +from typing import Any + +from typing_extensions import Self __all__ = ("LamportClock", "timetuple") diff --git a/kombu-stubs/compat.pyi b/kombu-stubs/compat.pyi index e2f2c92..1e11d06 100644 --- a/kombu-stubs/compat.pyi +++ b/kombu-stubs/compat.pyi @@ -1,6 +1,6 @@ from collections.abc import Generator, Iterable, Iterator from types import TracebackType -from typing import Any, Self +from typing import Any from kombu.connection import Connection from kombu.entity import Exchange, Queue @@ -8,6 +8,7 @@ from kombu.message import Message from kombu.messaging import Consumer as _Consumer from kombu.messaging import Producer from kombu.transport.base import StdChannel +from typing_extensions import Self __all__ = ("Consumer", "Publisher") diff --git a/kombu-stubs/transport/base.pyi b/kombu-stubs/transport/base.pyi index b6ba847..c91e120 100644 --- a/kombu-stubs/transport/base.pyi +++ b/kombu-stubs/transport/base.pyi @@ -1,10 +1,11 @@ import types -from typing import Any, Self, TypeAlias +from typing import Any, TypeAlias from kombu.connection import Connection from kombu.message import Message as Message from kombu.messaging import Consumer, Producer from kombu.utils.objects import cached_property +from typing_extensions import Self __all__ = ("Management", "Message", "StdChannel", "Transport") diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi index 97c694f..81e116a 100644 --- a/kombu-stubs/transport/redis.pyi +++ b/kombu-stubs/transport/redis.pyi @@ -4,11 +4,12 @@ from logging import Logger from typing import Any, NamedTuple import redis as redis_module -import redis.client from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import QoS as VirtualQoS from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from redis.client import Pipeline as _RedisPipeline +from redis.client import PubSub as _RedisPubSub logger: Logger crit: Callable[..., None] @@ -51,12 +52,12 @@ class PrefixedStrictRedis(GlobalKeyPrefixMixin, redis_module.Redis): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def pubsub(self, **kwargs: Any) -> PrefixedRedisPubSub: ... -class PrefixedRedisPipeline(GlobalKeyPrefixMixin, redis_module.client.Pipeline): +class PrefixedRedisPipeline(GlobalKeyPrefixMixin, _RedisPipeline): global_keyprefix: str def __init__(self, *args: Any, **kwargs: Any) -> None: ... -class PrefixedRedisPubSub(redis_module.client.PubSub): +class PrefixedRedisPubSub(_RedisPubSub): PUBSUB_COMMANDS: tuple[str, ...] global_keyprefix: str diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi index 203f47e..8018252 100644 --- a/kombu-stubs/transport/virtual/base.pyi +++ b/kombu-stubs/transport/virtual/base.pyi @@ -2,7 +2,7 @@ import logging import types from collections import OrderedDict from collections.abc import Callable, Generator, Iterable -from typing import Any, NamedTuple, Self, TypeAlias +from typing import Any, NamedTuple, TypeAlias from kombu.connection import Connection from kombu.message import Message as BaseMessage @@ -11,6 +11,7 @@ from kombu.transport.base import StdChannel from kombu.transport.base import Transport as BaseTransport from kombu.transport.virtual.exchange import ExchangeType from kombu.utils.scheduling import FairCycle +from typing_extensions import Self ARRAY_TYPE_H: str NOT_EQUIVALENT_FMT: str diff --git a/kombu-stubs/utils/functional.pyi b/kombu-stubs/utils/functional.pyi index 3c0e614..e81e7ec 100644 --- a/kombu-stubs/utils/functional.pyi +++ b/kombu-stubs/utils/functional.pyi @@ -36,7 +36,7 @@ class LRUCache(UserDict[_KT, _VT]): def memoize( maxsize: int | None = ..., keyfun: Callable[..., Any] | None = ..., - Cache: type[LRUCache[Any, Any]] = ..., + Cache: type[LRUCache[Any, Any] | dict[Any, Any]] = ..., ) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ... class lazy: diff --git a/pyproject.toml b/pyproject.toml index 2f2e285..0f42842 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,6 +89,11 @@ reportUnusedParameter = false reportUnusedFunction = false reportPrivateUsage = false reportUnannotatedClassAttribute = false +# Stubs describe existing code where subclasses legitimately override +# class variables and method signatures with different types +reportIncompatibleVariableOverride = false +reportIncompatibleMethodOverride = false +reportImplicitOverride = false [tool.mypy] From 846ffe78a76edde976ed7b5a198130d40da1aa2a Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sun, 4 Jan 2026 01:30:15 +0100 Subject: [PATCH 16/24] Remove unnecessary pyright ignore comments --- celery-stubs/bootsteps.pyi | 4 ++-- celery-stubs/canvas.pyi | 2 +- celery-stubs/contrib/abortable.pyi | 2 +- celery-stubs/contrib/rdb.pyi | 4 ++-- celery-stubs/contrib/sphinx.pyi | 2 +- celery-stubs/worker/autoscale.pyi | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/celery-stubs/bootsteps.pyi b/celery-stubs/bootsteps.pyi index 563f442..4a4565e 100644 --- a/celery-stubs/bootsteps.pyi +++ b/celery-stubs/bootsteps.pyi @@ -97,11 +97,11 @@ class ConsumerStep(StartStopStep): consumers: list[Consumer] | None def get_consumers(self, channel: Any) -> list[Consumer]: ... @override - def start( # pyright: ignore[reportIncompatibleMethodOverride] + def start( self, c: Any ) -> None: ... @override - def stop( # pyright: ignore[reportIncompatibleMethodOverride] + def stop( self, c: Any ) -> None: ... def shutdown(self, c: Any) -> None: ... diff --git a/celery-stubs/canvas.pyi b/celery-stubs/canvas.pyi index 0d71895..7fe05e2 100644 --- a/celery-stubs/canvas.pyi +++ b/celery-stubs/canvas.pyi @@ -170,7 +170,7 @@ class Signature(dict[str, Any], Generic[_R_co]): def flatten_links(self) -> list[Signature[Any]]: ... # TODO(sbdchd): use overloads to properly type this @override - def __or__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def __or__( # type: ignore[override] self, other: Signature[Any] ) -> Signature[Any]: ... def election(self) -> celery.result.AsyncResult[_R_co]: ... diff --git a/celery-stubs/contrib/abortable.pyi b/celery-stubs/contrib/abortable.pyi index da61dbc..32946dc 100644 --- a/celery-stubs/contrib/abortable.pyi +++ b/celery-stubs/contrib/abortable.pyi @@ -19,5 +19,5 @@ class AbortableTask(Task[_P, _R_co], Generic[_P, _R_co]): abstract: bool = True @override - def AsyncResult(self, task_id: str) -> AbortableAsyncResult[_R_co]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def AsyncResult(self, task_id: str) -> AbortableAsyncResult[_R_co]: ... # type: ignore[override] def is_aborted(self, *, task_id: str, **kwargs: Any) -> bool: ... diff --git a/celery-stubs/contrib/rdb.pyi b/celery-stubs/contrib/rdb.pyi index 344b5f8..e4759c9 100644 --- a/celery-stubs/contrib/rdb.pyi +++ b/celery-stubs/contrib/rdb.pyi @@ -50,13 +50,13 @@ class Rdb(Pdb, AbstractContextManager[Rdb]): tb: TracebackType | None, ) -> bool | None: ... @override - def do_continue(self, arg: object) -> Literal[1]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def do_continue(self, arg: object) -> Literal[1]: ... # type: ignore[override] do_cont = do_continue # type: ignore[assignment] do_c = do_continue # type: ignore[assignment] @override - def do_quit(self, arg: object) -> Literal[1]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def do_quit(self, arg: object) -> Literal[1]: ... # type: ignore[override] do_exit = do_quit # type: ignore[assignment] do_q = do_quit # type: ignore[assignment] diff --git a/celery-stubs/contrib/sphinx.pyi b/celery-stubs/contrib/sphinx.pyi index b3a5e67..71600dd 100644 --- a/celery-stubs/contrib/sphinx.pyi +++ b/celery-stubs/contrib/sphinx.pyi @@ -20,7 +20,7 @@ class TaskDocumenter(FunctionDocumenter): parent: Any, ) -> bool: ... @override - def format_args(self) -> str: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def format_args(self) -> str: ... # type: ignore[override] @override def document_members(self, all_members: bool = False) -> None: ... @override diff --git a/celery-stubs/worker/autoscale.pyi b/celery-stubs/worker/autoscale.pyi index 69c1823..e5690e5 100644 --- a/celery-stubs/worker/autoscale.pyi +++ b/celery-stubs/worker/autoscale.pyi @@ -9,12 +9,12 @@ class WorkerComponent(StartStopStep): enabled: Any def __init__(self, w: Any, **kwargs: Any) -> None: ... @override - def create( # pyright: ignore[reportIncompatibleMethodOverride] + def create( self, w: Any ) -> Any: ... def register_with_event_loop(self, w: Any, hub: Any) -> None: ... @override - def info( # pyright: ignore[reportIncompatibleMethodOverride] + def info( self, w: Any ) -> Any: ... From dfc7a257ba31c9fb50923729926fc7e539e8d47e Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sun, 4 Jan 2026 01:43:59 +0100 Subject: [PATCH 17/24] Use inline pyright ignores instead of global disables Replace global pyright check disables in pyproject.toml with inline # pyright: ignore[...] comments on specific lines. This follows the same pattern used in celery-stubs for handling legitimate type mismatches in stub files where subclasses override parent signatures. Changes: - Remove reportIncompatibleVariableOverride, reportIncompatibleMethodOverride, and reportImplicitOverride from pyproject.toml - Add inline pyright ignore comments to amqp-stubs, kombu-stubs, and celery-stubs where type overrides are intentional --- amqp-stubs/sasl.pyi | 12 +++++----- celery-stubs/bootsteps.pyi | 4 ++-- celery-stubs/canvas.pyi | 2 +- celery-stubs/contrib/abortable.pyi | 2 +- celery-stubs/contrib/rdb.pyi | 4 ++-- celery-stubs/contrib/sphinx.pyi | 2 +- celery-stubs/worker/autoscale.pyi | 4 ++-- .../asynchronous/aws/sqs/connection.pyi | 2 +- kombu-stubs/compat.pyi | 2 +- kombu-stubs/connection.pyi | 4 ++-- kombu-stubs/pools.pyi | 4 ++-- kombu-stubs/transport/SLMQ.pyi | 6 ++--- kombu-stubs/transport/SQS.pyi | 14 ++++++------ kombu-stubs/transport/azureservicebus.pyi | 10 ++++----- kombu-stubs/transport/azurestoragequeues.pyi | 6 ++--- kombu-stubs/transport/confluentkafka.pyi | 12 +++++----- kombu-stubs/transport/consul.pyi | 2 +- kombu-stubs/transport/etcd.pyi | 2 +- kombu-stubs/transport/filesystem.pyi | 2 +- kombu-stubs/transport/gcpubsub.pyi | 6 ++--- kombu-stubs/transport/memory.pyi | 2 +- kombu-stubs/transport/mongodb.pyi | 14 ++++++------ kombu-stubs/transport/pyamqp.pyi | 16 +++++++------- kombu-stubs/transport/pyro.pyi | 6 ++--- kombu-stubs/transport/qpid.pyi | 22 +++++++++---------- kombu-stubs/transport/redis.pyi | 20 ++++++++--------- kombu-stubs/transport/sqlalchemy/__init__.pyi | 6 ++--- kombu-stubs/transport/virtual/base.pyi | 8 +++---- kombu-stubs/transport/virtual/exchange.pyi | 6 ++--- kombu-stubs/transport/zookeeper.pyi | 6 ++--- kombu-stubs/utils/collections.pyi | 2 +- pyproject.toml | 5 ----- 32 files changed, 105 insertions(+), 110 deletions(-) diff --git a/amqp-stubs/sasl.pyi b/amqp-stubs/sasl.pyi index 33e933d..a6cfaf3 100644 --- a/amqp-stubs/sasl.pyi +++ b/amqp-stubs/sasl.pyi @@ -6,7 +6,7 @@ class SASL: def start(self, connection: Any) -> bytes | None: ... class PLAIN(SASL): - mechanism: bytes + mechanism: bytes # pyright: ignore[reportIncompatibleMethodOverride] username: str password: str @@ -14,7 +14,7 @@ class PLAIN(SASL): def start(self, connection: Any) -> bytes: ... class AMQPLAIN(SASL): - mechanism: bytes + mechanism: bytes # pyright: ignore[reportIncompatibleMethodOverride] username: str password: str @@ -22,19 +22,19 @@ class AMQPLAIN(SASL): def start(self, connection: Any) -> bytes: ... class EXTERNAL(SASL): - mechanism: bytes + mechanism: bytes # pyright: ignore[reportIncompatibleMethodOverride] def start(self, connection: Any) -> bytes: ... class RAW(SASL): - mechanism: bytes | None + mechanism: bytes | None # pyright: ignore[reportIncompatibleMethodOverride] response: bytes | None def __init__(self, mechanism: bytes | None, response: bytes | None) -> None: ... def start(self, connection: Any) -> bytes | None: ... class GSSAPI(SASL): - mechanism: bytes | None + mechanism: bytes | None # pyright: ignore[reportIncompatibleMethodOverride] client_name: str | None service: bytes rdns: bool @@ -47,4 +47,4 @@ class GSSAPI(SASL): rdns: bool = ..., fail_soft: bool = ..., ) -> None: ... - def start(self) -> bytes | None: ... # type: ignore[override] + def start(self) -> bytes | None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] diff --git a/celery-stubs/bootsteps.pyi b/celery-stubs/bootsteps.pyi index 4a4565e..563f442 100644 --- a/celery-stubs/bootsteps.pyi +++ b/celery-stubs/bootsteps.pyi @@ -97,11 +97,11 @@ class ConsumerStep(StartStopStep): consumers: list[Consumer] | None def get_consumers(self, channel: Any) -> list[Consumer]: ... @override - def start( + def start( # pyright: ignore[reportIncompatibleMethodOverride] self, c: Any ) -> None: ... @override - def stop( + def stop( # pyright: ignore[reportIncompatibleMethodOverride] self, c: Any ) -> None: ... def shutdown(self, c: Any) -> None: ... diff --git a/celery-stubs/canvas.pyi b/celery-stubs/canvas.pyi index 7fe05e2..0d71895 100644 --- a/celery-stubs/canvas.pyi +++ b/celery-stubs/canvas.pyi @@ -170,7 +170,7 @@ class Signature(dict[str, Any], Generic[_R_co]): def flatten_links(self) -> list[Signature[Any]]: ... # TODO(sbdchd): use overloads to properly type this @override - def __or__( # type: ignore[override] + def __or__( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, other: Signature[Any] ) -> Signature[Any]: ... def election(self) -> celery.result.AsyncResult[_R_co]: ... diff --git a/celery-stubs/contrib/abortable.pyi b/celery-stubs/contrib/abortable.pyi index 32946dc..da61dbc 100644 --- a/celery-stubs/contrib/abortable.pyi +++ b/celery-stubs/contrib/abortable.pyi @@ -19,5 +19,5 @@ class AbortableTask(Task[_P, _R_co], Generic[_P, _R_co]): abstract: bool = True @override - def AsyncResult(self, task_id: str) -> AbortableAsyncResult[_R_co]: ... # type: ignore[override] + def AsyncResult(self, task_id: str) -> AbortableAsyncResult[_R_co]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def is_aborted(self, *, task_id: str, **kwargs: Any) -> bool: ... diff --git a/celery-stubs/contrib/rdb.pyi b/celery-stubs/contrib/rdb.pyi index e4759c9..344b5f8 100644 --- a/celery-stubs/contrib/rdb.pyi +++ b/celery-stubs/contrib/rdb.pyi @@ -50,13 +50,13 @@ class Rdb(Pdb, AbstractContextManager[Rdb]): tb: TracebackType | None, ) -> bool | None: ... @override - def do_continue(self, arg: object) -> Literal[1]: ... # type: ignore[override] + def do_continue(self, arg: object) -> Literal[1]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] do_cont = do_continue # type: ignore[assignment] do_c = do_continue # type: ignore[assignment] @override - def do_quit(self, arg: object) -> Literal[1]: ... # type: ignore[override] + def do_quit(self, arg: object) -> Literal[1]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] do_exit = do_quit # type: ignore[assignment] do_q = do_quit # type: ignore[assignment] diff --git a/celery-stubs/contrib/sphinx.pyi b/celery-stubs/contrib/sphinx.pyi index 71600dd..b3a5e67 100644 --- a/celery-stubs/contrib/sphinx.pyi +++ b/celery-stubs/contrib/sphinx.pyi @@ -20,7 +20,7 @@ class TaskDocumenter(FunctionDocumenter): parent: Any, ) -> bool: ... @override - def format_args(self) -> str: ... # type: ignore[override] + def format_args(self) -> str: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @override def document_members(self, all_members: bool = False) -> None: ... @override diff --git a/celery-stubs/worker/autoscale.pyi b/celery-stubs/worker/autoscale.pyi index e5690e5..69c1823 100644 --- a/celery-stubs/worker/autoscale.pyi +++ b/celery-stubs/worker/autoscale.pyi @@ -9,12 +9,12 @@ class WorkerComponent(StartStopStep): enabled: Any def __init__(self, w: Any, **kwargs: Any) -> None: ... @override - def create( + def create( # pyright: ignore[reportIncompatibleMethodOverride] self, w: Any ) -> Any: ... def register_with_event_loop(self, w: Any, hub: Any) -> None: ... @override - def info( + def info( # pyright: ignore[reportIncompatibleMethodOverride] self, w: Any ) -> Any: ... diff --git a/kombu-stubs/asynchronous/aws/sqs/connection.pyi b/kombu-stubs/asynchronous/aws/sqs/connection.pyi index fb56fba..9d5f652 100644 --- a/kombu-stubs/asynchronous/aws/sqs/connection.pyi +++ b/kombu-stubs/asynchronous/aws/sqs/connection.pyi @@ -19,7 +19,7 @@ class AsyncSQSConnection(AsyncAWSQueryConnection): message_attribute_names: list[str] | None = ..., **kwargs: Any, ) -> None: ... - def make_request( + def make_request( # pyright: ignore[reportIncompatibleMethodOverride] self, operation_name: str, params: dict[str, Any], diff --git a/kombu-stubs/compat.pyi b/kombu-stubs/compat.pyi index 1e11d06..efc0727 100644 --- a/kombu-stubs/compat.pyi +++ b/kombu-stubs/compat.pyi @@ -15,7 +15,7 @@ __all__ = ("Consumer", "Publisher") def entry_to_queue(queue: str, **options: Any) -> Queue: ... class Publisher(Producer): - exchange: Exchange | str # type: ignore[assignment] + exchange: Exchange | str # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] exchange_type: str routing_key: str durable: bool diff --git a/kombu-stubs/connection.pyi b/kombu-stubs/connection.pyi index a427454..2e81644 100644 --- a/kombu-stubs/connection.pyi +++ b/kombu-stubs/connection.pyi @@ -225,7 +225,7 @@ class ConnectionPool(Resource): self, connection: Connection, limit: int | None = ..., **kwargs: Any ) -> None: ... def new(self) -> Connection: ... - def prepare(self, resource: Connection) -> Connection: ... + def prepare(self, resource: Connection) -> Connection: ... # pyright: ignore[reportIncompatibleMethodOverride] def release_resource(self, resource: Connection) -> None: ... def close_resource(self, resource: Connection) -> None: ... def collect_resource( @@ -243,6 +243,6 @@ class ChannelPool(Resource): self, connection: Connection, limit: int | None = ..., **kwargs: Any ) -> None: ... def new(self) -> StdChannel: ... - def prepare(self, channel: StdChannel) -> StdChannel: ... + def prepare(self, channel: StdChannel) -> StdChannel: ... # pyright: ignore[reportIncompatibleMethodOverride] def release_resource(self, resource: StdChannel) -> None: ... def close_resource(self, resource: StdChannel) -> None: ... diff --git a/kombu-stubs/pools.pyi b/kombu-stubs/pools.pyi index c374383..e4f5cf6 100644 --- a/kombu-stubs/pools.pyi +++ b/kombu-stubs/pools.pyi @@ -24,10 +24,10 @@ class PoolGroup(dict[Any, Any]): def create(self, resource: Any, limit: int | None) -> Any: ... class Connections(PoolGroup): - def create(self, connection: Connection, limit: int | None) -> ConnectionPool: ... + def create(self, connection: Connection, limit: int | None) -> ConnectionPool: ... # pyright: ignore[reportIncompatibleMethodOverride] class Producers(PoolGroup): - def create(self, connection: Connection, limit: int | None) -> ProducerPool: ... + def create(self, connection: Connection, limit: int | None) -> ProducerPool: ... # pyright: ignore[reportIncompatibleMethodOverride] class ProducerPool: Producer: type[_ProducerType] diff --git a/kombu-stubs/transport/SLMQ.pyi b/kombu-stubs/transport/SLMQ.pyi index 6759929..e9cdd74 100644 --- a/kombu-stubs/transport/SLMQ.pyi +++ b/kombu-stubs/transport/SLMQ.pyi @@ -19,7 +19,7 @@ class Channel(VirtualChannel): ) -> str: ... def basic_cancel(self, consumer_tag: str) -> None: ... def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... - def basic_ack(self, delivery_tag: int) -> None: ... # type: ignore[override] + def basic_ack(self, delivery_tag: int) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def delete_message(self, queue: str, message_id: str) -> None: ... @property def visibility_timeout(self) -> int: ... @@ -35,7 +35,7 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str - connection_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] + connection_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/kombu-stubs/transport/SQS.pyi b/kombu-stubs/transport/SQS.pyi index 5c8aab0..99b22d5 100644 --- a/kombu-stubs/transport/SQS.pyi +++ b/kombu-stubs/transport/SQS.pyi @@ -44,7 +44,7 @@ class Channel(VirtualChannel): _predefined_queue_clients: dict[str, Any] _queue_cache: dict[str, str] _noack_queues: set[str] - QoS: type[_QoS] + QoS: type[_QoS] # pyright: ignore[reportIncompatibleVariableOverride] B64_REGEX: re.Pattern[bytes] def __init__(self, *args: Any, **kwargs: Any) -> None: ... @@ -85,7 +85,7 @@ class Channel(VirtualChannel): @cached_property def queue_name_prefix(self) -> str: ... @cached_property - def supports_fanout(self) -> bool: ... + def supports_fanout(self) -> bool: ... # pyright: ignore[reportIncompatibleVariableOverride] @cached_property def region(self) -> str: ... @cached_property @@ -108,13 +108,13 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] - polling_interval: int + polling_interval: int # pyright: ignore[reportIncompatibleVariableOverride] wait_time_seconds: int - default_port: None - connection_errors: tuple[type[Exception], ...] - channel_errors: tuple[type[Exception], ...] + default_port: None # pyright: ignore[reportIncompatibleVariableOverride] + connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + channel_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str implements: Any diff --git a/kombu-stubs/transport/azureservicebus.pyi b/kombu-stubs/transport/azureservicebus.pyi index 9d2c27e..17425e0 100644 --- a/kombu-stubs/transport/azureservicebus.pyi +++ b/kombu-stubs/transport/azureservicebus.pyi @@ -37,7 +37,7 @@ class Channel(VirtualChannel): ) -> str: ... def basic_cancel(self, consumer_tag: str) -> None: ... def entity_name(self, name: str, table: dict[int, int] | None = ...) -> str: ... - def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... # type: ignore[override] + def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def close(self) -> None: ... @cached_property def queue_service(self) -> ServiceBusClient: ... @@ -65,13 +65,13 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] - polling_interval: int - default_port: None + polling_interval: int # pyright: ignore[reportIncompatibleVariableOverride] + default_port: None # pyright: ignore[reportIncompatibleVariableOverride] can_parse_url: bool @staticmethod def parse_uri(uri: str) -> tuple[str, Any]: ... @classmethod - def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... + def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... # pyright: ignore[reportIncompatibleMethodOverride] diff --git a/kombu-stubs/transport/azurestoragequeues.pyi b/kombu-stubs/transport/azurestoragequeues.pyi index 4445c42..e2cab7f 100644 --- a/kombu-stubs/transport/azurestoragequeues.pyi +++ b/kombu-stubs/transport/azurestoragequeues.pyi @@ -31,13 +31,13 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] - polling_interval: int + polling_interval: int # pyright: ignore[reportIncompatibleVariableOverride] default_port: int | None can_parse_url: bool @staticmethod def parse_uri(uri: str) -> tuple[Any, str]: ... @classmethod - def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... + def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... # pyright: ignore[reportIncompatibleMethodOverride] diff --git a/kombu-stubs/transport/confluentkafka.pyi b/kombu-stubs/transport/confluentkafka.pyi index 5e6ea16..1743de0 100644 --- a/kombu-stubs/transport/confluentkafka.pyi +++ b/kombu-stubs/transport/confluentkafka.pyi @@ -40,8 +40,8 @@ class QoS(VirtualQoS): _QoS = QoS class Channel(VirtualChannel): - QoS: type[_QoS] - Message: type[_Message] + QoS: type[_QoS] # pyright: ignore[reportIncompatibleVariableOverride] + Message: type[_Message] # pyright: ignore[reportIncompatibleVariableOverride] default_wait_time_seconds: int default_connection_wait_time_seconds: int @@ -65,15 +65,15 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] - default_port: int + default_port: int # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str - recoverable_connection_errors: tuple[type[Exception], ...] + recoverable_connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, client: Any, **kwargs: Any) -> None: ... - def as_uri( # type: ignore[override] + def as_uri( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, uri: str, include_password: bool = ..., mask: str = ... ) -> None: ... def driver_version(self) -> str: ... diff --git a/kombu-stubs/transport/consul.pyi b/kombu-stubs/transport/consul.pyi index 6291ff4..74671f2 100644 --- a/kombu-stubs/transport/consul.pyi +++ b/kombu-stubs/transport/consul.pyi @@ -22,6 +22,6 @@ class Channel(VirtualChannel): def __init__(self, *args: Any, **kwargs: Any) -> None: ... class Transport(VirtualTransport): - Channel: type[Channel] + Channel: type[Channel] # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str diff --git a/kombu-stubs/transport/etcd.pyi b/kombu-stubs/transport/etcd.pyi index cbd174e..19a96f7 100644 --- a/kombu-stubs/transport/etcd.pyi +++ b/kombu-stubs/transport/etcd.pyi @@ -21,6 +21,6 @@ class Channel(VirtualChannel): def __init__(self, *args: Any, **kwargs: Any) -> None: ... class Transport(VirtualTransport): - Channel: type[Channel] + Channel: type[Channel] # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str diff --git a/kombu-stubs/transport/filesystem.pyi b/kombu-stubs/transport/filesystem.pyi index 6a2bd77..21e756e 100644 --- a/kombu-stubs/transport/filesystem.pyi +++ b/kombu-stubs/transport/filesystem.pyi @@ -33,7 +33,7 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str global_state: BrokerState diff --git a/kombu-stubs/transport/gcpubsub.pyi b/kombu-stubs/transport/gcpubsub.pyi index 6b99031..2f52e7d 100644 --- a/kombu-stubs/transport/gcpubsub.pyi +++ b/kombu-stubs/transport/gcpubsub.pyi @@ -82,9 +82,9 @@ class Channel(virtual.Channel): _Channel = Channel class Transport(virtual.Transport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] can_parse_url: bool - polling_interval: float + polling_interval: float # pyright: ignore[reportIncompatibleVariableOverride] connection_errors: tuple[type[BaseException], ...] channel_errors: tuple[type[BaseException], ...] driver_type: str @@ -96,5 +96,5 @@ class Transport(virtual.Transport): @staticmethod def parse_uri(uri: str) -> str: ... @classmethod - def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... + def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... # pyright: ignore[reportIncompatibleMethodOverride] def drain_events(self, connection: Any, timeout: float | None = ...) -> None: ... # type: ignore[override] diff --git a/kombu-stubs/transport/memory.pyi b/kombu-stubs/transport/memory.pyi index bb16682..35c867e 100644 --- a/kombu-stubs/transport/memory.pyi +++ b/kombu-stubs/transport/memory.pyi @@ -18,7 +18,7 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] default_port: int | None driver_type: str driver_name: str diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi index 2b1af28..1f89c92 100644 --- a/kombu-stubs/transport/mongodb.pyi +++ b/kombu-stubs/transport/mongodb.pyi @@ -42,8 +42,8 @@ class Channel(VirtualChannel): from_transport_options: tuple[str, ...] def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def get_table(self, exchange: str) -> frozenset[tuple[str, str, str]]: ... # type: ignore[override] - def queue_delete( # type: ignore[override] + def get_table(self, exchange: str) -> frozenset[tuple[str, str, str]]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def queue_delete( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, queue: str, **kwargs: Any ) -> int | None: ... def prepare_queue_arguments( @@ -64,13 +64,13 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] can_parse_url: bool - polling_interval: int - default_port: int - connection_errors: tuple[type[Exception], ...] - channel_errors: tuple[type[Exception], ...] + polling_interval: int # pyright: ignore[reportIncompatibleVariableOverride] + default_port: int # pyright: ignore[reportIncompatibleVariableOverride] + connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + channel_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str implements: Any diff --git a/kombu-stubs/transport/pyamqp.pyi b/kombu-stubs/transport/pyamqp.pyi index 654c524..70922e7 100644 --- a/kombu-stubs/transport/pyamqp.pyi +++ b/kombu-stubs/transport/pyamqp.pyi @@ -14,7 +14,7 @@ class Message(BaseMessage): _Message = Message class Channel(amqp.Channel, StdChannel): - Message: type[_Message] # type: ignore[assignment] + Message: type[_Message] # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] def prepare_message( self, @@ -26,7 +26,7 @@ class Channel(amqp.Channel, StdChannel): properties: dict[str, Any] | None = ..., _Message: type[amqp.Message] = ..., ) -> amqp.Message: ... - def prepare_queue_arguments( # type: ignore[override] + def prepare_queue_arguments( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, arguments: dict[str, Any], **kwargs: Any ) -> dict[str, Any]: ... def message_to_python(self, raw_message: Any) -> _Message: ... @@ -34,16 +34,16 @@ class Channel(amqp.Channel, StdChannel): _Connection = amqp.Connection class Connection(amqp.Connection): - Channel: type[Channel] + Channel: type[Channel] # pyright: ignore[reportIncompatibleVariableOverride] class Transport(BaseTransport): Connection: type[_Connection] - default_port: int + default_port: int # pyright: ignore[reportIncompatibleVariableOverride] default_ssl_port: int - connection_errors: tuple[type[Exception], ...] - channel_errors: tuple[type[Exception], ...] - recoverable_connection_errors: tuple[type[Exception], ...] - recoverable_channel_errors: tuple[type[Exception], ...] + connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + channel_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + recoverable_connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + recoverable_channel_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] driver_name: str driver_type: str diff --git a/kombu-stubs/transport/pyro.pyi b/kombu-stubs/transport/pyro.pyi index 10e54e4..ff5811b 100644 --- a/kombu-stubs/transport/pyro.pyi +++ b/kombu-stubs/transport/pyro.pyi @@ -21,11 +21,11 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str - connection_errors: tuple[type[Exception], ...] - channel_errors: tuple[type[Exception], ...] + connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + channel_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] global_state: BrokerState @cached_property def shared_queues(self) -> Any: ... diff --git a/kombu-stubs/transport/qpid.pyi b/kombu-stubs/transport/qpid.pyi index ca0d315..5664ccd 100644 --- a/kombu-stubs/transport/qpid.pyi +++ b/kombu-stubs/transport/qpid.pyi @@ -31,11 +31,11 @@ _QoS = QoS class Channel(VirtualChannel): Message: type[_Message] - QoS: type[_QoS] + QoS: type[_QoS] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, connection: Any, transport: Any) -> None: ... def close(self) -> None: ... - def queue_declare( # type: ignore[override] + def queue_declare( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, queue: str, passive: bool = ..., @@ -45,23 +45,23 @@ class Channel(VirtualChannel): nowait: bool = ..., arguments: dict[str, Any] | None = ..., ) -> Any: ... - def exchange_declare( # type: ignore[override] + def exchange_declare( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, exchange: str = ..., type: str = ..., durable: bool = ..., **kwargs: Any, ) -> None: ... - def exchange_delete( # type: ignore[override] + def exchange_delete( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, exchange_name: str, **kwargs: Any ) -> None: ... - def queue_bind( # type: ignore[override] + def queue_bind( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, queue: str, exchange: str, routing_key: str, **kwargs: Any ) -> None: ... - def queue_unbind( # type: ignore[override] + def queue_unbind( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, queue: str, exchange: str, routing_key: str, **kwargs: Any ) -> None: ... - def basic_qos( # type: ignore[override] + def basic_qos( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, prefetch_count: int, *args: Any ) -> None: ... @@ -73,10 +73,10 @@ class Transport(BaseTransport): driver_type: str driver_name: str polling_interval: None - connection_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] - channel_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] - recoverable_connection_errors: tuple[type[BaseException] | None, ...] # type: ignore[assignment] - recoverable_channel_errors: tuple[type[BaseException] | None, ...] # type: ignore[assignment] + connection_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] + channel_errors: tuple[type[Exception] | None, ...] # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] + recoverable_connection_errors: tuple[type[BaseException] | None, ...] # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] + recoverable_channel_errors: tuple[type[BaseException] | None, ...] # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] def __del__(self) -> None: ... def drain_events( diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi index 81e116a..95b6360 100644 --- a/kombu-stubs/transport/redis.pyi +++ b/kombu-stubs/transport/redis.pyi @@ -121,7 +121,7 @@ class MultiChannelPoller: _QoS = QoS class Channel(VirtualChannel): - QoS: type[_QoS] + QoS: type[_QoS] # pyright: ignore[reportIncompatibleVariableOverride] supports_fanout: bool keyprefix_queue: str @@ -184,22 +184,22 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] - polling_interval: None + polling_interval: None # pyright: ignore[reportIncompatibleVariableOverride] brpop_timeout: int - default_port: int + default_port: int # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str implements: Any - connection_errors: tuple[type[Exception], ...] - channel_errors: tuple[type[Exception], ...] - cycle: MultiChannelPoller | None # type: ignore[assignment] + connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + channel_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + cycle: MultiChannelPoller | None # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, *args: Any, **kwargs: Any) -> None: ... def driver_version(self) -> str: ... def register_with_event_loop(self, connection: Any, loop: Any) -> None: ... - def on_readable(self, fileno: int) -> None: ... # type: ignore[override] + def on_readable(self, fileno: int) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] class SentinelManagedSSLConnection: def __init__(self, **kwargs: Any) -> None: ... @@ -210,5 +210,5 @@ class SentinelChannel(Channel): connection_class_ssl: type[Any] | None class SentinelTransport(Transport): - default_port: int - Channel: type[SentinelChannel] + default_port: int # pyright: ignore[reportIncompatibleVariableOverride] + Channel: type[SentinelChannel] # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/kombu-stubs/transport/sqlalchemy/__init__.pyi b/kombu-stubs/transport/sqlalchemy/__init__.pyi index 791bd90..f17be2a 100644 --- a/kombu-stubs/transport/sqlalchemy/__init__.pyi +++ b/kombu-stubs/transport/sqlalchemy/__init__.pyi @@ -25,12 +25,12 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] can_parse_url: bool - default_port: int + default_port: int # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str - connection_errors: tuple[type[OperationalError], ...] + connection_errors: tuple[type[OperationalError], ...] # pyright: ignore[reportIncompatibleVariableOverride] def driver_version(self) -> str: ... diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi index 8018252..92a26e5 100644 --- a/kombu-stubs/transport/virtual/base.pyi +++ b/kombu-stubs/transport/virtual/base.pyi @@ -267,7 +267,7 @@ class Channel(AbstractChannel, StdChannel): def cycle(self) -> FairCycle: ... class Management(BaseManagement): - transport: Transport + transport: Transport # pyright: ignore[reportIncompatibleVariableOverride] channel: _ChannelType | None def __init__(self, transport: Transport) -> None: ... @@ -277,7 +277,7 @@ class Management(BaseManagement): class Transport(BaseTransport): Channel: type[_ChannelType] Cycle: type[FairCycle] - Management: type[Management] + Management: type[Management] # pyright: ignore[reportIncompatibleVariableOverride] polling_interval: float | None channel_max: int @@ -288,10 +288,10 @@ class Transport(BaseTransport): def __init__(self, client: Connection, **kwargs: Any) -> None: ... def create_channel(self, connection: Connection) -> _ChannelType: ... - def close_channel(self, channel: StdChannel) -> None: ... + def close_channel(self, channel: StdChannel) -> None: ... # pyright: ignore[reportIncompatibleMethodOverride] def establish_connection(self) -> Connection: ... def close_connection(self, connection: Connection) -> None: ... - def drain_events( # type: ignore[override] + def drain_events( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, connection: Connection, timeout: float | None = ... ) -> None: ... def on_message_ready( diff --git a/kombu-stubs/transport/virtual/exchange.pyi b/kombu-stubs/transport/virtual/exchange.pyi index f895274..2813186 100644 --- a/kombu-stubs/transport/virtual/exchange.pyi +++ b/kombu-stubs/transport/virtual/exchange.pyi @@ -32,7 +32,7 @@ class ExchangeType: ) -> bool: ... class DirectExchange(ExchangeType): - type: str + type: str # pyright: ignore[reportIncompatibleVariableOverride] def deliver( self, @@ -43,7 +43,7 @@ class DirectExchange(ExchangeType): ) -> None: ... class TopicExchange(ExchangeType): - type: str + type: str # pyright: ignore[reportIncompatibleVariableOverride] wildcards: dict[str, str] def key_to_pattern(self, rkey: str) -> Any: ... @@ -56,7 +56,7 @@ class TopicExchange(ExchangeType): ) -> None: ... class FanoutExchange(ExchangeType): - type: str + type: str # pyright: ignore[reportIncompatibleVariableOverride] def deliver( self, diff --git a/kombu-stubs/transport/zookeeper.pyi b/kombu-stubs/transport/zookeeper.pyi index 764d9d8..b5cf244 100644 --- a/kombu-stubs/transport/zookeeper.pyi +++ b/kombu-stubs/transport/zookeeper.pyi @@ -15,8 +15,8 @@ class Channel(VirtualChannel): _Channel = Channel class Transport(VirtualTransport): - Channel: type[_Channel] + Channel: type[_Channel] # pyright: ignore[reportIncompatibleVariableOverride] driver_type: str driver_name: str - connection_errors: tuple[type[Exception], ...] - channel_errors: tuple[type[Exception], ...] + connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] + channel_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/kombu-stubs/utils/collections.pyi b/kombu-stubs/utils/collections.pyi index a67398c..af2e77e 100644 --- a/kombu-stubs/utils/collections.pyi +++ b/kombu-stubs/utils/collections.pyi @@ -8,6 +8,6 @@ class HashedSeq(list[Any]): hashvalue: int def __init__(self, *seq: Any) -> None: ... - def __hash__(self) -> int: ... # type: ignore[override] + def __hash__(self) -> int: ... # type: ignore[override] # pyright: ignore[reportIncompatibleVariableOverride] def eqhash(o: Any) -> Hashable: ... diff --git a/pyproject.toml b/pyproject.toml index 0f42842..2f2e285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -89,11 +89,6 @@ reportUnusedParameter = false reportUnusedFunction = false reportPrivateUsage = false reportUnannotatedClassAttribute = false -# Stubs describe existing code where subclasses legitimately override -# class variables and method signatures with different types -reportIncompatibleVariableOverride = false -reportIncompatibleMethodOverride = false -reportImplicitOverride = false [tool.mypy] From 63824e2317a33c3e13f2beb1c6a5c0c93d1de213 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sun, 4 Jan 2026 10:16:33 +0100 Subject: [PATCH 18/24] Add @override decorators to kombu-stubs This addresses reportImplicitOverride warnings by adding explicit @override decorators from typing_extensions to all methods that override base class methods. This is consistent with the pattern used throughout celery-stubs. Also removes unnecessary pyright ignore comments where the override decorator makes them redundant. Reduces warnings from 135 to 15 (89% reduction). --- .../asynchronous/aws/sqs/connection.pyi | 2 ++ kombu-stubs/asynchronous/http/curl.pyi | 3 +++ kombu-stubs/clocks.pyi | 6 +++++- kombu-stubs/compat.pyi | 11 ++++++++++- kombu-stubs/connection.pyi | 11 +++++++++-- kombu-stubs/log.pyi | 3 +++ kombu-stubs/pools.pyi | 3 +++ kombu-stubs/transport/SLMQ.pyi | 4 ++++ kombu-stubs/transport/SQS.pyi | 8 ++++++++ kombu-stubs/transport/azureservicebus.pyi | 6 ++++++ kombu-stubs/transport/azurestoragequeues.pyi | 3 +++ kombu-stubs/transport/confluentkafka.pyi | 13 +++++++++++++ kombu-stubs/transport/gcpubsub.pyi | 7 +++++++ kombu-stubs/transport/memory.pyi | 2 ++ kombu-stubs/transport/mongodb.pyi | 6 ++++++ kombu-stubs/transport/pyamqp.pyi | 14 ++++++++++++++ kombu-stubs/transport/pyro.pyi | 2 ++ kombu-stubs/transport/qpid.pyi | 9 +++++++++ kombu-stubs/transport/redis.pyi | 18 +++++++++++++++++- kombu-stubs/transport/sqlalchemy/__init__.pyi | 2 ++ kombu-stubs/transport/virtual/base.pyi | 12 +++++++++++- kombu-stubs/utils/collections.pyi | 3 +++ kombu-stubs/utils/encodings.pyi | 1 + kombu-stubs/utils/functional.pyi | 3 +++ 24 files changed, 146 insertions(+), 6 deletions(-) create mode 100644 kombu-stubs/utils/encodings.pyi diff --git a/kombu-stubs/asynchronous/aws/sqs/connection.pyi b/kombu-stubs/asynchronous/aws/sqs/connection.pyi index 9d5f652..475a03a 100644 --- a/kombu-stubs/asynchronous/aws/sqs/connection.pyi +++ b/kombu-stubs/asynchronous/aws/sqs/connection.pyi @@ -2,6 +2,7 @@ from typing import Any from kombu.asynchronous.aws.connection import AsyncAWSQueryConnection from kombu.asynchronous.aws.sqs.queue import AsyncQueue +from typing_extensions import override from vine import promise __all__ = ("AsyncSQSConnection",) @@ -19,6 +20,7 @@ class AsyncSQSConnection(AsyncAWSQueryConnection): message_attribute_names: list[str] | None = ..., **kwargs: Any, ) -> None: ... + @override def make_request( # pyright: ignore[reportIncompatibleMethodOverride] self, operation_name: str, diff --git a/kombu-stubs/asynchronous/http/curl.pyi b/kombu-stubs/asynchronous/http/curl.pyi index 2696c1f..f442092 100644 --- a/kombu-stubs/asynchronous/http/curl.pyi +++ b/kombu-stubs/asynchronous/http/curl.pyi @@ -2,6 +2,7 @@ from typing import Any from kombu.asynchronous.http.base import BaseClient from kombu.asynchronous.hub import Hub +from typing_extensions import override __all__ = ("CurlClient",) @@ -17,7 +18,9 @@ class CurlClient(BaseClient): _timeout_check_tref: Any def __init__(self, hub: Hub | None = ..., max_clients: int = ...) -> None: ... + @override def close(self) -> None: ... + @override def add_request(self, request: Any) -> Any: ... def on_readable(self, fd: int, _pycurl: Any = ...) -> Any: ... def on_writable(self, fd: int, _pycurl: Any = ...) -> Any: ... diff --git a/kombu-stubs/clocks.pyi b/kombu-stubs/clocks.pyi index befb1a2..595d8ce 100644 --- a/kombu-stubs/clocks.pyi +++ b/kombu-stubs/clocks.pyi @@ -1,7 +1,7 @@ from threading import Lock from typing import Any -from typing_extensions import Self +from typing_extensions import Self, override __all__ = ("LamportClock", "timetuple") @@ -12,9 +12,13 @@ class timetuple(tuple[int | None, float, str, Any]): cls, clock: int | None, timestamp: float, id: str, obj: Any = ... ) -> Self: ... def __getnewargs__(self) -> tuple[int | None, float, str, Any]: ... + @override def __lt__(self, other: tuple[Any, ...]) -> bool: ... + @override def __gt__(self, other: tuple[Any, ...]) -> bool: ... + @override def __le__(self, other: tuple[Any, ...]) -> bool: ... + @override def __ge__(self, other: tuple[Any, ...]) -> bool: ... @property def clock(self) -> int | None: ... diff --git a/kombu-stubs/compat.pyi b/kombu-stubs/compat.pyi index efc0727..be146e1 100644 --- a/kombu-stubs/compat.pyi +++ b/kombu-stubs/compat.pyi @@ -8,7 +8,7 @@ from kombu.message import Message from kombu.messaging import Consumer as _Consumer from kombu.messaging import Producer from kombu.transport.base import StdChannel -from typing_extensions import Self +from typing_extensions import Self, override __all__ = ("Consumer", "Publisher") @@ -34,8 +34,11 @@ class Publisher(Producer): **kwargs: Any, ) -> None: ... def send(self, *args: Any, **kwargs: Any) -> Any: ... + @override def close(self) -> None: ... + @override def __enter__(self) -> Self: ... + @override def __exit__( self, exc_type: type[BaseException] | None, @@ -68,9 +71,13 @@ class Consumer(_Consumer): auto_delete: bool | None = ..., **kwargs: Any, ) -> None: ... + @override def revive(self, channel: StdChannel) -> None: ... + @override def close(self) -> None: ... + @override def __enter__(self) -> Self: ... + @override def __exit__( self, exc_type: type[BaseException] | None, @@ -109,5 +116,7 @@ class ConsumerSet(_Consumer): def discard_all(self) -> int: ... def add_consumer_from_dict(self, queue: str, **options: Any) -> Queue: ... def add_consumer(self, consumer: _Consumer) -> None: ... + @override def revive(self, channel: StdChannel) -> None: ... + @override def close(self) -> None: ... diff --git a/kombu-stubs/connection.pyi b/kombu-stubs/connection.pyi index 2e81644..8351554 100644 --- a/kombu-stubs/connection.pyi +++ b/kombu-stubs/connection.pyi @@ -6,7 +6,7 @@ from kombu.messaging import Consumer, Producer from kombu.simple import SimpleBuffer, SimpleQueue from kombu.transport.base import Management, StdChannel, Transport from kombu.utils.objects import cached_property -from typing_extensions import Self +from typing_extensions import Self, override __all__ = ("ChannelPool", "Connection", "ConnectionPool") @@ -225,9 +225,13 @@ class ConnectionPool(Resource): self, connection: Connection, limit: int | None = ..., **kwargs: Any ) -> None: ... def new(self) -> Connection: ... - def prepare(self, resource: Connection) -> Connection: ... # pyright: ignore[reportIncompatibleMethodOverride] + @override + def prepare(self, resource: Connection) -> Connection: ... + @override def release_resource(self, resource: Connection) -> None: ... + @override def close_resource(self, resource: Connection) -> None: ... + @override def collect_resource( self, resource: Connection, socket_timeout: float | None = ... ) -> None: ... @@ -243,6 +247,9 @@ class ChannelPool(Resource): self, connection: Connection, limit: int | None = ..., **kwargs: Any ) -> None: ... def new(self) -> StdChannel: ... + @override def prepare(self, channel: StdChannel) -> StdChannel: ... # pyright: ignore[reportIncompatibleMethodOverride] + @override def release_resource(self, resource: StdChannel) -> None: ... + @override def close_resource(self, resource: StdChannel) -> None: ... diff --git a/kombu-stubs/log.pyi b/kombu-stubs/log.pyi index b88206c..e95f5b3 100644 --- a/kombu-stubs/log.pyi +++ b/kombu-stubs/log.pyi @@ -2,6 +2,7 @@ from logging import Logger from typing import Any, TextIO from kombu.utils.objects import cached_property +from typing_extensions import override __all__ = ("LOG_LEVELS", "LogMixin", "get_loglevel", "setup_logging") @@ -29,8 +30,10 @@ class Log(LogMixin): _logger: Logger | None def __init__(self, name: str, logger: Logger | None = ...) -> None: ... + @override def get_logger(self) -> Logger: ... @property + @override def logger_name(self) -> str: ... def get_loglevel(level: str | int) -> int: ... diff --git a/kombu-stubs/pools.pyi b/kombu-stubs/pools.pyi index e4f5cf6..9274bde 100644 --- a/kombu-stubs/pools.pyi +++ b/kombu-stubs/pools.pyi @@ -2,6 +2,7 @@ from typing import Any, TypeAlias from kombu.connection import Connection, ConnectionPool from kombu.messaging import Producer +from typing_extensions import override __all__ = ( "PoolGroup", @@ -24,9 +25,11 @@ class PoolGroup(dict[Any, Any]): def create(self, resource: Any, limit: int | None) -> Any: ... class Connections(PoolGroup): + @override def create(self, connection: Connection, limit: int | None) -> ConnectionPool: ... # pyright: ignore[reportIncompatibleMethodOverride] class Producers(PoolGroup): + @override def create(self, connection: Connection, limit: int | None) -> ProducerPool: ... # pyright: ignore[reportIncompatibleMethodOverride] class ProducerPool: diff --git a/kombu-stubs/transport/SLMQ.pyi b/kombu-stubs/transport/SLMQ.pyi index e9cdd74..302257b 100644 --- a/kombu-stubs/transport/SLMQ.pyi +++ b/kombu-stubs/transport/SLMQ.pyi @@ -3,6 +3,7 @@ from typing import Any from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from typing_extensions import override CHARS_REPLACE_TABLE: dict[int, int] @@ -14,11 +15,14 @@ class Channel(VirtualChannel): _noack_queues: set[str] def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def basic_consume( self, queue: str, no_ack: bool, *args: Any, **kwargs: Any ) -> str: ... + @override def basic_cancel(self, consumer_tag: str) -> None: ... def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... + @override def basic_ack(self, delivery_tag: int) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def delete_message(self, queue: str, message_id: str) -> None: ... @property diff --git a/kombu-stubs/transport/SQS.pyi b/kombu-stubs/transport/SQS.pyi index 99b22d5..eb2b15c 100644 --- a/kombu-stubs/transport/SQS.pyi +++ b/kombu-stubs/transport/SQS.pyi @@ -6,6 +6,7 @@ from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import QoS as VirtualQoS from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from typing_extensions import override logger: Logger CHARS_REPLACE_TABLE: dict[int, int] @@ -19,6 +20,7 @@ class AccessDeniedQueueException(Exception): ... class DoesNotExistQueueException(Exception): ... class QoS(VirtualQoS): + @override def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... def apply_backoff_policy( self, @@ -48,16 +50,21 @@ class Channel(VirtualChannel): B64_REGEX: re.Pattern[bytes] def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def basic_consume( self, queue: str, no_ack: bool, *args: Any, **kwargs: Any ) -> str: ... + @override def basic_cancel(self, consumer_tag: str) -> Any: ... + @override def drain_events( self, timeout: float | None = ..., callback: Any | None = ..., **kwargs: Any ) -> None: ... def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... def canonical_queue_name(self, queue_name: str) -> str: ... + @override def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... + @override def close(self) -> None: ... def new_sqs_client( self, @@ -120,4 +127,5 @@ class Transport(VirtualTransport): implements: Any @property + @override def default_connection_params(self) -> dict[str, Any]: ... diff --git a/kombu-stubs/transport/azureservicebus.pyi b/kombu-stubs/transport/azureservicebus.pyi index 17425e0..cdf3853 100644 --- a/kombu-stubs/transport/azureservicebus.pyi +++ b/kombu-stubs/transport/azureservicebus.pyi @@ -5,6 +5,7 @@ from azure.servicebus.management import ServiceBusAdministrationClient from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from typing_extensions import override PUNCTUATIONS_TO_REPLACE: set[str] CHARS_REPLACE_TABLE: dict[int, int] @@ -32,12 +33,16 @@ class Channel(VirtualChannel): _noack_queues: set[str] def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def basic_consume( self, queue: str, no_ack: bool, *args: Any, **kwargs: Any ) -> str: ... + @override def basic_cancel(self, consumer_tag: str) -> None: ... def entity_name(self, name: str, table: dict[int, int] | None = ...) -> str: ... + @override def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + @override def close(self) -> None: ... @cached_property def queue_service(self) -> ServiceBusClient: ... @@ -74,4 +79,5 @@ class Transport(VirtualTransport): @staticmethod def parse_uri(uri: str) -> tuple[str, Any]: ... @classmethod + @override def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... # pyright: ignore[reportIncompatibleMethodOverride] diff --git a/kombu-stubs/transport/azurestoragequeues.pyi b/kombu-stubs/transport/azurestoragequeues.pyi index e2cab7f..5bb2a58 100644 --- a/kombu-stubs/transport/azurestoragequeues.pyi +++ b/kombu-stubs/transport/azurestoragequeues.pyi @@ -4,6 +4,7 @@ from azure.storage.queue import QueueServiceClient from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from typing_extensions import override CHARS_REPLACE_TABLE: dict[int, int] @@ -15,6 +16,7 @@ class Channel(VirtualChannel): _noack_queues: set[Any] def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def basic_consume( self, queue: str, no_ack: bool, *args: Any, **kwargs: Any ) -> str: ... @@ -40,4 +42,5 @@ class Transport(VirtualTransport): @staticmethod def parse_uri(uri: str) -> tuple[Any, str]: ... @classmethod + @override def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... # pyright: ignore[reportIncompatibleMethodOverride] diff --git a/kombu-stubs/transport/confluentkafka.pyi b/kombu-stubs/transport/confluentkafka.pyi index 1743de0..c6c80f4 100644 --- a/kombu-stubs/transport/confluentkafka.pyi +++ b/kombu-stubs/transport/confluentkafka.pyi @@ -8,6 +8,7 @@ from kombu.transport.virtual import Message as VirtualMessage from kombu.transport.virtual import QoS as VirtualQoS from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from typing_extensions import override logger: Logger DEFAULT_PORT: int @@ -29,12 +30,19 @@ _Message = Message class QoS(VirtualQoS): _not_yet_acked: dict[int, Any] + @override def can_consume(self) -> bool: ... + @override def can_consume_max_estimate(self) -> int: ... + @override def append(self, message: Any, delivery_tag: int) -> None: ... + @override def get(self, delivery_tag: int) -> Any: ... + @override def ack(self, delivery_tag: int) -> None: ... + @override def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + @override def restore_unacked_once(self, stderr: Any | None = ...) -> None: ... _QoS = QoS @@ -48,6 +56,7 @@ class Channel(VirtualChannel): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def sanitize_queue_name(self, queue: str) -> str: ... + @override def close(self) -> None: ... @property def client(self) -> AdminClient: ... @@ -73,9 +82,13 @@ class Transport(VirtualTransport): recoverable_connection_errors: tuple[type[Exception], ...] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, client: Any, **kwargs: Any) -> None: ... + @override def as_uri( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, uri: str, include_password: bool = ..., mask: str = ... ) -> None: ... + @override def driver_version(self) -> str: ... + @override def establish_connection(self) -> Any: ... + @override def close_connection(self, connection: Any) -> None: ... diff --git a/kombu-stubs/transport/gcpubsub.pyi b/kombu-stubs/transport/gcpubsub.pyi index 2f52e7d..07f2cee 100644 --- a/kombu-stubs/transport/gcpubsub.pyi +++ b/kombu-stubs/transport/gcpubsub.pyi @@ -10,6 +10,7 @@ from google.cloud.pubsub_v1 import ( # type: ignore[import-untyped] ) from kombu.transport import virtual from kombu.utils.objects import cached_property +from typing_extensions import override logger: Logger @@ -53,8 +54,11 @@ class Channel(virtual.Channel): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... + @override def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... + @override def after_reply_message_received(self, queue: str) -> None: ... + @override def close(self) -> None: ... @cached_property def subscriber(self) -> SubscriberClient: ... @@ -92,9 +96,12 @@ class Transport(virtual.Transport): implements: Any def __init__(self, client: Any, **kwargs: Any) -> None: ... + @override def driver_version(self) -> str: ... @staticmethod def parse_uri(uri: str) -> str: ... @classmethod + @override def as_uri(cls, uri: str, include_password: bool = ..., mask: str = ...) -> str: ... # pyright: ignore[reportIncompatibleMethodOverride] + @override def drain_events(self, connection: Any, timeout: float | None = ...) -> None: ... # type: ignore[override] diff --git a/kombu-stubs/transport/memory.pyi b/kombu-stubs/transport/memory.pyi index 35c867e..7d6dc53 100644 --- a/kombu-stubs/transport/memory.pyi +++ b/kombu-stubs/transport/memory.pyi @@ -5,6 +5,7 @@ from typing import Any from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.transport.virtual.base import BrokerState +from typing_extensions import override class Channel(VirtualChannel): events: defaultdict[str, set[Any]] @@ -13,6 +14,7 @@ class Channel(VirtualChannel): supports_fanout: bool def __init__(self, connection: Any, **kwargs: Any) -> None: ... + @override def close(self) -> None: ... _Channel = Channel diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi index 1f89c92..16483eb 100644 --- a/kombu-stubs/transport/mongodb.pyi +++ b/kombu-stubs/transport/mongodb.pyi @@ -8,6 +8,7 @@ from kombu.utils.objects import cached_property from pymongo.collection import Collection from pymongo.cursor import Cursor from pymongo.database import Database +from typing_extensions import override E_SERVER_VERSION: str E_NO_TTL_INDEXES: str @@ -42,10 +43,13 @@ class Channel(VirtualChannel): from_transport_options: tuple[str, ...] def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def get_table(self, exchange: str) -> frozenset[tuple[str, str, str]]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + @override def queue_delete( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, queue: str, **kwargs: Any ) -> int | None: ... + @override def prepare_queue_arguments( self, arguments: dict[str, Any] | None, **kwargs: Any ) -> dict[str, Any]: ... @@ -75,7 +79,9 @@ class Transport(VirtualTransport): driver_name: str implements: Any + @override def driver_version(self) -> str: ... + @override def as_uri( self, uri: str, include_password: bool = ..., mask: str = ... ) -> str: ... diff --git a/kombu-stubs/transport/pyamqp.pyi b/kombu-stubs/transport/pyamqp.pyi index 70922e7..79040f6 100644 --- a/kombu-stubs/transport/pyamqp.pyi +++ b/kombu-stubs/transport/pyamqp.pyi @@ -4,6 +4,7 @@ import amqp from kombu.transport.base import Message as BaseMessage from kombu.transport.base import StdChannel from kombu.transport.base import Transport as BaseTransport +from typing_extensions import override DEFAULT_PORT: int DEFAULT_SSL_PORT: int @@ -26,6 +27,7 @@ class Channel(amqp.Channel, StdChannel): properties: dict[str, Any] | None = ..., _Message: type[amqp.Message] = ..., ) -> amqp.Message: ... + @override def prepare_queue_arguments( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, arguments: dict[str, Any], **kwargs: Any ) -> dict[str, Any]: ... @@ -54,18 +56,30 @@ class Transport(BaseTransport): default_ssl_port: int | None = ..., **kwargs: Any, ) -> None: ... + @override def driver_version(self) -> str: ... + @override def create_channel(self, connection: _Connection) -> Channel: ... + @override def drain_events(self, connection: _Connection, **kwargs: Any) -> Any: ... + @override def establish_connection(self) -> _Connection: ... + @override def verify_connection(self, connection: _Connection) -> bool: ... + @override def close_connection(self, connection: _Connection) -> None: ... + @override def get_heartbeat_interval(self, connection: _Connection) -> int: ... + @override def register_with_event_loop(self, connection: _Connection, loop: Any) -> None: ... + @override def heartbeat_check(self, connection: _Connection, rate: int = ...) -> Any: ... + @override def qos_semantics_matches_spec(self, connection: _Connection) -> bool: ... @property + @override def default_connection_params(self) -> dict[str, Any]: ... + @override def get_manager(self, *args: Any, **kwargs: Any) -> Any: ... class SSLTransport(Transport): diff --git a/kombu-stubs/transport/pyro.pyi b/kombu-stubs/transport/pyro.pyi index ff5811b..92a59cd 100644 --- a/kombu-stubs/transport/pyro.pyi +++ b/kombu-stubs/transport/pyro.pyi @@ -5,6 +5,7 @@ from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.transport.virtual.base import BrokerState from kombu.utils.objects import cached_property +from typing_extensions import override DEFAULT_PORT: int E_NAMESERVER: str @@ -13,6 +14,7 @@ logger: Logger class Channel(VirtualChannel): def __init__(self, connection: Any, **kwargs: Any) -> None: ... + @override def close(self) -> None: ... def queues(self) -> list[str]: ... @cached_property diff --git a/kombu-stubs/transport/qpid.pyi b/kombu-stubs/transport/qpid.pyi index 5664ccd..0f8329e 100644 --- a/kombu-stubs/transport/qpid.pyi +++ b/kombu-stubs/transport/qpid.pyi @@ -5,6 +5,7 @@ from kombu.transport.base import Transport as BaseTransport from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Message from kombu.transport.virtual import QoS as VirtualQoS +from typing_extensions import override logger: Logger buffer: type[bytes] @@ -34,7 +35,9 @@ class Channel(VirtualChannel): QoS: type[_QoS] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, connection: Any, transport: Any) -> None: ... + @override def close(self) -> None: ... + @override def queue_declare( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, queue: str, @@ -45,6 +48,7 @@ class Channel(VirtualChannel): nowait: bool = ..., arguments: dict[str, Any] | None = ..., ) -> Any: ... + @override def exchange_declare( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, exchange: str = ..., @@ -52,15 +56,19 @@ class Channel(VirtualChannel): durable: bool = ..., **kwargs: Any, ) -> None: ... + @override def exchange_delete( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, exchange_name: str, **kwargs: Any ) -> None: ... + @override def queue_bind( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, queue: str, exchange: str, routing_key: str, **kwargs: Any ) -> None: ... + @override def queue_unbind( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, queue: str, exchange: str, routing_key: str, **kwargs: Any ) -> None: ... + @override def basic_qos( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, prefetch_count: int, *args: Any ) -> None: ... @@ -79,6 +87,7 @@ class Transport(BaseTransport): recoverable_channel_errors: tuple[type[BaseException] | None, ...] # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] def __del__(self) -> None: ... + @override def drain_events( self, connection: Any, timeout: int = ..., **kwargs: Any ) -> None: ... diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi index 95b6360..bd26981 100644 --- a/kombu-stubs/transport/redis.pyi +++ b/kombu-stubs/transport/redis.pyi @@ -10,6 +10,7 @@ from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property from redis.client import Pipeline as _RedisPipeline from redis.client import PubSub as _RedisPubSub +from typing_extensions import override logger: Logger crit: Callable[..., None] @@ -50,6 +51,7 @@ class PrefixedStrictRedis(GlobalKeyPrefixMixin, redis_module.Redis): global_keyprefix: str def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def pubsub(self, **kwargs: Any) -> PrefixedRedisPubSub: ... class PrefixedRedisPipeline(GlobalKeyPrefixMixin, _RedisPipeline): @@ -63,21 +65,28 @@ class PrefixedRedisPubSub(_RedisPubSub): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def _prefix_args(self, args: tuple[Any, ...] | list[Any]) -> list[Any]: ... + @override def parse_response(self, *args: Any, **kwargs: Any) -> Any: ... + @override def execute_command(self, *args: Any, **kwargs: Any) -> Any: ... class QoS(VirtualQoS): restore_at_shutdown: bool def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def append(self, message: Any, delivery_tag: int) -> None: ... + @override def restore_unacked(self, client: Any | None = ...) -> None: ... + @override def ack(self, delivery_tag: int) -> None: ... + @override def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... @contextmanager def pipe_or_acquire( self, pipe: Any | None = ..., client: Any | None = ... ) -> Generator[Any, None, None]: ... + @override def restore_visible( self, start: int = ..., num: int = ..., interval: int = ... ) -> None: ... @@ -161,9 +170,13 @@ class Channel(VirtualChannel): ResponseError: type[Exception] def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def basic_consume(self, queue: str, *args: Any, **kwargs: Any) -> Any: ... + @override def basic_cancel(self, consumer_tag: str) -> Any: ... + @override def close(self) -> None: ... + @override def get_table(self, exchange: str) -> list[tuple[str, str, str]]: ... def priority(self, n: int) -> int: ... @contextmanager @@ -197,8 +210,11 @@ class Transport(VirtualTransport): cycle: MultiChannelPoller | None # type: ignore[assignment] # pyright: ignore[reportIncompatibleVariableOverride] def __init__(self, *args: Any, **kwargs: Any) -> None: ... + @override def driver_version(self) -> str: ... + @override def register_with_event_loop(self, connection: Any, loop: Any) -> None: ... + @override def on_readable(self, fileno: int) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] class SentinelManagedSSLConnection: @@ -210,5 +226,5 @@ class SentinelChannel(Channel): connection_class_ssl: type[Any] | None class SentinelTransport(Transport): - default_port: int # pyright: ignore[reportIncompatibleVariableOverride] + default_port: int Channel: type[SentinelChannel] # pyright: ignore[reportIncompatibleVariableOverride] diff --git a/kombu-stubs/transport/sqlalchemy/__init__.pyi b/kombu-stubs/transport/sqlalchemy/__init__.pyi index f17be2a..14fdf57 100644 --- a/kombu-stubs/transport/sqlalchemy/__init__.pyi +++ b/kombu-stubs/transport/sqlalchemy/__init__.pyi @@ -5,6 +5,7 @@ from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property from sqlalchemy.exc import OperationalError from sqlalchemy.orm import Session +from typing_extensions import override VERSION: tuple[int, int, int] @@ -33,4 +34,5 @@ class Transport(VirtualTransport): driver_name: str connection_errors: tuple[type[OperationalError], ...] # pyright: ignore[reportIncompatibleVariableOverride] + @override def driver_version(self) -> str: ... diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi index 92a26e5..33ffdad 100644 --- a/kombu-stubs/transport/virtual/base.pyi +++ b/kombu-stubs/transport/virtual/base.pyi @@ -11,7 +11,7 @@ from kombu.transport.base import StdChannel from kombu.transport.base import Transport as BaseTransport from kombu.transport.virtual.exchange import ExchangeType from kombu.utils.scheduling import FairCycle -from typing_extensions import Self +from typing_extensions import Self, override ARRAY_TYPE_H: str NOT_EQUIVALENT_FMT: str @@ -251,8 +251,11 @@ class Channel(AbstractChannel, StdChannel): properties: dict[str, Any] | None = ..., ) -> dict[str, Any]: ... def flow(self, active: bool = ...) -> None: ... + @override def after_reply_message_received(self, queue: str) -> None: ... + @override def __enter__(self) -> Self: ... + @override def __exit__( self, exc_type: type[BaseException] | None, @@ -271,6 +274,7 @@ class Management(BaseManagement): channel: _ChannelType | None def __init__(self, transport: Transport) -> None: ... + @override def get_bindings(self) -> list[dict[str, Any]]: ... def close(self) -> None: ... @@ -287,10 +291,15 @@ class Transport(BaseTransport): _callbacks: dict[str, Callable[..., Any]] | None def __init__(self, client: Connection, **kwargs: Any) -> None: ... + @override def create_channel(self, connection: Connection) -> _ChannelType: ... + @override def close_channel(self, channel: StdChannel) -> None: ... # pyright: ignore[reportIncompatibleMethodOverride] + @override def establish_connection(self) -> Connection: ... + @override def close_connection(self, connection: Connection) -> None: ... + @override def drain_events( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] self, connection: Connection, timeout: float | None = ... ) -> None: ... @@ -298,4 +307,5 @@ class Transport(BaseTransport): self, channel: _ChannelType, message: _MessageType, queue: str ) -> None: ... @property + @override def default_connection_params(self) -> dict[str, Any]: ... diff --git a/kombu-stubs/utils/collections.pyi b/kombu-stubs/utils/collections.pyi index af2e77e..9e712ff 100644 --- a/kombu-stubs/utils/collections.pyi +++ b/kombu-stubs/utils/collections.pyi @@ -1,6 +1,8 @@ from collections.abc import Hashable from typing import Any +from typing_extensions import override + class EqualityDict(dict[Any, Any]): ... class HashedSeq(list[Any]): @@ -8,6 +10,7 @@ class HashedSeq(list[Any]): hashvalue: int def __init__(self, *seq: Any) -> None: ... + @override def __hash__(self) -> int: ... # type: ignore[override] # pyright: ignore[reportIncompatibleVariableOverride] def eqhash(o: Any) -> Hashable: ... diff --git a/kombu-stubs/utils/encodings.pyi b/kombu-stubs/utils/encodings.pyi new file mode 100644 index 0000000..88d8c09 --- /dev/null +++ b/kombu-stubs/utils/encodings.pyi @@ -0,0 +1 @@ +def safe_repr(o: object, errors: str = "replace") -> str: ... diff --git a/kombu-stubs/utils/functional.pyi b/kombu-stubs/utils/functional.pyi index e81e7ec..6a649f3 100644 --- a/kombu-stubs/utils/functional.pyi +++ b/kombu-stubs/utils/functional.pyi @@ -2,6 +2,8 @@ from collections import UserDict from collections.abc import Callable, Hashable, Iterable, Iterator from typing import Any, TypeVar +from typing_extensions import override + __all__ = ( "LRUCache", "dictfilter", @@ -31,6 +33,7 @@ class LRUCache(UserDict[_KT, _VT]): def iteritems(self) -> Iterator[tuple[_KT, _VT]]: ... def iterkeys(self) -> Iterator[_KT]: ... def itervalues(self) -> Iterator[_VT]: ... + @override def popitem(self, last: bool = ...) -> tuple[_KT, _VT]: ... def memoize( From a39ef2c3458e6ca4d76d39cea0b1bb1a5e171b43 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sun, 4 Jan 2026 10:20:15 +0100 Subject: [PATCH 19/24] Fix remaining basedpyright warnings - Add @override decorators to amqp-stubs (sasl.pyi, utils.pyi) - Fix TypeVar warnings in kombu utils by using @overload for optional parameters that affect type inference - Add pyright ignore comments for missing external type stubs (confluent_kafka, google.cloud.pubsub_v1) This brings the warning count from 15 to 0. --- amqp-stubs/sasl.pyi | 7 +++++++ amqp-stubs/utils.pyi | 2 ++ kombu-stubs/transport/confluentkafka.pyi | 6 +++--- kombu-stubs/transport/gcpubsub.pyi | 2 +- kombu-stubs/utils/__init__.pyi | 6 ++---- kombu-stubs/utils/imports.pyi | 3 +-- kombu-stubs/utils/objects.pyi | 10 +++++++++- kombu-stubs/utils/scheduling.pyi | 7 +++++-- 8 files changed, 30 insertions(+), 13 deletions(-) diff --git a/amqp-stubs/sasl.pyi b/amqp-stubs/sasl.pyi index a6cfaf3..c52dcf3 100644 --- a/amqp-stubs/sasl.pyi +++ b/amqp-stubs/sasl.pyi @@ -1,5 +1,7 @@ from typing import Any +from typing_extensions import override + class SASL: @property def mechanism(self) -> bytes | None: ... @@ -11,6 +13,7 @@ class PLAIN(SASL): password: str def __init__(self, username: str, password: str) -> None: ... + @override def start(self, connection: Any) -> bytes: ... class AMQPLAIN(SASL): @@ -19,11 +22,13 @@ class AMQPLAIN(SASL): password: str def __init__(self, username: str, password: str) -> None: ... + @override def start(self, connection: Any) -> bytes: ... class EXTERNAL(SASL): mechanism: bytes # pyright: ignore[reportIncompatibleMethodOverride] + @override def start(self, connection: Any) -> bytes: ... class RAW(SASL): @@ -31,6 +36,7 @@ class RAW(SASL): response: bytes | None def __init__(self, mechanism: bytes | None, response: bytes | None) -> None: ... + @override def start(self, connection: Any) -> bytes | None: ... class GSSAPI(SASL): @@ -47,4 +53,5 @@ class GSSAPI(SASL): rdns: bool = ..., fail_soft: bool = ..., ) -> None: ... + @override def start(self) -> bytes | None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] diff --git a/amqp-stubs/utils.pyi b/amqp-stubs/utils.pyi index e29a07c..6681ca0 100644 --- a/amqp-stubs/utils.pyi +++ b/amqp-stubs/utils.pyi @@ -3,10 +3,12 @@ from logging import Handler, Logger from typing import Any, TypeVar from amqp import promise as promise +from typing_extensions import override _T = TypeVar("_T") class NullHandler(Handler): + @override def emit(self, record: Any) -> None: ... def bytes_to_str(s: bytes | str) -> str: ... diff --git a/kombu-stubs/transport/confluentkafka.pyi b/kombu-stubs/transport/confluentkafka.pyi index c6c80f4..1a7c091 100644 --- a/kombu-stubs/transport/confluentkafka.pyi +++ b/kombu-stubs/transport/confluentkafka.pyi @@ -1,8 +1,8 @@ from logging import Logger from typing import Any -from confluent_kafka import KafkaException # type: ignore[import-untyped] -from confluent_kafka.admin import AdminClient # type: ignore[import-untyped] +from confluent_kafka import KafkaException # type: ignore[import-untyped] # pyright: ignore[reportMissingTypeStubs,reportUnknownVariableType] +from confluent_kafka.admin import AdminClient # type: ignore[import-untyped] # pyright: ignore[reportMissingTypeStubs] from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Message as VirtualMessage from kombu.transport.virtual import QoS as VirtualQoS @@ -15,7 +15,7 @@ DEFAULT_PORT: int KAFKA_CONNECTION_ERRORS: tuple[type[Exception], ...] KAFKA_CHANNEL_ERRORS: tuple[type[Exception], ...] -class NoBrokersAvailable(KafkaException): +class NoBrokersAvailable(KafkaException): # pyright: ignore[reportUntypedBaseClass] retriable: bool class Message(VirtualMessage): diff --git a/kombu-stubs/transport/gcpubsub.pyi b/kombu-stubs/transport/gcpubsub.pyi index 07f2cee..e369347 100644 --- a/kombu-stubs/transport/gcpubsub.pyi +++ b/kombu-stubs/transport/gcpubsub.pyi @@ -4,7 +4,7 @@ from logging import Logger from typing import Any from google.cloud.monitoring_v3 import MetricServiceClient -from google.cloud.pubsub_v1 import ( # type: ignore[import-untyped] +from google.cloud.pubsub_v1 import ( # type: ignore[import-untyped] # pyright: ignore[reportMissingTypeStubs] PublisherClient, SubscriberClient, ) diff --git a/kombu-stubs/utils/__init__.pyi b/kombu-stubs/utils/__init__.pyi index b41d464..4b251a8 100644 --- a/kombu-stubs/utils/__init__.pyi +++ b/kombu-stubs/utils/__init__.pyi @@ -1,6 +1,6 @@ from collections.abc import Callable, Generator, Iterable, Mapping from contextlib import contextmanager -from typing import Any, BinaryIO, TextIO, TypeVar +from typing import Any, BinaryIO, TextIO from uuid import UUID from kombu.utils.functional import retry_over_time as retry_over_time @@ -30,8 +30,6 @@ __all__ = ( # We define it in the stub to match __all__ def reprkwargs(kwargs: Mapping[str, Any], sep: str = ..., fmt: str = ...) -> str: ... -_T = TypeVar("_T") - class EqualityDict(dict[Any, Any]): ... def uuid(_uuid: Callable[[], UUID] = ...) -> str: ... @@ -67,7 +65,7 @@ def symbol_by_name( imp: Callable[[str], Any] | None = ..., package: str | None = ..., sep: str = ..., - default: _T | None = ..., + default: Any = ..., **kwargs: Any, ) -> Any: ... @contextmanager diff --git a/kombu-stubs/utils/imports.pyi b/kombu-stubs/utils/imports.pyi index f5ec8d0..15072eb 100644 --- a/kombu-stubs/utils/imports.pyi +++ b/kombu-stubs/utils/imports.pyi @@ -2,7 +2,6 @@ from collections.abc import Callable, Mapping from types import TracebackType from typing import Any, TypeVar -_T = TypeVar("_T") _ExcT = TypeVar("_ExcT", bound=BaseException) def symbol_by_name( @@ -11,7 +10,7 @@ def symbol_by_name( imp: Callable[[str], Any] | None = ..., package: str | None = ..., sep: str = ..., - default: _T | None = ..., + default: Any = ..., **kwargs: Any, ) -> Any: ... def reraise(tp: type[_ExcT], value: _ExcT, tb: TracebackType | None = ...) -> _ExcT: ... diff --git a/kombu-stubs/utils/objects.pyi b/kombu-stubs/utils/objects.pyi index c9d736f..60852af 100644 --- a/kombu-stubs/utils/objects.pyi +++ b/kombu-stubs/utils/objects.pyi @@ -12,13 +12,21 @@ class cached_property(Generic[_T]): fdel: Callable[[Any], None] | None attrname: str | None + @overload def __init__( self, - fget: Callable[[Any], _T] | None = ..., + fget: Callable[[Any], _T], fset: Callable[[Any, _T], None] | None = ..., fdel: Callable[[Any], None] | None = ..., ) -> None: ... @overload + def __init__( + self: "cached_property[Any]", + fget: None = ..., + fset: Callable[[Any, Any], None] | None = ..., + fdel: Callable[[Any], None] | None = ..., + ) -> None: ... + @overload def __get__( self, instance: None, owner: type[Any] | None = ... ) -> cached_property[_T]: ... diff --git a/kombu-stubs/utils/scheduling.pyi b/kombu-stubs/utils/scheduling.pyi index e58f53d..46dabe5 100644 --- a/kombu-stubs/utils/scheduling.pyi +++ b/kombu-stubs/utils/scheduling.pyi @@ -1,5 +1,5 @@ from collections.abc import Callable, Iterable, Iterator, Sequence -from typing import Any, Generic, TypeVar +from typing import Any, Generic, TypeVar, overload __all__ = ("FairCycle", "priority_cycle", "round_robin_cycle", "sorted_cycle") @@ -7,7 +7,10 @@ _T = TypeVar("_T") class round_robin_cycle(Generic[_T]): items: list[_T] | None - def __init__(self, it: Iterable[_T] | None = ...) -> None: ... + @overload + def __init__(self, it: Iterable[_T]) -> None: ... + @overload + def __init__(self: "round_robin_cycle[Any]", it: None = ...) -> None: ... def update(self, it: Iterable[_T]) -> None: ... def consume(self, n: int) -> Iterator[_T]: ... def rotate(self, last_used: _T) -> None: ... From 608f0d84b55337360d1b15f1f755f67a64819424 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Sun, 4 Jan 2026 10:56:01 +0100 Subject: [PATCH 20/24] Fix ruff linting errors - Remove quoted annotations in objects.pyi and scheduling.pyi (PYI020/UP037) - Fix pyright ignore comment placement after import sorting in confluentkafka.pyi --- kombu-stubs/transport/confluentkafka.pyi | 8 ++++++-- kombu-stubs/utils/objects.pyi | 2 +- kombu-stubs/utils/scheduling.pyi | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/kombu-stubs/transport/confluentkafka.pyi b/kombu-stubs/transport/confluentkafka.pyi index 1a7c091..82efad4 100644 --- a/kombu-stubs/transport/confluentkafka.pyi +++ b/kombu-stubs/transport/confluentkafka.pyi @@ -1,8 +1,12 @@ from logging import Logger from typing import Any -from confluent_kafka import KafkaException # type: ignore[import-untyped] # pyright: ignore[reportMissingTypeStubs,reportUnknownVariableType] -from confluent_kafka.admin import AdminClient # type: ignore[import-untyped] # pyright: ignore[reportMissingTypeStubs] +from confluent_kafka import ( # type: ignore[import-untyped] # pyright: ignore[reportMissingTypeStubs] + KafkaException, # pyright: ignore[reportUnknownVariableType] +) +from confluent_kafka.admin import ( # type: ignore[import-untyped] # pyright: ignore[reportMissingTypeStubs] + AdminClient, +) from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Message as VirtualMessage from kombu.transport.virtual import QoS as VirtualQoS diff --git a/kombu-stubs/utils/objects.pyi b/kombu-stubs/utils/objects.pyi index 60852af..7ce56c5 100644 --- a/kombu-stubs/utils/objects.pyi +++ b/kombu-stubs/utils/objects.pyi @@ -21,7 +21,7 @@ class cached_property(Generic[_T]): ) -> None: ... @overload def __init__( - self: "cached_property[Any]", + self: cached_property[Any], fget: None = ..., fset: Callable[[Any, Any], None] | None = ..., fdel: Callable[[Any], None] | None = ..., diff --git a/kombu-stubs/utils/scheduling.pyi b/kombu-stubs/utils/scheduling.pyi index 46dabe5..d57d63c 100644 --- a/kombu-stubs/utils/scheduling.pyi +++ b/kombu-stubs/utils/scheduling.pyi @@ -10,7 +10,7 @@ class round_robin_cycle(Generic[_T]): @overload def __init__(self, it: Iterable[_T]) -> None: ... @overload - def __init__(self: "round_robin_cycle[Any]", it: None = ...) -> None: ... + def __init__(self: round_robin_cycle[Any], it: None = ...) -> None: ... def update(self, it: Iterable[_T]) -> None: ... def consume(self, n: int) -> Iterator[_T]: ... def rotate(self, last_used: _T) -> None: ... From 78acbe6b47f0af204c9386da206a7da3d83c6964 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 8 Jan 2026 18:21:25 +0100 Subject: [PATCH 21/24] Sync kombu-stubs with main-ng branch Pull latest kombu-stubs changes from main-ng, including: - New allowlist.txt for stubtest - New librabbitmq.pyi transport stub - Remove non-existent encodings.pyi module --- kombu-stubs/abstract.pyi | 12 +++- kombu-stubs/allowlist.txt | 9 +++ .../asynchronous/aws/sqs/connection.pyi | 2 +- kombu-stubs/asynchronous/hub.pyi | 9 +++ kombu-stubs/asynchronous/timer.pyi | 7 ++ kombu-stubs/common.pyi | 9 +++ kombu-stubs/compression.pyi | 2 +- kombu-stubs/connection.pyi | 67 ++++++++++++++++--- kombu-stubs/entity.pyi | 20 +++++- kombu-stubs/message.pyi | 2 + kombu-stubs/messaging.pyi | 46 +++++++++++++ kombu-stubs/mixins.pyi | 1 + kombu-stubs/pidbox.pyi | 54 ++++++++++++++- kombu-stubs/pools.pyi | 7 +- kombu-stubs/serialization.pyi | 10 +++ kombu-stubs/simple.pyi | 2 + kombu-stubs/transport/SQS.pyi | 8 +-- kombu-stubs/transport/azureservicebus.pyi | 2 +- kombu-stubs/transport/base.pyi | 11 ++- kombu-stubs/transport/confluentkafka.pyi | 10 +-- kombu-stubs/transport/filesystem.pyi | 26 +++++-- kombu-stubs/transport/gcpubsub.pyi | 2 +- kombu-stubs/transport/librabbitmq.pyi | 22 ++++++ kombu-stubs/transport/memory.pyi | 9 +++ kombu-stubs/transport/mongodb.pyi | 25 +++++++ kombu-stubs/transport/redis.pyi | 7 +- kombu-stubs/transport/sqlalchemy/__init__.pyi | 12 +++- kombu-stubs/transport/virtual/base.pyi | 66 +++++++++++++----- kombu-stubs/utils/__init__.pyi | 9 +-- kombu-stubs/utils/encodings.pyi | 1 - kombu-stubs/utils/functional.pyi | 27 ++++++++ kombu-stubs/utils/json.pyi | 2 +- kombu-stubs/utils/scheduling.pyi | 7 +- kombu-stubs/utils/url.pyi | 1 + 34 files changed, 440 insertions(+), 66 deletions(-) create mode 100644 kombu-stubs/allowlist.txt create mode 100644 kombu-stubs/transport/librabbitmq.pyi delete mode 100644 kombu-stubs/utils/encodings.pyi diff --git a/kombu-stubs/abstract.pyi b/kombu-stubs/abstract.pyi index 3f4b249..1df4b67 100644 --- a/kombu-stubs/abstract.pyi +++ b/kombu-stubs/abstract.pyi @@ -1,4 +1,4 @@ -from typing import Any +from typing import Any, TypeVar from kombu.connection import Connection from kombu.transport.base import StdChannel @@ -6,11 +6,18 @@ from typing_extensions import Self __all__ = ("MaybeChannelBound", "Object") +_T = TypeVar("_T") +_ObjectT = TypeVar("_ObjectT", bound=Object) + +def _any(v: _T) -> _T: ... +def unpickle_dict(cls: type[_ObjectT], kwargs: dict[str, Any]) -> _ObjectT: ... + class Object: attrs: tuple[tuple[str, Any], ...] def __init__(self, *args: Any, **kwargs: Any) -> None: ... - def __copy__(self) -> Object: ... + def __copy__(self) -> Self: ... + def __reduce__(self) -> tuple[Any, ...]: ... def as_dict(self, recurse: bool = ...) -> dict[str, Any]: ... class MaybeChannelBound(Object): @@ -21,6 +28,7 @@ class MaybeChannelBound(Object): def maybe_bind(self, channel: StdChannel | Connection) -> Self: ... def revive(self, channel: StdChannel) -> None: ... def when_bound(self) -> None: ... + def _repr_entity(self, item: str = ...) -> str: ... @property def channel(self) -> StdChannel: ... @property diff --git a/kombu-stubs/allowlist.txt b/kombu-stubs/allowlist.txt new file mode 100644 index 0000000..db81b94 --- /dev/null +++ b/kombu-stubs/allowlist.txt @@ -0,0 +1,9 @@ +# kombu.transport.librabbitmq is an optional dependency that may not be installed +kombu.transport.librabbitmq + +# kombu.utils has reprkwargs in __all__ but the function is not defined at runtime (kombu bug) +kombu.utils.__all__ + +# kombu.transport.gcpubsub.Transport.channel_errors has a complex tuple type at runtime +# that includes dynamically imported exceptions that cannot be accurately typed +kombu.transport.gcpubsub.Transport.channel_errors diff --git a/kombu-stubs/asynchronous/aws/sqs/connection.pyi b/kombu-stubs/asynchronous/aws/sqs/connection.pyi index 475a03a..6ccf965 100644 --- a/kombu-stubs/asynchronous/aws/sqs/connection.pyi +++ b/kombu-stubs/asynchronous/aws/sqs/connection.pyi @@ -21,7 +21,7 @@ class AsyncSQSConnection(AsyncAWSQueryConnection): **kwargs: Any, ) -> None: ... @override - def make_request( # pyright: ignore[reportIncompatibleMethodOverride] + def make_request( # pyright: ignore[reportIncompatibleMethodOverride] # ty: ignore[invalid-method-override] self, operation_name: str, params: dict[str, Any], diff --git a/kombu-stubs/asynchronous/hub.pyi b/kombu-stubs/asynchronous/hub.pyi index 0fa7119..a5435bc 100644 --- a/kombu-stubs/asynchronous/hub.pyi +++ b/kombu-stubs/asynchronous/hub.pyi @@ -10,6 +10,9 @@ READ: int WRITE: int ERR: int +def _dummy_context(*args: Any) -> Generator[None, None, None]: ... +def _raise_stop_error() -> None: ... + class Hub: READ: int WRITE: int @@ -81,6 +84,12 @@ class Hub: def loop(self) -> Generator[None, None, None]: ... @property def poller(self) -> Any: ... + def _create_poller(self) -> Any: ... + def _close_poller(self) -> None: ... + def _pop_ready(self) -> Callable[..., Any] | None: ... + def _unregister(self, fd: int | Any) -> None: ... + def _remove_from_loop(self, fd: int | Any) -> None: ... + def _discard(self, fd: int | Any) -> None: ... @cached_property def scheduler(self) -> Timer: ... diff --git a/kombu-stubs/asynchronous/timer.pyi b/kombu-stubs/asynchronous/timer.pyi index 07baf5e..4134ef3 100644 --- a/kombu-stubs/asynchronous/timer.pyi +++ b/kombu-stubs/asynchronous/timer.pyi @@ -111,6 +111,13 @@ class Timer: def stop(self) -> None: ... def cancel(self, tref: _Entry) -> None: ... def clear(self) -> None: ... + def _enter( + self, + eta: float, + priority: int, + entry: _Entry, + push: Callable[..., Any] = ..., + ) -> _Entry: ... @property def queue(self) -> list[scheduled]: ... @property diff --git a/kombu-stubs/common.pyi b/kombu-stubs/common.pyi index 4500ae9..0fa7fc3 100644 --- a/kombu-stubs/common.pyi +++ b/kombu-stubs/common.pyi @@ -1,4 +1,5 @@ from collections.abc import Callable, Generator, Iterable +from contextlib import contextmanager from typing import Any from uuid import UUID @@ -49,6 +50,14 @@ class QoS: def increment_eventually(self, n: int = ...) -> int: ... def set(self, pcount: int) -> int: ... +@contextmanager +def _ignore_errors(conn: Connection) -> Generator[None, None, None]: ... +def _ensure_channel_is_bound(entity: Any, channel: StdChannel | None) -> StdChannel: ... +def _maybe_declare(entity: Any, channel: StdChannel) -> bool: ... +def _imaybe_declare( + entity: Any, channel: StdChannel, **retry_policy: Any +) -> Generator[Any, None, bool]: ... +def _ensure_errback(exc: BaseException, interval: float) -> None: ... def maybe_declare( entity: Any, channel: StdChannel | None = ..., diff --git a/kombu-stubs/compression.pyi b/kombu-stubs/compression.pyi index da94bf0..67afc1d 100644 --- a/kombu-stubs/compression.pyi +++ b/kombu-stubs/compression.pyi @@ -18,5 +18,5 @@ def register( def encoders() -> list[str]: ... def get_encoder(t: str) -> Callable[[bytes], bytes]: ... def get_decoder(t: str) -> Callable[[bytes], bytes]: ... -def compress(body: bytes, content_type: str) -> tuple[bytes, str]: ... +def compress(body: bytes | str, content_type: str) -> tuple[bytes, str]: ... def decompress(body: bytes, content_type: str) -> bytes: ... diff --git a/kombu-stubs/connection.pyi b/kombu-stubs/connection.pyi index 8351554..46a471c 100644 --- a/kombu-stubs/connection.pyi +++ b/kombu-stubs/connection.pyi @@ -1,15 +1,21 @@ from collections.abc import Callable, Generator, Iterable, Iterator +from contextlib import contextmanager from types import TracebackType from typing import Any, TypeVar -from kombu.messaging import Consumer, Producer -from kombu.simple import SimpleBuffer, SimpleQueue +from kombu.messaging import Consumer as _Consumer +from kombu.messaging import Producer as _Producer +from kombu.simple import SimpleBuffer as _SimpleBuffer +from kombu.simple import SimpleQueue as _SimpleQueue from kombu.transport.base import Management, StdChannel, Transport from kombu.utils.objects import cached_property from typing_extensions import Self, override __all__ = ("ChannelPool", "Connection", "ConnectionPool") +def is_connection(obj: Any) -> bool: ... +def maybe_channel(channel: StdChannel | Connection | None) -> StdChannel | None: ... + _T = TypeVar("_T") class Resource: @@ -149,17 +155,17 @@ class Connection: getfields: Callable[..., Any] | None = ..., ) -> str: ... def Pool(self, limit: int | None = ..., **kwargs: Any) -> ConnectionPool: ... - def ChannelPool(self, limit: int | None = ..., **kwargs: Any) -> ChannelPool: ... + def ChannelPool(self, limit: int | None = ..., **kwargs: Any) -> ChannelPool: ... # ty: ignore[invalid-type-form] def Producer( self, channel: StdChannel | None = ..., *args: Any, **kwargs: Any - ) -> Producer: ... + ) -> _Producer: ... def Consumer( self, queues: Any | None = ..., channel: StdChannel | None = ..., *args: Any, **kwargs: Any, - ) -> Consumer: ... + ) -> _Consumer: ... def SimpleQueue( self, name: str, @@ -169,7 +175,7 @@ class Connection: exchange_opts: dict[str, Any] | None = ..., channel: StdChannel | None = ..., **kwargs: Any, - ) -> SimpleQueue: ... + ) -> _SimpleQueue: ... def SimpleBuffer( self, name: str, @@ -179,8 +185,39 @@ class Connection: exchange_opts: dict[str, Any] | None = ..., channel: StdChannel | None = ..., **kwargs: Any, - ) -> SimpleBuffer: ... + ) -> _SimpleBuffer: ... def supports_exchange_type(self, exchange_type: str) -> bool: ... + def _init_params( + self, + hostname: str, + userid: str | None, + password: str | None, + virtual_host: str | None, + port: int | None, + insist: bool, + ssl: bool | dict[str, Any], + transport: str | type[Transport] | None, + connect_timeout: float, + login_method: str | None, + heartbeat: float, + credential_provider: Any | None, + ) -> None: ... + def _extract_failover_opts(self) -> dict[str, Any]: ... + def _reraise_as_library_errors( + self, + ConnectionError: type[Exception] = ..., + ChannelError: type[Exception] = ..., + ) -> Generator[None, None, None]: ... + def _debug(self, msg: str, *args: Any, **kwargs: Any) -> None: ... + def _establish_connection(self) -> Any: ... + def _connection_factory(self) -> Any: ... + @contextmanager + def _dummy_context(self) -> Generator[Self, None, None]: ... + def _info(self, resolve: bool = ...) -> dict[str, Any]: ... + def _do_close_self(self) -> None: ... + def _do_close_transport(self) -> None: ... + def _close(self) -> None: ... + def __reduce__(self) -> tuple[Any, ...]: ... def __copy__(self) -> Connection: ... def __eqhash__(self) -> tuple[str, ...]: ... def __enter__(self) -> Self: ... @@ -239,6 +276,18 @@ class ConnectionPool(Resource): self, block: bool = ... ) -> Generator[StdChannel, None, None]: ... +class PooledConnection: + pool: ConnectionPool + + def __init__(self, pool: ConnectionPool) -> None: ... + def __enter__(self) -> Connection: ... + def __exit__( + self, + exc_type: type[BaseException] | None, + exc_val: BaseException | None, + exc_tb: TracebackType | None, + ) -> None: ... + class ChannelPool(Resource): LimitExceeded: type[Exception] connection: Connection @@ -248,7 +297,9 @@ class ChannelPool(Resource): ) -> None: ... def new(self) -> StdChannel: ... @override - def prepare(self, channel: StdChannel) -> StdChannel: ... # pyright: ignore[reportIncompatibleMethodOverride] + def setup(self) -> None: ... + @override + def prepare(self, channel: StdChannel) -> StdChannel: ... # pyright: ignore[reportIncompatibleMethodOverride] # ty: ignore[invalid-method-override] @override def release_resource(self, resource: StdChannel) -> None: ... @override diff --git a/kombu-stubs/entity.pyi b/kombu-stubs/entity.pyi index f814689..33593bf 100644 --- a/kombu-stubs/entity.pyi +++ b/kombu-stubs/entity.pyi @@ -7,6 +7,8 @@ from kombu.transport.base import StdChannel __all__ = ("Exchange", "Queue", "binding", "maybe_delivery_mode") +def _reprstr(s: str) -> str: ... +def pretty_bindings(bindings: Sequence[binding]) -> str: ... def maybe_delivery_mode( v: Any, modes: Mapping[str, int] | None = ..., default: int = ... ) -> int | None: ... @@ -75,7 +77,11 @@ class Exchange(MaybeChannelBound): routing_key: str = ..., arguments: dict[str, Any] | None = ..., unbind_arguments: dict[str, Any] | None = ..., - ) -> binding: ... + ) -> binding: ... # ty: ignore[invalid-type-form] + def _can_declare(self) -> bool: ... + def __eq__(self, other: object) -> bool: ... + def __ne__(self, other: object) -> bool: ... + def __hash__(self) -> int: ... class Queue(MaybeChannelBound): ContentDisallowed: type[Exception] @@ -155,6 +161,18 @@ class Queue(MaybeChannelBound): on_cancel: Callable[[str], None] | None = ..., ) -> str: ... def cancel(self, consumer_tag: str) -> None: ... + def _create_exchange( + self, nowait: bool = ..., channel: StdChannel | None = ... + ) -> None: ... + def _create_queue( + self, nowait: bool = ..., channel: StdChannel | None = ... + ) -> str | None: ... + def _create_bindings( + self, nowait: bool = ..., channel: StdChannel | None = ... + ) -> None: ... + def __eq__(self, other: object) -> bool: ... + def __ne__(self, other: object) -> bool: ... + def __hash__(self) -> int: ... class binding(Object): exchange: Exchange | None diff --git a/kombu-stubs/message.pyi b/kombu-stubs/message.pyi index 88f7b9b..fb7ed90 100644 --- a/kombu-stubs/message.pyi +++ b/kombu-stubs/message.pyi @@ -40,6 +40,8 @@ class Message: def reject(self, requeue: bool = ...) -> None: ... def requeue(self) -> None: ... def decode(self) -> Any: ... + def _decode(self) -> Any: ... + def _reraise_error(self, callback: Any | None = ...) -> None: ... @property def acknowledged(self) -> bool: ... @property diff --git a/kombu-stubs/messaging.pyi b/kombu-stubs/messaging.pyi index e75b19f..b51c4e3 100644 --- a/kombu-stubs/messaging.pyi +++ b/kombu-stubs/messaging.pyi @@ -69,6 +69,43 @@ class Producer: exc_tb: TracebackType | None, ) -> None: ... def __reduce_args__(self) -> tuple[Any, ...]: ... + def __reduce__(self) -> tuple[Any, ...]: ... + def _get_channel(self) -> StdChannel: ... + def _set_channel(self, channel: Connection | StdChannel) -> None: ... + def _delivery_details( + self, + exchange: Exchange | str, + delivery_mode: int | None = ..., + maybe_delivery_mode: Callable[..., int | None] = ..., + Exchange: type[Exchange] = ..., + ) -> tuple[str, int | None]: ... + def _prepare( + self, + body: Any, + serializer: str | None = ..., + content_type: str | None = ..., + content_encoding: str | None = ..., + compression: str | None = ..., + headers: dict[str, Any] | None = ..., + ) -> tuple[bytes, str, str]: ... + def _publish( + self, + body: bytes, + priority: int | None, + content_type: str | None, + content_encoding: str | None, + headers: dict[str, Any] | None, + properties: dict[str, Any], + routing_key: str, + mandatory: bool, + immediate: bool, + exchange: str, + declare: list[Any], + timeout: float | None = ..., + confirm_timeout: float | None = ..., + retry: bool = ..., + retry_policy: dict[str, Any] | None = ..., + ) -> None: ... @property def __connection__(self) -> Connection | None: ... @property @@ -127,5 +164,14 @@ class Consumer: exc_val: BaseException | None, exc_tb: TracebackType | None, ) -> None: ... + def _add_tag(self, queue: Queue, consumer_tag: str | None = ...) -> str: ... + def _basic_consume( + self, + queue: Queue, + consumer_tag: str | None = ..., + no_ack: bool | None = ..., + nowait: bool = ..., + ) -> str: ... + def _receive_callback(self, message: Message) -> None: ... @property def connection(self) -> Connection | None: ... diff --git a/kombu-stubs/mixins.pyi b/kombu-stubs/mixins.pyi index f6fe679..3b4ce65 100644 --- a/kombu-stubs/mixins.pyi +++ b/kombu-stubs/mixins.pyi @@ -44,6 +44,7 @@ class ConsumerMixin: def maybe_conn_error(self, fun: Callable[..., Any] | None) -> Any: ... def create_connection(self) -> Connection: ... def establish_connection(self) -> Connection: ... + def _consume_from(self, *queues: Any) -> Sequence[MessagingConsumer]: ... def Consumer( self, ) -> tuple[Connection, StdChannel, Sequence[MessagingConsumer]]: ... diff --git a/kombu-stubs/pidbox.pyi b/kombu-stubs/pidbox.pyi index 3911b67..120dbde 100644 --- a/kombu-stubs/pidbox.pyi +++ b/kombu-stubs/pidbox.pyi @@ -84,7 +84,7 @@ class Mailbox: queue_exclusive: bool reply_queue_ttl: float | None reply_queue_expires: float | None - node_cls: builtins.type[Node] + node_cls: builtins.type[Node] # ty: ignore[invalid-type-form] def __init__( self, @@ -102,14 +102,14 @@ class Mailbox: reply_queue_ttl: float | None = ..., reply_queue_expires: float | None = ..., ) -> None: ... - def __call__(self, connection: Connection) -> Node: ... + def __call__(self, connection: Connection) -> Node: ... # ty: ignore[invalid-type-form] def Node( self, hostname: str | None = ..., state: Any | None = ..., channel: StdChannel | None = ..., handlers: dict[str, Callable[..., Any]] | None = ..., - ) -> Node: ... + ) -> Node: ... # ty: ignore[invalid-type-form] def get_queue(self, hostname: str) -> Queue: ... def get_reply_queue(self) -> Queue: ... @contextmanager @@ -141,6 +141,54 @@ class Mailbox: callback: Callable[..., Any] | None = ..., channel: StdChannel | None = ..., ) -> list[Any] | None: ... + def _get_exchange(self, namespace: str, type: str) -> Exchange: ... + def _get_reply_exchange(self, namespace: str) -> Exchange: ... + def _broadcast( + self, + command: str, + arguments: dict[str, Any] | None = ..., + destination: Sequence[str] | None = ..., + reply: bool = ..., + timeout: float = ..., + limit: int | None = ..., + callback: Callable[..., Any] | None = ..., + channel: StdChannel | None = ..., + serializer: str | None = ..., + pattern: str | None = ..., + matcher: str | None = ..., + ) -> list[Any] | None: ... + def _collect( + self, + ticket: str, + limit: int | None = ..., + timeout: float = ..., + callback: Callable[..., Any] | None = ..., + channel: StdChannel | None = ..., + accept: Sequence[str] | None = ..., + ) -> list[Any]: ... + def _publish( + self, + type: str, + arguments: dict[str, Any], + destination: Sequence[str] | None = ..., + reply_ticket: str | None = ..., + channel: StdChannel | None = ..., + timeout: float | None = ..., + serializer: str | None = ..., + producer: Producer | None = ..., + pattern: str | None = ..., + matcher: str | None = ..., + ) -> None: ... + def _publish_reply( + self, + reply: Any, + exchange: str | Exchange, + routing_key: str, + ticket: str, + channel: StdChannel | None = ..., + producer: Producer | None = ..., + **opts: Any, + ) -> None: ... @property def oid(self) -> str: ... @cached_property diff --git a/kombu-stubs/pools.pyi b/kombu-stubs/pools.pyi index 9274bde..16f88f1 100644 --- a/kombu-stubs/pools.pyi +++ b/kombu-stubs/pools.pyi @@ -26,11 +26,11 @@ class PoolGroup(dict[Any, Any]): class Connections(PoolGroup): @override - def create(self, connection: Connection, limit: int | None) -> ConnectionPool: ... # pyright: ignore[reportIncompatibleMethodOverride] + def create(self, connection: Connection, limit: int | None) -> ConnectionPool: ... # pyright: ignore[reportIncompatibleMethodOverride] # ty: ignore[invalid-method-override] class Producers(PoolGroup): @override - def create(self, connection: Connection, limit: int | None) -> ProducerPool: ... # pyright: ignore[reportIncompatibleMethodOverride] + def create(self, connection: Connection, limit: int | None) -> ProducerPool: ... # pyright: ignore[reportIncompatibleMethodOverride] # ty: ignore[invalid-method-override] class ProducerPool: Producer: type[_ProducerType] @@ -55,6 +55,9 @@ class ProducerPool: def prepare(self, p: _ProducerType) -> _ProducerType: ... def release(self, resource: _ProducerType) -> None: ... def close_resource(self, resource: _ProducerType) -> None: ... + def _acquire_connection(self) -> Connection: ... + +def _all_pools() -> list[PoolGroup]: ... connections: Connections producers: Producers diff --git a/kombu-stubs/serialization.pyi b/kombu-stubs/serialization.pyi index 4912210..d6bf80d 100644 --- a/kombu-stubs/serialization.pyi +++ b/kombu-stubs/serialization.pyi @@ -29,6 +29,8 @@ class SerializerRegistry: def enable(self, name: str) -> None: ... def disable(self, name: str) -> None: ... def unregister(self, name: str) -> None: ... + def _set_default_serializer(self, name: str) -> None: ... + def _for_untrusted_content(self, ctype: str, why: str) -> bool: ... def dumps( self, data: Any, serializer: str | None = ... ) -> tuple[str, str, str]: ... @@ -69,3 +71,11 @@ def disable_insecure_serializers(allowed: Container[str] | None = ...) -> None: def prepare_accept_content( content_types: Iterable[str] | None, name_to_type: Mapping[str, str] | None = ... ) -> set[str] | None: ... +def _reraise_errors( + wrapper: type[BaseException], + include: tuple[type[BaseException], ...] = ..., + exclude: tuple[type[BaseException], ...] = ..., +) -> Callable[[Callable[..., Any]], Callable[..., Any]]: ... +def pickle_loads(s: bytes, load: Callable[..., Any] = ...) -> Any: ... +def unpickle(s: bytes) -> Any: ... +def parenthesize_alias(first: str, second: str) -> str: ... diff --git a/kombu-stubs/simple.pyi b/kombu-stubs/simple.pyi index f88bc0c..c4c77af 100644 --- a/kombu-stubs/simple.pyi +++ b/kombu-stubs/simple.pyi @@ -41,6 +41,8 @@ class SimpleBase: def clear(self) -> int: ... def qsize(self) -> int: ... def close(self) -> None: ... + def _consume(self) -> None: ... + def _receive(self, message_data: Any, message: Message) -> None: ... def __enter__(self) -> Self: ... def __exit__( self, diff --git a/kombu-stubs/transport/SQS.pyi b/kombu-stubs/transport/SQS.pyi index eb2b15c..872d377 100644 --- a/kombu-stubs/transport/SQS.pyi +++ b/kombu-stubs/transport/SQS.pyi @@ -21,16 +21,16 @@ class DoesNotExistQueueException(Exception): ... class QoS(VirtualQoS): @override - def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def reject(self, delivery_tag: str, requeue: bool = ...) -> None: ... def apply_backoff_policy( self, routing_key: str, - delivery_tag: int, + delivery_tag: str, backoff_policy: dict[int, int], backoff_tasks: list[str], ) -> None: ... def extract_task_name_and_number_of_retries( - self, delivery_tag: int + self, delivery_tag: str ) -> tuple[str, int]: ... _QoS = QoS @@ -63,7 +63,7 @@ class Channel(VirtualChannel): def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... def canonical_queue_name(self, queue_name: str) -> str: ... @override - def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... + def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... @override def close(self) -> None: ... def new_sqs_client( diff --git a/kombu-stubs/transport/azureservicebus.pyi b/kombu-stubs/transport/azureservicebus.pyi index cdf3853..9419bde 100644 --- a/kombu-stubs/transport/azureservicebus.pyi +++ b/kombu-stubs/transport/azureservicebus.pyi @@ -41,7 +41,7 @@ class Channel(VirtualChannel): def basic_cancel(self, consumer_tag: str) -> None: ... def entity_name(self, name: str, table: dict[int, int] | None = ...) -> str: ... @override - def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] + def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... # pyright: ignore[reportIncompatibleMethodOverride] @override def close(self) -> None: ... @cached_property diff --git a/kombu-stubs/transport/base.pyi b/kombu-stubs/transport/base.pyi index c91e120..4623286 100644 --- a/kombu-stubs/transport/base.pyi +++ b/kombu-stubs/transport/base.pyi @@ -9,6 +9,11 @@ from typing_extensions import Self __all__ = ("Management", "Message", "StdChannel", "Transport") +class Implements(dict[str, Any]): + def __getattr__(self, key: str) -> Any: ... + def __setattr__(self, key: str, value: Any) -> None: ... + def extend(self, **kwargs: Any) -> Implements: ... + # Forward reference for Management to avoid name collision with Transport.Management _ManagementType: TypeAlias = Management @@ -29,7 +34,7 @@ class Transport: driver_name: str recoverable_connection_errors: tuple[type[BaseException], ...] recoverable_channel_errors: tuple[type[BaseException], ...] - implements: dict[str, Any] + implements: Implements def __init__(self, client: Connection, **kwargs: Any) -> None: ... def establish_connection(self) -> Any: ... @@ -64,8 +69,8 @@ class Transport: class StdChannel: no_ack_consumers: set[str] | None - def Consumer(self, *args: Any, **kwargs: Any) -> Consumer: ... - def Producer(self, *args: Any, **kwargs: Any) -> Producer: ... + def Consumer(self, *args: Any, **kwargs: Any) -> Consumer: ... # ty: ignore[invalid-type-form] + def Producer(self, *args: Any, **kwargs: Any) -> Producer: ... # ty: ignore[invalid-type-form] def get_bindings(self) -> list[dict[str, Any]]: ... def after_reply_message_received(self, queue: str) -> None: ... def prepare_queue_arguments( diff --git a/kombu-stubs/transport/confluentkafka.pyi b/kombu-stubs/transport/confluentkafka.pyi index 82efad4..82d6636 100644 --- a/kombu-stubs/transport/confluentkafka.pyi +++ b/kombu-stubs/transport/confluentkafka.pyi @@ -32,20 +32,20 @@ class Message(VirtualMessage): _Message = Message class QoS(VirtualQoS): - _not_yet_acked: dict[int, Any] + _not_yet_acked: dict[str, Any] @override def can_consume(self) -> bool: ... @override def can_consume_max_estimate(self) -> int: ... @override - def append(self, message: Any, delivery_tag: int) -> None: ... + def append(self, message: Any, delivery_tag: str) -> None: ... @override - def get(self, delivery_tag: int) -> Any: ... + def get(self, delivery_tag: str) -> Any: ... @override - def ack(self, delivery_tag: int) -> None: ... + def ack(self, delivery_tag: str) -> None: ... @override - def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def reject(self, delivery_tag: str, requeue: bool = ...) -> None: ... @override def restore_unacked_once(self, stderr: Any | None = ...) -> None: ... diff --git a/kombu-stubs/transport/filesystem.pyi b/kombu-stubs/transport/filesystem.pyi index 21e756e..702e921 100644 --- a/kombu-stubs/transport/filesystem.pyi +++ b/kombu-stubs/transport/filesystem.pyi @@ -1,15 +1,17 @@ -from io import FileIO +from io import FileIO, TextIOWrapper +from pathlib import Path from typing import Any, NamedTuple from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.transport.virtual.base import BrokerState from kombu.utils.objects import cached_property +from typing_extensions import override VERSION: tuple[int, int, int] -def lock(file: FileIO, flags: int) -> None: ... -def unlock(file: FileIO) -> None: ... +def lock(file: FileIO | TextIOWrapper, flags: int) -> None: ... +def unlock(file: FileIO | TextIOWrapper) -> None: ... class exchange_queue_t(NamedTuple): routing_key: str @@ -24,11 +26,27 @@ class Channel(VirtualChannel): def __init__(self, connection: Any, **kwargs: Any) -> None: ... @property - def control_folder(self) -> Any: ... + def control_folder(self) -> Path: ... @cached_property def store_processed(self) -> bool: ... @property def transport_options(self) -> dict[str, Any]: ... + @override + def get_table(self, exchange: str) -> list[exchange_queue_t]: ... # type: ignore[override] + @override + def _get(self, queue: str) -> dict[str, Any]: ... # type: ignore[override] + @override + def _put(self, queue: str, payload: dict[str, Any], **kwargs: Any) -> None: ... # type: ignore[override] + def _put_fanout( + self, exchange: str, payload: dict[str, Any], routing_key: str, **kwargs: Any + ) -> None: ... + def _queue_bind( + self, exchange: str, routing_key: str, pattern: str | None, queue: str + ) -> None: ... + @override + def _size(self, queue: str) -> int: ... + @override + def _purge(self, queue: str) -> int: ... _Channel = Channel diff --git a/kombu-stubs/transport/gcpubsub.pyi b/kombu-stubs/transport/gcpubsub.pyi index e369347..bb69b20 100644 --- a/kombu-stubs/transport/gcpubsub.pyi +++ b/kombu-stubs/transport/gcpubsub.pyi @@ -55,7 +55,7 @@ class Channel(virtual.Channel): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def entity_name(self, name: str, table: dict[int, int] = ...) -> str: ... @override - def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... + def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... @override def after_reply_message_received(self, queue: str) -> None: ... @override diff --git a/kombu-stubs/transport/librabbitmq.pyi b/kombu-stubs/transport/librabbitmq.pyi new file mode 100644 index 0000000..096da0c --- /dev/null +++ b/kombu-stubs/transport/librabbitmq.pyi @@ -0,0 +1,22 @@ +# This module requires the optional librabbitmq package +from typing import Any + +from kombu.transport.pyamqp import Channel as PyAMQPChannel +from kombu.transport.pyamqp import Connection as PyAMQPConnection +from kombu.transport.pyamqp import Message as PyAMQPMessage +from kombu.transport.pyamqp import Transport as PyAMQPTransport + +class Message(PyAMQPMessage): ... +class Channel(PyAMQPChannel): ... + +class Connection(PyAMQPConnection): + Channel: type[Channel] # pyright: ignore[reportIncompatibleVariableOverride] + +class Transport(PyAMQPTransport): + Connection: type[Connection] # pyright: ignore[reportIncompatibleVariableOverride] + default_port: int + connection_errors: tuple[type[Exception], ...] + channel_errors: tuple[type[Exception], ...] + driver_type: str + driver_name: str + implements: Any diff --git a/kombu-stubs/transport/memory.pyi b/kombu-stubs/transport/memory.pyi index 7d6dc53..1f2bdcc 100644 --- a/kombu-stubs/transport/memory.pyi +++ b/kombu-stubs/transport/memory.pyi @@ -16,6 +16,15 @@ class Channel(VirtualChannel): def __init__(self, connection: Any, **kwargs: Any) -> None: ... @override def close(self) -> None: ... + def _queue_for(self, queue: str) -> Queue[Any]: ... + def _put_fanout( + self, + exchange: str, + message: dict[str, Any], + routing_key: str | None = ..., + **kwargs: Any, + ) -> None: ... + def _queue_bind(self, *args: Any) -> None: ... _Channel = Channel diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi index 16483eb..66c8a18 100644 --- a/kombu-stubs/transport/mongodb.pyi +++ b/kombu-stubs/transport/mongodb.pyi @@ -62,6 +62,31 @@ class Channel(VirtualChannel): def routing(self) -> Collection[Any]: ... @cached_property def broadcast(self) -> Collection[Any]: ... + def _prepare_client_options(self, options: dict[str, Any]) -> dict[str, Any]: ... + def _parse_uri( + self, scheme: str = ... + ) -> tuple[str, str, str | None, str | None]: ... + def _open(self, scheme: str = ...) -> Database[Any]: ... + def _new_queue(self, queue: str, **kwargs: Any) -> None: ... + def _get(self, queue: str) -> Any: ... # type: ignore[override] + def _create_broadcast_cursor( + self, exchange: str, routing_key: str, pattern: str, queue: str + ) -> BroadcastCursor: ... + def _queue_bind( + self, exchange: str, routing_key: str, pattern: str, queue: str + ) -> None: ... + def _get_broadcast_cursor(self, queue: str) -> BroadcastCursor | None: ... + def _put(self, queue: str, message: dict[str, Any], **kwargs: Any) -> None: ... + def _put_fanout( + self, exchange: str, message: dict[str, Any], routing_key: str, **kwargs: Any + ) -> None: ... + def _size(self, queue: str) -> int: ... + def _purge(self, queue: str) -> int: ... + def _create_broadcast(self, database: Any) -> None: ... + def _ensure_indexes(self, database: Any) -> None: ... + def _get_queue_expire(self, queue: str, argument: str) -> datetime | None: ... + def _update_queues_expire(self, queue: str) -> None: ... + def _get_message_expire(self, message: Any) -> datetime | None: ... @cached_property def queues(self) -> Collection[Any]: ... diff --git a/kombu-stubs/transport/redis.pyi b/kombu-stubs/transport/redis.pyi index bd26981..5322088 100644 --- a/kombu-stubs/transport/redis.pyi +++ b/kombu-stubs/transport/redis.pyi @@ -27,6 +27,7 @@ class error_classes_t(NamedTuple): def get_redis_error_classes() -> error_classes_t: ... def get_redis_ConnectionError() -> type[Exception]: ... +def _after_fork_cleanup_channel(channel: Channel) -> None: ... class MutexHeld(Exception): ... @@ -75,13 +76,13 @@ class QoS(VirtualQoS): def __init__(self, *args: Any, **kwargs: Any) -> None: ... @override - def append(self, message: Any, delivery_tag: int) -> None: ... + def append(self, message: Any, delivery_tag: str) -> None: ... @override def restore_unacked(self, client: Any | None = ...) -> None: ... @override - def ack(self, delivery_tag: int) -> None: ... + def ack(self, delivery_tag: str) -> None: ... @override - def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def reject(self, delivery_tag: str, requeue: bool = ...) -> None: ... @contextmanager def pipe_or_acquire( self, pipe: Any | None = ..., client: Any | None = ... diff --git a/kombu-stubs/transport/sqlalchemy/__init__.pyi b/kombu-stubs/transport/sqlalchemy/__init__.pyi index 14fdf57..21701e1 100644 --- a/kombu-stubs/transport/sqlalchemy/__init__.pyi +++ b/kombu-stubs/transport/sqlalchemy/__init__.pyi @@ -3,8 +3,9 @@ from typing import Any from kombu.transport.virtual import Channel as VirtualChannel from kombu.transport.virtual import Transport as VirtualTransport from kombu.utils.objects import cached_property +from sqlalchemy.engine import Engine from sqlalchemy.exc import OperationalError -from sqlalchemy.orm import Session +from sqlalchemy.orm import Session, sessionmaker from typing_extensions import override VERSION: tuple[int, int, int] @@ -22,6 +23,15 @@ class Channel(VirtualChannel): def queue_cls(self) -> type[Any]: ... @cached_property def message_cls(self) -> type[Any]: ... + def _configure_entity_tablenames(self, opts: dict[str, Any]) -> None: ... + def _engine_from_config(self) -> Engine: ... + def _open(self) -> tuple[Engine, sessionmaker[Session]]: ... + @override + def _get(self, queue: str) -> Any: ... # type: ignore[override] + @override + def _put(self, queue: str, payload: Any, **kwargs: Any) -> None: ... # type: ignore[override] + @override + def _size(self, queue: str) -> int: ... _Channel = Channel diff --git a/kombu-stubs/transport/virtual/base.pyi b/kombu-stubs/transport/virtual/base.pyi index 33ffdad..08cee8d 100644 --- a/kombu-stubs/transport/virtual/base.pyi +++ b/kombu-stubs/transport/virtual/base.pyi @@ -4,6 +4,7 @@ from collections import OrderedDict from collections.abc import Callable, Generator, Iterable from typing import Any, NamedTuple, TypeAlias +from amqp.protocol import queue_declare_ok_t from kombu.connection import Connection from kombu.message import Message as BaseMessage from kombu.transport.base import Management as BaseManagement @@ -64,20 +65,20 @@ class BrokerState: def queue_bindings(self, queue: str) -> Generator[queue_binding_t, None, None]: ... class QoS: - channel: AbstractChannel + channel: Channel prefetch_count: int restore_at_shutdown: bool - _delivered: OrderedDict[int, Any] | None - _dirty: set[int] | None + _delivered: OrderedDict[str, Any] | None + _dirty: set[str] | None - def __init__(self, channel: AbstractChannel, prefetch_count: int = ...) -> None: ... + def __init__(self, channel: Channel, prefetch_count: int = ...) -> None: ... def can_consume(self) -> bool: ... def can_consume_max_estimate(self) -> int: ... - def append(self, message: Any, delivery_tag: int) -> None: ... - def get(self, delivery_tag: int) -> Any: ... - def ack(self, delivery_tag: int) -> None: ... - def reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def append(self, message: Any, delivery_tag: str) -> None: ... + def get(self, delivery_tag: str) -> Any: ... + def ack(self, delivery_tag: str) -> None: ... + def reject(self, delivery_tag: str, requeue: bool = ...) -> None: ... def restore_unacked(self) -> None: ... def restore_unacked_once(self, stderr: Any | None = ...) -> None: ... def restore_visible(self, *args: Any, **kwargs: Any) -> None: ... @@ -124,17 +125,20 @@ class Channel(AbstractChannel, StdChannel): max_priority: int deadletter_queue: str | None - connection: Connection + connection: Transport + closed: bool + _active_queues: list[str] _delivery_tags: Iterable[int] - _consumers: dict[str, Any] + _consumers: set[str] _cycle: FairCycle | None _qos: _QoSType | None _tag_to_queue: dict[str, str] from_transport_options: tuple[str, ...] - def __init__(self, connection: Connection, **kwargs: Any) -> None: ... + # NOTE: Despite the name, 'connection' is actually a Transport (from establish_connection()) + def __init__(self, connection: Transport, **kwargs: Any) -> None: ... def exchange_declare( self, exchange: str | None = ..., @@ -172,7 +176,7 @@ class Channel(AbstractChannel, StdChannel): queue: str | None = ..., passive: bool = ..., **kwargs: Any, - ) -> Any: ... + ) -> queue_declare_ok_t: ... def queue_delete( self, queue: str, @@ -212,14 +216,14 @@ class Channel(AbstractChannel, StdChannel): consumer_tag: str | None, **kwargs: Any, ) -> str: ... - def basic_cancel(self, consumer_tag: str) -> None: ... + def basic_cancel(self, consumer_tag: str) -> Any: ... def basic_get( self, queue: str, no_ack: bool = ..., **kwargs: Any, ) -> _MessageType | None: ... - def basic_ack(self, delivery_tag: int, multiple: bool = ...) -> None: ... + def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... def basic_qos( self, prefetch_size: int = ..., @@ -227,7 +231,7 @@ class Channel(AbstractChannel, StdChannel): apply_global: bool = ..., ) -> None: ... def basic_recover(self, requeue: bool = ...) -> None: ... - def basic_reject(self, delivery_tag: int, requeue: bool = ...) -> None: ... + def basic_reject(self, delivery_tag: str, requeue: bool = ...) -> None: ... def close(self) -> None: ... def encode_body( self, body: bytes, encoding: str | None = ... @@ -251,6 +255,19 @@ class Channel(AbstractChannel, StdChannel): properties: dict[str, Any] | None = ..., ) -> dict[str, Any]: ... def flow(self, active: bool = ...) -> None: ... + def _next_delivery_tag(self) -> str: ... + def _get_message_priority(self, message: Any, reverse: bool = ...) -> int: ... + def _restore(self, message: Any) -> None: ... + def _restore_at_beginning(self, message: Any) -> None: ... + def _get_and_deliver(self, queue: str, callback: Callable[..., Any]) -> None: ... + def _get_free_channel_id(self) -> int: ... + def _inplace_augment_message( + self, message: Any, exchange: str | None, routing_key: str + ) -> None: ... + def _lookup( + self, exchange: str, routing_key: str, default: str | None = ... + ) -> list[str] | set[str]: ... + def _reset_cycle(self) -> None: ... @override def after_reply_message_received(self, queue: str) -> None: ... @override @@ -294,9 +311,9 @@ class Transport(BaseTransport): @override def create_channel(self, connection: Connection) -> _ChannelType: ... @override - def close_channel(self, channel: StdChannel) -> None: ... # pyright: ignore[reportIncompatibleMethodOverride] + def close_channel(self, channel: StdChannel) -> None: ... # pyright: ignore[reportIncompatibleMethodOverride] # ty: ignore[invalid-method-override] @override - def establish_connection(self) -> Connection: ... + def establish_connection(self) -> Self: ... @override def close_connection(self, connection: Connection) -> None: ... @override @@ -306,6 +323,21 @@ class Transport(BaseTransport): def on_message_ready( self, channel: _ChannelType, message: _MessageType, queue: str ) -> None: ... + def _deliver(self, message: Any, queue: str | None) -> None: ... + def _drain_channel( + self, + channel: _ChannelType, + callback: Callable[..., Any], + timeout: float | None = ..., + ) -> None: ... + def _make_reader( + self, + connection: Any, + timeout: type[BaseException] = ..., + error: type[BaseException] = ..., + _unavail: tuple[int, ...] = ..., + ) -> Callable[..., Any]: ... + def _reject_inbound_message(self, raw_message: Any) -> None: ... @property @override def default_connection_params(self) -> dict[str, Any]: ... diff --git a/kombu-stubs/utils/__init__.pyi b/kombu-stubs/utils/__init__.pyi index 4b251a8..e343bf6 100644 --- a/kombu-stubs/utils/__init__.pyi +++ b/kombu-stubs/utils/__init__.pyi @@ -3,11 +3,12 @@ from contextlib import contextmanager from typing import Any, BinaryIO, TextIO from uuid import UUID +from kombu.utils.functional import reprkwargs as reprkwargs from kombu.utils.functional import retry_over_time as retry_over_time from kombu.utils.objects import cached_property as cached_property -# Note: runtime __all__ includes reprkwargs but it's not actually defined (kombu bug) -# We match the runtime __all__ exactly +# Note: runtime __all__ includes reprkwargs but it's not actually imported in kombu (kombu bug) +# We include it here to match runtime __all__, stubtest allowlist handles the missing definition __all__ = ( "EqualityDict", "cached_property", @@ -26,10 +27,6 @@ __all__ = ( "uuid", ) -# Defined in __all__ but not actually implemented at runtime (kombu bug) -# We define it in the stub to match __all__ -def reprkwargs(kwargs: Mapping[str, Any], sep: str = ..., fmt: str = ...) -> str: ... - class EqualityDict(dict[Any, Any]): ... def uuid(_uuid: Callable[[], UUID] = ...) -> str: ... diff --git a/kombu-stubs/utils/encodings.pyi b/kombu-stubs/utils/encodings.pyi deleted file mode 100644 index 88d8c09..0000000 --- a/kombu-stubs/utils/encodings.pyi +++ /dev/null @@ -1 +0,0 @@ -def safe_repr(o: object, errors: str = "replace") -> str: ... diff --git a/kombu-stubs/utils/functional.pyi b/kombu-stubs/utils/functional.pyi index 6a649f3..48d1400 100644 --- a/kombu-stubs/utils/functional.pyi +++ b/kombu-stubs/utils/functional.pyi @@ -35,6 +35,10 @@ class LRUCache(UserDict[_KT, _VT]): def itervalues(self) -> Iterator[_VT]: ... @override def popitem(self, last: bool = ...) -> tuple[_KT, _VT]: ... + def _iterate_keys(self) -> Iterator[_KT]: ... + def _iterate_items(self) -> Iterator[tuple[_KT, _VT]]: ... + def __getstate__(self) -> dict[str, Any]: ... + def __setstate__(self, state: dict[str, Any]) -> None: ... def memoize( maxsize: int | None = ..., @@ -46,6 +50,9 @@ class lazy: def __init__(self, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... def __call__(self) -> Any: ... def __deepcopy__(self, memo: dict[int, Any]) -> lazy: ... + def __eq__(self, other: object) -> bool: ... + def __ne__(self, other: object) -> bool: ... + def __reduce__(self) -> tuple[Any, ...]: ... def evaluate(self) -> Any: ... def maybe_evaluate(value: Any) -> Any: ... @@ -72,6 +79,26 @@ def retry_over_time( timeout: float | None = ..., ) -> _T: ... def reprkwargs(kwargs: dict[str, Any], sep: str = ..., fmt: str = ...) -> str: ... +def reprcall( + name: str, + args: tuple[Any, ...] = ..., + kwargs: dict[str, Any] | None = ..., + sep: str = ..., +) -> str: ... +def accepts_argument(func: Callable[..., Any], argument_name: str) -> bool: ... +def fxrange( + start: float = ..., + stop: float | None = ..., + step: float = ..., + repeatlast: bool = ..., +) -> Iterator[float]: ... +def fxrangemax( + start: float = ..., + stop: float | None = ..., + step: float = ..., + max: float | None = ..., +) -> Iterator[float]: ... +def shufflecycle(it: Iterable[_T]) -> Iterator[_T]: ... promise = lazy maybe_promise = maybe_evaluate diff --git a/kombu-stubs/utils/json.pyi b/kombu-stubs/utils/json.pyi index beb0bee..2eb5d81 100644 --- a/kombu-stubs/utils/json.pyi +++ b/kombu-stubs/utils/json.pyi @@ -6,7 +6,7 @@ from typing import Any, TypeAlias, TypeVar T = TypeVar("T") # noqa: PYI001 EncodedT = TypeVar("EncodedT") # noqa: PYI001 -textual_types: tuple[()] +textual_types: tuple[type, ...] class JSONEncoder(json.JSONEncoder): ... diff --git a/kombu-stubs/utils/scheduling.pyi b/kombu-stubs/utils/scheduling.pyi index d57d63c..23f5593 100644 --- a/kombu-stubs/utils/scheduling.pyi +++ b/kombu-stubs/utils/scheduling.pyi @@ -5,6 +5,10 @@ __all__ = ("FairCycle", "priority_cycle", "round_robin_cycle", "sorted_cycle") _T = TypeVar("_T") +def cycle_by_name( + name: str, +) -> type[priority_cycle[Any] | round_robin_cycle[Any] | sorted_cycle[Any]]: ... + class round_robin_cycle(Generic[_T]): items: list[_T] | None @overload @@ -30,5 +34,6 @@ class FairCycle: resources: Sequence[Any], predicate: type[BaseException] = ..., ) -> None: ... - def get(self, callback: Callable[..., _T], **kwargs: Any) -> _T: ... + def _next(self) -> Any: ... + def get(self, callback: Callable[..., _T] | None, **kwargs: Any) -> _T | None: ... def close(self) -> None: ... diff --git a/kombu-stubs/utils/url.pyi b/kombu-stubs/utils/url.pyi index 13599b8..2476f4a 100644 --- a/kombu-stubs/utils/url.pyi +++ b/kombu-stubs/utils/url.pyi @@ -15,6 +15,7 @@ class urlparts(NamedTuple): path: str | None query: Mapping[str, Any] +def _parse_url(url: str) -> urlparts: ... def parse_url(url: str) -> dict[str, Any]: ... def url_to_parts(url: str) -> urlparts: ... def as_url( From 3e04e46be20b2cde8513cdfccc08cfcc10153718 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 8 Jan 2026 18:59:03 +0100 Subject: [PATCH 22/24] Sync kombu-stubs with main-ng Pull latest kombu-stubs changes including: - pyright ignore comments for transport method overrides - Updated allowlist for stubtest --- kombu-stubs/allowlist.txt | 13 +++++++++++-- kombu-stubs/transport/filesystem.pyi | 6 +++--- kombu-stubs/transport/mongodb.pyi | 2 +- kombu-stubs/transport/sqlalchemy/__init__.pyi | 4 ++-- 4 files changed, 17 insertions(+), 8 deletions(-) diff --git a/kombu-stubs/allowlist.txt b/kombu-stubs/allowlist.txt index db81b94..9358baa 100644 --- a/kombu-stubs/allowlist.txt +++ b/kombu-stubs/allowlist.txt @@ -1,9 +1,18 @@ # kombu.transport.librabbitmq is an optional dependency that may not be installed kombu.transport.librabbitmq -# kombu.utils has reprkwargs in __all__ but the function is not defined at runtime (kombu bug) -kombu.utils.__all__ +# kombu.utils.reprkwargs is in __all__ but the function is not defined at runtime (kombu bug) +kombu.utils.reprkwargs # kombu.transport.gcpubsub.Transport.channel_errors has a complex tuple type at runtime # that includes dynamically imported exceptions that cannot be accurately typed kombu.transport.gcpubsub.Transport.channel_errors + +# functools.total_ordering generates comparison methods with a NotImplemented parameter +# that is an implementation detail and should not be typed in stubs +kombu.asynchronous.timer.Entry.__ge__ +kombu.asynchronous.timer.Entry.__gt__ +kombu.asynchronous.timer.Entry.__le__ + +# Lock parameter accepts any callable that returns a lock-like object, not just type[Lock] +kombu.clocks.LamportClock.__init__ diff --git a/kombu-stubs/transport/filesystem.pyi b/kombu-stubs/transport/filesystem.pyi index 702e921..a8c12b3 100644 --- a/kombu-stubs/transport/filesystem.pyi +++ b/kombu-stubs/transport/filesystem.pyi @@ -32,11 +32,11 @@ class Channel(VirtualChannel): @property def transport_options(self) -> dict[str, Any]: ... @override - def get_table(self, exchange: str) -> list[exchange_queue_t]: ... # type: ignore[override] + def get_table(self, exchange: str) -> list[exchange_queue_t]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @override - def _get(self, queue: str) -> dict[str, Any]: ... # type: ignore[override] + def _get(self, queue: str) -> dict[str, Any]: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @override - def _put(self, queue: str, payload: dict[str, Any], **kwargs: Any) -> None: ... # type: ignore[override] + def _put(self, queue: str, payload: dict[str, Any], **kwargs: Any) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def _put_fanout( self, exchange: str, payload: dict[str, Any], routing_key: str, **kwargs: Any ) -> None: ... diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi index 66c8a18..c85da90 100644 --- a/kombu-stubs/transport/mongodb.pyi +++ b/kombu-stubs/transport/mongodb.pyi @@ -68,7 +68,7 @@ class Channel(VirtualChannel): ) -> tuple[str, str, str | None, str | None]: ... def _open(self, scheme: str = ...) -> Database[Any]: ... def _new_queue(self, queue: str, **kwargs: Any) -> None: ... - def _get(self, queue: str) -> Any: ... # type: ignore[override] + def _get(self, queue: str) -> Any: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def _create_broadcast_cursor( self, exchange: str, routing_key: str, pattern: str, queue: str ) -> BroadcastCursor: ... diff --git a/kombu-stubs/transport/sqlalchemy/__init__.pyi b/kombu-stubs/transport/sqlalchemy/__init__.pyi index 21701e1..2077119 100644 --- a/kombu-stubs/transport/sqlalchemy/__init__.pyi +++ b/kombu-stubs/transport/sqlalchemy/__init__.pyi @@ -27,9 +27,9 @@ class Channel(VirtualChannel): def _engine_from_config(self) -> Engine: ... def _open(self) -> tuple[Engine, sessionmaker[Session]]: ... @override - def _get(self, queue: str) -> Any: ... # type: ignore[override] + def _get(self, queue: str) -> Any: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @override - def _put(self, queue: str, payload: Any, **kwargs: Any) -> None: ... # type: ignore[override] + def _put(self, queue: str, payload: Any, **kwargs: Any) -> None: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] @override def _size(self, queue: str) -> int: ... From feb9cbccb213a3beca0097c89fbebef6182aef40 Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 8 Jan 2026 19:05:14 +0100 Subject: [PATCH 23/24] Remove deprecated allowlist entries from kombu-stubs --- kombu-stubs/allowlist.txt | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 kombu-stubs/allowlist.txt diff --git a/kombu-stubs/allowlist.txt b/kombu-stubs/allowlist.txt deleted file mode 100644 index 9358baa..0000000 --- a/kombu-stubs/allowlist.txt +++ /dev/null @@ -1,18 +0,0 @@ -# kombu.transport.librabbitmq is an optional dependency that may not be installed -kombu.transport.librabbitmq - -# kombu.utils.reprkwargs is in __all__ but the function is not defined at runtime (kombu bug) -kombu.utils.reprkwargs - -# kombu.transport.gcpubsub.Transport.channel_errors has a complex tuple type at runtime -# that includes dynamically imported exceptions that cannot be accurately typed -kombu.transport.gcpubsub.Transport.channel_errors - -# functools.total_ordering generates comparison methods with a NotImplemented parameter -# that is an implementation detail and should not be typed in stubs -kombu.asynchronous.timer.Entry.__ge__ -kombu.asynchronous.timer.Entry.__gt__ -kombu.asynchronous.timer.Entry.__le__ - -# Lock parameter accepts any callable that returns a lock-like object, not just type[Lock] -kombu.clocks.LamportClock.__init__ From e28eae0b16150ce742f579121b41b186b90908ef Mon Sep 17 00:00:00 2001 From: Oliver Haas Date: Thu, 8 Jan 2026 19:16:37 +0100 Subject: [PATCH 24/24] Add @override decorators for basedpyright compliance - Add @override decorators for implicit overrides to satisfy basedpyright - Remove unnecessary pyright ignore comment in azureservicebus.pyi --- kombu-stubs/abstract.pyi | 3 ++- kombu-stubs/connection.pyi | 1 + kombu-stubs/entity.pyi | 7 +++++++ kombu-stubs/messaging.pyi | 3 ++- kombu-stubs/transport/azureservicebus.pyi | 2 +- kombu-stubs/transport/base.pyi | 3 ++- kombu-stubs/transport/mongodb.pyi | 5 +++++ kombu-stubs/utils/functional.pyi | 3 +++ 8 files changed, 23 insertions(+), 4 deletions(-) diff --git a/kombu-stubs/abstract.pyi b/kombu-stubs/abstract.pyi index 1df4b67..adb9d76 100644 --- a/kombu-stubs/abstract.pyi +++ b/kombu-stubs/abstract.pyi @@ -2,7 +2,7 @@ from typing import Any, TypeVar from kombu.connection import Connection from kombu.transport.base import StdChannel -from typing_extensions import Self +from typing_extensions import Self, override __all__ = ("MaybeChannelBound", "Object") @@ -17,6 +17,7 @@ class Object: def __init__(self, *args: Any, **kwargs: Any) -> None: ... def __copy__(self) -> Self: ... + @override def __reduce__(self) -> tuple[Any, ...]: ... def as_dict(self, recurse: bool = ...) -> dict[str, Any]: ... diff --git a/kombu-stubs/connection.pyi b/kombu-stubs/connection.pyi index 46a471c..248ca68 100644 --- a/kombu-stubs/connection.pyi +++ b/kombu-stubs/connection.pyi @@ -217,6 +217,7 @@ class Connection: def _do_close_self(self) -> None: ... def _do_close_transport(self) -> None: ... def _close(self) -> None: ... + @override def __reduce__(self) -> tuple[Any, ...]: ... def __copy__(self) -> Connection: ... def __eqhash__(self) -> tuple[str, ...]: ... diff --git a/kombu-stubs/entity.pyi b/kombu-stubs/entity.pyi index 33593bf..d381409 100644 --- a/kombu-stubs/entity.pyi +++ b/kombu-stubs/entity.pyi @@ -4,6 +4,7 @@ from typing import Any from kombu.abstract import MaybeChannelBound, Object from kombu.message import Message as _Message from kombu.transport.base import StdChannel +from typing_extensions import override __all__ = ("Exchange", "Queue", "binding", "maybe_delivery_mode") @@ -79,8 +80,11 @@ class Exchange(MaybeChannelBound): unbind_arguments: dict[str, Any] | None = ..., ) -> binding: ... # ty: ignore[invalid-type-form] def _can_declare(self) -> bool: ... + @override def __eq__(self, other: object) -> bool: ... + @override def __ne__(self, other: object) -> bool: ... + @override def __hash__(self) -> int: ... class Queue(MaybeChannelBound): @@ -170,8 +174,11 @@ class Queue(MaybeChannelBound): def _create_bindings( self, nowait: bool = ..., channel: StdChannel | None = ... ) -> None: ... + @override def __eq__(self, other: object) -> bool: ... + @override def __ne__(self, other: object) -> bool: ... + @override def __hash__(self) -> int: ... class binding(Object): diff --git a/kombu-stubs/messaging.pyi b/kombu-stubs/messaging.pyi index b51c4e3..edd6bda 100644 --- a/kombu-stubs/messaging.pyi +++ b/kombu-stubs/messaging.pyi @@ -7,7 +7,7 @@ from kombu.connection import Connection from kombu.entity import Exchange, Queue from kombu.message import Message from kombu.transport.base import StdChannel -from typing_extensions import Self +from typing_extensions import Self, override __all__ = ("Consumer", "Exchange", "Producer", "Queue") @@ -69,6 +69,7 @@ class Producer: exc_tb: TracebackType | None, ) -> None: ... def __reduce_args__(self) -> tuple[Any, ...]: ... + @override def __reduce__(self) -> tuple[Any, ...]: ... def _get_channel(self) -> StdChannel: ... def _set_channel(self, channel: Connection | StdChannel) -> None: ... diff --git a/kombu-stubs/transport/azureservicebus.pyi b/kombu-stubs/transport/azureservicebus.pyi index 9419bde..c194de0 100644 --- a/kombu-stubs/transport/azureservicebus.pyi +++ b/kombu-stubs/transport/azureservicebus.pyi @@ -41,7 +41,7 @@ class Channel(VirtualChannel): def basic_cancel(self, consumer_tag: str) -> None: ... def entity_name(self, name: str, table: dict[int, int] | None = ...) -> str: ... @override - def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... # pyright: ignore[reportIncompatibleMethodOverride] + def basic_ack(self, delivery_tag: str, multiple: bool = ...) -> None: ... @override def close(self) -> None: ... @cached_property diff --git a/kombu-stubs/transport/base.pyi b/kombu-stubs/transport/base.pyi index 4623286..31ebabe 100644 --- a/kombu-stubs/transport/base.pyi +++ b/kombu-stubs/transport/base.pyi @@ -5,12 +5,13 @@ from kombu.connection import Connection from kombu.message import Message as Message from kombu.messaging import Consumer, Producer from kombu.utils.objects import cached_property -from typing_extensions import Self +from typing_extensions import Self, override __all__ = ("Management", "Message", "StdChannel", "Transport") class Implements(dict[str, Any]): def __getattr__(self, key: str) -> Any: ... + @override def __setattr__(self, key: str, value: Any) -> None: ... def extend(self, **kwargs: Any) -> Implements: ... diff --git a/kombu-stubs/transport/mongodb.pyi b/kombu-stubs/transport/mongodb.pyi index c85da90..0c8ca1f 100644 --- a/kombu-stubs/transport/mongodb.pyi +++ b/kombu-stubs/transport/mongodb.pyi @@ -67,7 +67,9 @@ class Channel(VirtualChannel): self, scheme: str = ... ) -> tuple[str, str, str | None, str | None]: ... def _open(self, scheme: str = ...) -> Database[Any]: ... + @override def _new_queue(self, queue: str, **kwargs: Any) -> None: ... + @override def _get(self, queue: str) -> Any: ... # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] def _create_broadcast_cursor( self, exchange: str, routing_key: str, pattern: str, queue: str @@ -76,11 +78,14 @@ class Channel(VirtualChannel): self, exchange: str, routing_key: str, pattern: str, queue: str ) -> None: ... def _get_broadcast_cursor(self, queue: str) -> BroadcastCursor | None: ... + @override def _put(self, queue: str, message: dict[str, Any], **kwargs: Any) -> None: ... def _put_fanout( self, exchange: str, message: dict[str, Any], routing_key: str, **kwargs: Any ) -> None: ... + @override def _size(self, queue: str) -> int: ... + @override def _purge(self, queue: str) -> int: ... def _create_broadcast(self, database: Any) -> None: ... def _ensure_indexes(self, database: Any) -> None: ... diff --git a/kombu-stubs/utils/functional.pyi b/kombu-stubs/utils/functional.pyi index 48d1400..396ea13 100644 --- a/kombu-stubs/utils/functional.pyi +++ b/kombu-stubs/utils/functional.pyi @@ -50,8 +50,11 @@ class lazy: def __init__(self, fun: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ... def __call__(self) -> Any: ... def __deepcopy__(self, memo: dict[int, Any]) -> lazy: ... + @override def __eq__(self, other: object) -> bool: ... + @override def __ne__(self, other: object) -> bool: ... + @override def __reduce__(self) -> tuple[Any, ...]: ... def evaluate(self) -> Any: ...