diff --git a/stubs/gevent/METADATA.toml b/stubs/gevent/METADATA.toml index 960f4c760e7f..456b719c6819 100644 --- a/stubs/gevent/METADATA.toml +++ b/stubs/gevent/METADATA.toml @@ -1,4 +1,4 @@ -version = "24.11.*" +version = "25.4.*" upstream_repository = "https://github.com/gevent/gevent" requires = ["types-greenlet", "types-psutil"] diff --git a/stubs/gevent/gevent/_config.pyi b/stubs/gevent/gevent/_config.pyi index 802f374fea38..757bb59d7571 100644 --- a/stubs/gevent/gevent/_config.pyi +++ b/stubs/gevent/gevent/_config.pyi @@ -72,6 +72,7 @@ class Config: ares_udp_port: _SettingDescriptor[str | int | None] ares_tcp_port: _SettingDescriptor[str | int | None] ares_servers: _SettingDescriptor[Sequence[str] | str | None] + print_blocking_reports: _SettingDescriptor[bool] class ImportableSetting(Generic[_T]): default: str | Sequence[str] diff --git a/stubs/gevent/gevent/lock.pyi b/stubs/gevent/gevent/lock.pyi index ddaf1ab85701..2daa782741fa 100644 --- a/stubs/gevent/gevent/lock.pyi +++ b/stubs/gevent/gevent/lock.pyi @@ -38,3 +38,4 @@ class RLock: def __enter__(self) -> bool: ... def release(self) -> None: ... def __exit__(self, typ: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None) -> None: ... + def locked(self) -> bool: ... diff --git a/stubs/gevent/gevent/pywsgi.pyi b/stubs/gevent/gevent/pywsgi.pyi index 8c25035fd2cb..91400018eabd 100644 --- a/stubs/gevent/gevent/pywsgi.pyi +++ b/stubs/gevent/gevent/pywsgi.pyi @@ -28,6 +28,7 @@ class Input: position: int chunked_input: bool chunk_length: int + send_100_continue_enabled: bool def __init__( self, rfile: BufferedReader, content_length: int | None, socket: _GeventSocket | None = None, chunked_input: bool = False ) -> None: ... diff --git a/stubs/gevent/gevent/queue.pyi b/stubs/gevent/gevent/queue.pyi index 515aae6f5588..9574e51ffebd 100644 --- a/stubs/gevent/gevent/queue.pyi +++ b/stubs/gevent/gevent/queue.pyi @@ -3,7 +3,7 @@ from collections import deque from collections.abc import Iterable # technically it is using _PySimpleQueue, which has the same interface as SimpleQueue -from queue import Empty as Empty, Full as Full, SimpleQueue as SimpleQueue +from queue import Empty as Empty, Full as Full from typing import Any, Generic, Literal, TypeVar, final, overload from typing_extensions import Self @@ -19,13 +19,14 @@ else: _T = TypeVar("_T") -class Queue(Generic[_T]): +class SimpleQueue(Generic[_T]): @property def hub(self) -> Hub: ... # readonly in Cython @property def queue(self) -> deque[_T]: ... # readonly in Cython maxsize: int | None is_shutdown: bool + @overload def __init__(self, maxsize: int | None = None) -> None: ... @overload @@ -42,7 +43,6 @@ class Queue(Generic[_T]): def put(self, item: _T, block: bool = True, timeout: float | None = None) -> None: ... def put_nowait(self, item: _T) -> None: ... def qsize(self) -> int: ... - def shutdown(self, immediate: bool = False) -> None: ... def __bool__(self) -> bool: ... def __iter__(self) -> Self: ... def __len__(self) -> int: ... @@ -50,7 +50,7 @@ class Queue(Generic[_T]): next = __next__ @final -class UnboundQueue(Queue[_T]): +class UnboundQueue(SimpleQueue[_T]): @overload def __init__(self, maxsize: None = None) -> None: ... @overload @@ -58,10 +58,10 @@ class UnboundQueue(Queue[_T]): @overload def __init__(self, maxsize: None = None, *, items: Iterable[_T]) -> None: ... -class PriorityQueue(Queue[_T]): ... -class LifoQueue(Queue[_T]): ... +class PriorityQueue(SimpleQueue[_T]): ... +class LifoQueue(SimpleQueue[_T]): ... -class JoinableQueue(Queue[_T]): +class Queue(SimpleQueue[_T]): @property def unfinished_tasks(self) -> int: ... # readonly in Cython @overload @@ -72,6 +72,9 @@ class JoinableQueue(Queue[_T]): def __init__(self, maxsize: int | None = None, *, items: Iterable[_T], unfinished_tasks: int | None = None) -> None: ... def join(self, timeout: float | None = None) -> bool: ... def task_done(self) -> None: ... + def shutdown(self, immediate: bool = False) -> None: ... + +JoinableQueue = Queue class Channel(Generic[_T]): @property