From e6debef8234cb3786b53bc26576507b84eed9e0e Mon Sep 17 00:00:00 2001 From: sudosubin Date: Wed, 17 Apr 2024 01:13:04 +0900 Subject: [PATCH 1/3] 5.0: Update `django.core.servers.basehttp` --- django-stubs/core/servers/basehttp.pyi | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/django-stubs/core/servers/basehttp.pyi b/django-stubs/core/servers/basehttp.pyi index 71c255379..6cb423014 100644 --- a/django-stubs/core/servers/basehttp.pyi +++ b/django-stubs/core/servers/basehttp.pyi @@ -1,10 +1,13 @@ import socketserver from io import BytesIO -from typing import Any +from typing import Any, Callable from wsgiref import simple_server from django.core.handlers.wsgi import WSGIHandler, WSGIRequest +def get_internal_wsgi_application() -> WSGIHandler: ... +def is_broken_pipe_error() -> bool: ... + class WSGIServer(simple_server.WSGIServer): request_queue_size: int address_family: Any @@ -32,4 +35,12 @@ class WSGIRequestHandler(simple_server.WSGIRequestHandler): request_version: str def handle(self) -> None: ... -def get_internal_wsgi_application() -> WSGIHandler: ... +def run( + addr: str, + port: str, + wsgi_handler: WSGIHandler, + ipv6: bool = ..., + threading: bool = ..., + on_bind: Callable[[str], None] | None = ..., + server_cls: type[WSGIServer] = ..., +) -> None: ... From 53f555d8beca1e46ea5fa15728fb0a4840933633 Mon Sep 17 00:00:00 2001 From: Subin Kim Date: Fri, 19 Apr 2024 19:45:43 +0900 Subject: [PATCH 2/3] Update django-stubs/core/servers/basehttp.pyi Co-authored-by: Petter Friberg --- django-stubs/core/servers/basehttp.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-stubs/core/servers/basehttp.pyi b/django-stubs/core/servers/basehttp.pyi index 6cb423014..0ea77177f 100644 --- a/django-stubs/core/servers/basehttp.pyi +++ b/django-stubs/core/servers/basehttp.pyi @@ -37,7 +37,7 @@ class WSGIRequestHandler(simple_server.WSGIRequestHandler): def run( addr: str, - port: str, + port: int, wsgi_handler: WSGIHandler, ipv6: bool = ..., threading: bool = ..., From b4e70006d745c5eee9e251a1f71717f7cde3220f Mon Sep 17 00:00:00 2001 From: Subin Kim Date: Fri, 19 Apr 2024 19:45:47 +0900 Subject: [PATCH 3/3] Update django-stubs/core/servers/basehttp.pyi Co-authored-by: Petter Friberg --- django-stubs/core/servers/basehttp.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-stubs/core/servers/basehttp.pyi b/django-stubs/core/servers/basehttp.pyi index 0ea77177f..0e1120fb9 100644 --- a/django-stubs/core/servers/basehttp.pyi +++ b/django-stubs/core/servers/basehttp.pyi @@ -36,7 +36,7 @@ class WSGIRequestHandler(simple_server.WSGIRequestHandler): def handle(self) -> None: ... def run( - addr: str, + addr: str | bytes | bytearray, port: int, wsgi_handler: WSGIHandler, ipv6: bool = ...,