forked from benoitc/gunicorn
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
463 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from _typeshed import Incomplete | ||
|
||
version_info: Incomplete | ||
version_info: tuple[int, int, int] | ||
__version__: str | ||
SERVER: str | ||
SERVER_SOFTWARE: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
from argparse import ArgumentParser, Namespace | ||
|
||
from _typeshed import Incomplete | ||
from _typeshed.wsgi import WSGIApplication as _WSGIApplication | ||
|
||
from gunicorn import debug as debug | ||
from gunicorn import util as util | ||
from gunicorn.arbiter import Arbiter as Arbiter | ||
from gunicorn.config import Config as Config | ||
from gunicorn.config import Config | ||
from gunicorn.config import get_default_config_file as get_default_config_file | ||
|
||
# from abc import abstractmethod, ABCMeta | ||
|
||
class BaseApplication: | ||
usage: Incomplete | ||
cfg: Incomplete | ||
callable: Incomplete | ||
prog: Incomplete | ||
usage: str | None | ||
cfg: Config | ||
callable: None | _WSGIApplication | ||
prog: str | None | ||
logger: Incomplete | ||
def __init__(self, usage: Incomplete | None = ..., prog: Incomplete | None = ...) -> None: ... | ||
def __init__(self, usage: str | None = ..., prog: str | None = ...) -> None: ... | ||
def do_load_config(self) -> None: ... | ||
def load_default_config(self) -> None: ... | ||
def init(self, parser, opts, args) -> None: ... | ||
def load(self) -> None: ... | ||
def init(self, parser: ArgumentParser, opts: Namespace, args: list[str]) -> None: ... | ||
def load(self) -> _WSGIApplication: ... | ||
def load_config(self) -> None: ... | ||
def reload(self) -> None: ... | ||
def wsgi(self): ... | ||
def wsgi(self) -> _WSGIApplication: ... | ||
def run(self) -> None: ... | ||
|
||
class Application(BaseApplication): | ||
def chdir(self) -> None: ... | ||
def get_config_from_filename(self, filename): ... | ||
def get_config_from_module_name(self, module_name): ... | ||
def load_config_from_module_name_or_filename(self, location): ... | ||
def load_config_from_file(self, filename): ... | ||
def get_config_from_filename(self, filename: str) -> Config: ... | ||
def get_config_from_module_name(self, module_name: str) -> Config: ... | ||
def load_config_from_module_name_or_filename(self, location: str) -> Config: ... | ||
def load_config_from_file(self, filename: str) -> Config: ... | ||
def load_config(self) -> None: ... | ||
def run(self) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
from _typeshed import Incomplete | ||
from _typeshed.wsgi import WSGIApplication as _WSGIApplication | ||
|
||
from gunicorn.app.wsgiapp import WSGIApplication as WSGIApplication | ||
from gunicorn.config import get_default_config_file as get_default_config_file | ||
|
||
def get_wsgi_app(config_uri, name: Incomplete | None = ..., defaults: Incomplete | None = ...): ... | ||
def has_logging_config(config_file): ... | ||
def serve(app, global_conf, **local_conf): ... | ||
def get_wsgi_app( | ||
config_uri: str, name: Incomplete | None = ..., defaults: Incomplete | None = ... | ||
) -> _WSGIApplication: ... | ||
def has_logging_config(config_file: str) -> bool: ... | ||
def serve(app: _WSGIApplication, global_conf: dict[str, Incomplete], **local_conf: Incomplete) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
from argparse import ArgumentParser, Namespace | ||
|
||
from _typeshed import Incomplete | ||
from _typeshed.wsgi import WSGIApplication as _WSGIApplication | ||
|
||
from gunicorn import util as util | ||
from gunicorn.app.base import Application as Application | ||
from gunicorn.errors import ConfigError as ConfigError | ||
|
||
class WSGIApplication(Application): | ||
app_uri: Incomplete | ||
def init(self, parser, opts, args) -> None: ... | ||
def init(self, parser: ArgumentParser, opts: Namespace, args: list[str]) -> None: ... | ||
def load_config(self) -> None: ... | ||
def load_wsgiapp(self): ... | ||
def load_pasteapp(self): ... | ||
def load(self): ... | ||
def load_wsgiapp(self) -> _WSGIApplication: ... | ||
def load_pasteapp(self) -> _WSGIApplication: ... | ||
def load(self) -> _WSGIApplication: ... | ||
|
||
def run() -> None: ... | ||
def run(prog: str | None = ...) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
from collections.abc import Container | ||
from types import FrameType | ||
from typing import Any, Literal | ||
|
||
from _typeshed import Incomplete | ||
from typing_extensions import Self | ||
|
||
class Spew: | ||
trace_names: Incomplete | ||
show_values: Incomplete | ||
def __init__(self, trace_names: Incomplete | None = ..., show_values: bool = ...) -> None: ... | ||
def __call__(self, frame, event, arg): ... | ||
def __init__(self, trace_names: Container[str] | None = ..., show_values: bool = ...) -> None: ... | ||
def __call__( | ||
self, frame: FrameType, event: Literal["call", "line", "return", "exception", "opcode"], arg: Any | ||
) -> Self: ... | ||
|
||
def spew(trace_names: Incomplete | None = ..., show_values: bool = ...) -> None: ... | ||
def spew(trace_names: Container[str] | None = ..., show_values: bool = ...) -> None: ... | ||
def unspew() -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,48 @@ | ||
from collections.abc import Generator | ||
from collections.abc import Generator, Iterator | ||
from io import BytesIO | ||
|
||
from _typeshed import Incomplete | ||
from typing_extensions import Protocol, Self | ||
|
||
from gunicorn.http.errors import ChunkMissingTerminator as ChunkMissingTerminator | ||
from gunicorn.http.errors import InvalidChunkSize as InvalidChunkSize | ||
from gunicorn.http.errors import NoMoreData as NoMoreData | ||
from gunicorn.http.errors import ChunkMissingTerminator, InvalidChunkSize, NoMoreData | ||
from gunicorn.http.message import Message | ||
from gunicorn.http.unreader import Unreader | ||
|
||
class _Read(Protocol): | ||
def read(self, size: int) -> bytes: ... | ||
|
||
class ChunkedReader: | ||
req: Incomplete | ||
req: Message | ||
parser: Incomplete | ||
buf: Incomplete | ||
def __init__(self, req, unreader) -> None: ... | ||
def read(self, size): ... | ||
def parse_trailers(self, unreader, data): ... | ||
def parse_chunked(self, unreader) -> Generator[Incomplete, None, None]: ... | ||
def parse_chunk_size(self, unreader, data: Incomplete | None = ...): ... | ||
def get_data(self, unreader, buf) -> None: ... | ||
buf: BytesIO | ||
def __init__(self, req: Message, unreader: Unreader) -> None: ... | ||
def read(self, size: int) -> bytes: ... | ||
def parse_trailers(self, unreader: Unreader, data: bytes) -> bytes: ... | ||
def parse_chunked(self, unreader: Unreader) -> Generator[bytes, None, None]: ... | ||
def parse_chunk_size(self, unreader: Unreader, data: bytes | None = ...) -> tuple[int, bytes]: ... | ||
def get_data(self, unreader: Unreader, buf: BytesIO) -> None: ... | ||
|
||
class LengthReader: | ||
unreader: Incomplete | ||
length: Incomplete | ||
def __init__(self, unreader, length) -> None: ... | ||
def read(self, size): ... | ||
unreader: Unreader | ||
length: int | ||
def __init__(self, unreader: Unreader, length: int) -> None: ... | ||
def read(self, size: int) -> bytes: ... | ||
|
||
class EOFReader: | ||
unreader: Incomplete | ||
buf: Incomplete | ||
unreader: Unreader | ||
buf: BytesIO | ||
finished: bool | ||
def __init__(self, unreader) -> None: ... | ||
def read(self, size): ... | ||
def __init__(self, unreader: Unreader) -> None: ... | ||
def read(self, size: int) -> bytes: ... | ||
|
||
class Body: | ||
reader: Incomplete | ||
buf: Incomplete | ||
def __init__(self, reader) -> None: ... | ||
def __iter__(self): ... | ||
def __next__(self): ... | ||
reader: _Read | ||
buf: BytesIO | ||
def __init__(self, reader: _Read) -> None: ... | ||
def __iter__(self) -> Self: ... | ||
def __next__(self) -> Iterator[bytes]: ... | ||
next = __next__ | ||
def getsize(self, size): ... | ||
def read(self, size: Incomplete | None = ...): ... | ||
def readline(self, size: Incomplete | None = ...): ... | ||
def readlines(self, size: Incomplete | None = ...): ... | ||
def getsize(self, size: int) -> int: ... | ||
def read(self, size: int | None = ...) -> bytes: ... | ||
def readline(self, size: int | None = ...) -> bytes: ... | ||
def readlines(self, size: int | None = ...) -> list[bytes]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,65 @@ | ||
from _typeshed import Incomplete | ||
|
||
from gunicorn.http.message import Message | ||
|
||
class ParseException(Exception): ... | ||
|
||
class NoMoreData(IOError): | ||
buf: Incomplete | ||
def __init__(self, buf: bytes = ...) -> None: ... | ||
|
||
class ConfigurationProblem(ParseException): | ||
info: str | ||
code: int | ||
def __init__(self, info: str) -> None: ... | ||
|
||
class InvalidRequestLine(ParseException): | ||
req: Incomplete | ||
req: str | ||
code: int | ||
def __init__(self, req: str) -> None: ... | ||
|
||
class InvalidRequestMethod(ParseException): | ||
method: Incomplete | ||
method: str | ||
def __init__(self, method: str) -> None: ... | ||
|
||
class InvalidHTTPVersion(ParseException): | ||
version: Incomplete | ||
version: str | ||
def __init__(self, version: str) -> None: ... | ||
|
||
class InvalidHeader(ParseException): | ||
hdr: Incomplete | ||
req: Incomplete | ||
def __init__(self, hdr, req: Incomplete | None = ...) -> None: ... | ||
hdr: str | ||
req: Message | None | ||
def __init__(self, hdr: str, req: Message | None = ...) -> None: ... | ||
|
||
class InvalidHeaderName(ParseException): | ||
hdr: Incomplete | ||
def __init__(self, hdr) -> None: ... | ||
hdr: str | ||
def __init__(self, hdr: str) -> None: ... | ||
|
||
class InvalidChunkSize(IOError): | ||
data: Incomplete | ||
def __init__(self, data) -> None: ... | ||
data: bytes | ||
def __init__(self, data: bytes) -> None: ... | ||
|
||
class ChunkMissingTerminator(IOError): | ||
term: Incomplete | ||
def __init__(self, term) -> None: ... | ||
term: bytes | ||
def __init__(self, term: bytes) -> None: ... | ||
|
||
class LimitRequestLine(ParseException): | ||
size: Incomplete | ||
max_size: Incomplete | ||
def __init__(self, size, max_size) -> None: ... | ||
size: int | ||
max_size: int | ||
def __init__(self, size: int, max_size: int) -> None: ... | ||
|
||
class LimitRequestHeaders(ParseException): | ||
msg: Incomplete | ||
def __init__(self, msg) -> None: ... | ||
msg: str | ||
def __init__(self, msg: str) -> None: ... | ||
|
||
class InvalidProxyLine(ParseException): | ||
line: Incomplete | ||
line: str | ||
code: int | ||
def __init__(self, line) -> None: ... | ||
def __init__(self, line: str) -> None: ... | ||
|
||
class ForbiddenProxyRequest(ParseException): | ||
host: Incomplete | ||
host: str | ||
code: int | ||
def __init__(self, host) -> None: ... | ||
def __init__(self, host: str) -> None: ... | ||
|
||
class InvalidSchemeHeaders(ParseException): ... |
Oops, something went wrong.