mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-28 06:36:54 +08:00
Add _typeshed.(Opt)ExcInfo (#7645)
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
from _typeshed import OptExcInfo
|
||||
from _typeshed.wsgi import ErrorStream, InputStream, StartResponse, WSGIApplication, WSGIEnvironment
|
||||
from abc import abstractmethod
|
||||
from types import TracebackType
|
||||
from typing import IO, Callable, MutableMapping
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from .headers import Headers
|
||||
from .util import FileWrapper
|
||||
|
||||
__all__ = ["BaseHandler", "SimpleHandler", "BaseCGIHandler", "CGIHandler", "IISCGIHandler", "read_environ"]
|
||||
|
||||
_exc_info: TypeAlias = tuple[type[BaseException] | None, BaseException | None, TracebackType | None]
|
||||
|
||||
def format_date_time(timestamp: float | None) -> str: ... # undocumented
|
||||
def read_environ() -> dict[str, str]: ...
|
||||
|
||||
@@ -40,7 +37,7 @@ class BaseHandler:
|
||||
def set_content_length(self) -> None: ...
|
||||
def cleanup_headers(self) -> None: ...
|
||||
def start_response(
|
||||
self, status: str, headers: list[tuple[str, str]], exc_info: _exc_info | None = ...
|
||||
self, status: str, headers: list[tuple[str, str]], exc_info: OptExcInfo | None = ...
|
||||
) -> Callable[[bytes], None]: ...
|
||||
def send_preamble(self) -> None: ...
|
||||
def write(self, data: bytes) -> None: ...
|
||||
@@ -50,7 +47,7 @@ class BaseHandler:
|
||||
def send_headers(self) -> None: ...
|
||||
def result_is_file(self) -> bool: ...
|
||||
def client_is_modern(self) -> bool: ...
|
||||
def log_exception(self, exc_info: _exc_info) -> None: ...
|
||||
def log_exception(self, exc_info: OptExcInfo) -> None: ...
|
||||
def handle_error(self) -> None: ...
|
||||
def error_output(self, environ: WSGIEnvironment, start_response: StartResponse) -> list[bytes]: ...
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user