From 8912ebf8cc8bc6edabd28306ceb8ba5e0cf2b89e Mon Sep 17 00:00:00 2001 From: Topher Brown <206988+topher200@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:38:10 -0400 Subject: [PATCH 1/2] Update arbiter.pyi `Arbiter.LISTENERS` is actually a list of `BaseSocket`. You can see this if you follow the calls from [`create_sockets` in Gunicorn](https://github.com/benoitc/gunicorn/blob/56b5ad87f8d72a674145c273ed8f547513c2b409/gunicorn/arbiter.py#L156). It's also correctly `BaseSocket` in the [Typeshed `sock.pyi` file](https://github.com/python/typeshed/blob/main/stubs/gunicorn/gunicorn/sock.pyi#L35). --- stubs/gunicorn/gunicorn/arbiter.pyi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stubs/gunicorn/gunicorn/arbiter.pyi b/stubs/gunicorn/gunicorn/arbiter.pyi index 0f7ae45f5def..027c3490aafd 100644 --- a/stubs/gunicorn/gunicorn/arbiter.pyi +++ b/stubs/gunicorn/gunicorn/arbiter.pyi @@ -5,6 +5,7 @@ from typing import ClassVar from gunicorn.app.base import BaseApplication from gunicorn.config import Config from gunicorn.glogging import Logger as GLogger +from gunicorn.sock import BaseSocket from gunicorn.workers.base import Worker from ._types import _AddressType @@ -14,7 +15,7 @@ class Arbiter: WORKER_BOOT_ERROR: ClassVar[int] APP_LOAD_ERROR: ClassVar[int] START_CTX: ClassVar[dict[int | str, str | list[str]]] - LISTENERS: ClassVar[list[socket.socket]] + LISTENERS: ClassVar[list[BaseSocket]] WORKERS: ClassVar[dict[int, Worker]] PIPE: ClassVar[list[int]] SIG_QUEUE: ClassVar[list[int]] From 009feffb91858ddcfaa053b8a29bd0f77b24d864 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 02:42:04 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks --- stubs/gunicorn/gunicorn/arbiter.pyi | 1 - 1 file changed, 1 deletion(-) diff --git a/stubs/gunicorn/gunicorn/arbiter.pyi b/stubs/gunicorn/gunicorn/arbiter.pyi index 027c3490aafd..8d4f221aa857 100644 --- a/stubs/gunicorn/gunicorn/arbiter.pyi +++ b/stubs/gunicorn/gunicorn/arbiter.pyi @@ -1,4 +1,3 @@ -import socket from types import FrameType from typing import ClassVar