-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
waitress
: stubtest-complete and update usage of Any (#11796)
- Loading branch information
Showing
18 changed files
with
203 additions
and
222 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,4 @@ | ||
waitress.adjustments.Adjustments.clear_untrusted_proxy_headers | ||
waitress.adjustments.PY2 | ||
waitress.adjustments.string_types | ||
waitress.channel.HTTPChannel.addr | ||
waitress.channel.HTTPChannel.error_task_class | ||
waitress.channel.HTTPChannel.parser_class | ||
waitress.channel.HTTPChannel.request | ||
waitress.channel.HTTPChannel.task_class | ||
waitress.compat.PY2 | ||
waitress.compat.PY3 | ||
waitress.compat.ResourceWarning | ||
waitress.compat.class_types | ||
waitress.compat.exec_ | ||
waitress.compat.integer_types | ||
waitress.compat.qualname | ||
waitress.compat.reraise | ||
waitress.compat.set_nonblocking | ||
waitress.compat.string_types | ||
waitress.compat.text_ | ||
waitress.compat.tobytes | ||
waitress.compat.tostr | ||
waitress.compat.unquote_bytes_to_wsgi | ||
waitress.rfc7230.tobytes | ||
waitress.server.BaseWSGIServer.channel_class | ||
waitress.server.BaseWSGIServer.get_server_name | ||
waitress.server.MultiSocketServer.__init__ | ||
waitress.server.WSGIServer | ||
waitress.task.ErrorTask.content_length | ||
waitress.task.ThreadedTaskDispatcher.start_new_thread | ||
waitress.task.WSGITask.content_length | ||
waitress.rfc7230.BWS | ||
waitress.wasyncore.map | ||
waitress.wasyncore.dispatcher_with_send.handle_write | ||
waitress.__main__ | ||
|
||
# Leaked loop variable | ||
waitress.utilities.i |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,9 +1,6 @@ | ||
version = "2.1.*" | ||
upstream_repository = "https://github.com/Pylons/waitress" | ||
requires = [] | ||
partial_stub = true | ||
|
||
[tool.stubtest] | ||
ignore_missing_stub = true | ||
# linux and darwin are equivalent | ||
platforms = ["linux", "win32"] |
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,7 +1,18 @@ | ||
from typing import Any | ||
from _typeshed import Unused | ||
from _typeshed.wsgi import WSGIApplication | ||
from collections.abc import Callable, Iterable | ||
from typing import Any, Literal | ||
|
||
from waitress.server import create_server as create_server | ||
from waitress.adjustments import _AdjustmentsParams | ||
from waitress.server import BaseWSGIServer | ||
|
||
def serve(app: Any, **kw: Any) -> None: ... | ||
def serve_paste(app: Any, global_conf: Any, **kw: Any) -> int: ... | ||
def profile(cmd: Any, globals: Any, locals: Any, sort_order: tuple[str, ...], callers: bool) -> None: ... | ||
def serve( | ||
app: WSGIApplication, | ||
*, | ||
_server: Callable[..., BaseWSGIServer] = ..., | ||
_quiet: bool = False, | ||
_profile: bool = False, | ||
**kw: _AdjustmentsParams, | ||
) -> None: ... | ||
def serve_paste(app: WSGIApplication, global_conf: Unused, **kw: _AdjustmentsParams) -> Literal[0]: ... | ||
def profile(cmd: str, globals: dict[str, Any], locals: dict[str, Any], sort_order: Iterable[str], callers: bool) -> 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
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,29 +1,7 @@ | ||
from io import TextIOWrapper | ||
from typing import Any, Literal | ||
from typing import Final | ||
|
||
PY2: Literal[False] | ||
PY3: Literal[True] | ||
WIN: bool | ||
string_types: tuple[str] | ||
integer_types: tuple[int] | ||
class_types: tuple[type] | ||
|
||
def unquote_bytes_to_wsgi(bytestring: bytes) -> str: ... | ||
def text_(s: str, encoding: str = ..., errors: str = ...) -> str: ... | ||
def tostr(s: str) -> str: ... | ||
def tobytes(s: str) -> bytes: ... | ||
|
||
exec_: Any | ||
|
||
def reraise(tp: Any, value: BaseException, tb: str | None = ...) -> None: ... | ||
|
||
MAXINT: int | ||
HAS_IPV6: bool | ||
IPPROTO_IPV6: int | ||
IPV6_V6ONLY: int | ||
|
||
def set_nonblocking(fd: TextIOWrapper) -> None: ... | ||
|
||
ResourceWarning: Warning | ||
|
||
def qualname(cls: Any) -> str: ... | ||
WIN: Final[bool] | ||
MAXINT: Final[int] | ||
HAS_IPV6: Final[bool] | ||
IPPROTO_IPV6: Final[int] | ||
IPV6_V6ONLY: Final[int] |
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,13 +1,28 @@ | ||
from .compat import tobytes as tobytes | ||
from re import Pattern | ||
from typing import Final | ||
|
||
WS: str | ||
OWS: str | ||
RWS: str | ||
BWS = str | ||
TCHAR: str | ||
OBS_TEXT: str | ||
TOKEN: str | ||
VCHAR: str | ||
FIELD_VCHAR: str | ||
FIELD_CONTENT: str | ||
FIELD_VALUE: str | ||
BWS: Final = r"[ \t]{0,}?" | ||
CHUNK_EXT: Final[str] | ||
CHUNK_EXT_NAME: Final = r"[!#$%&'*+\-.^_`|~0-9A-Za-z]{1,}" | ||
CHUNK_EXT_RE: Final[Pattern[str]] | ||
CHUNK_EXT_VAL: Final[str] | ||
DIGIT: Final = "[0-9]" | ||
FIELD_CONTENT: Final[str] | ||
FIELD_VALUE: Final[str] | ||
FIELD_VCHAR: Final = r"[\x21-\x7e\x80-\xff]" | ||
HEADER_FIELD_RE: Final[Pattern[str]] | ||
HEXDIG: Final = r"[0-9a-fA-F]" | ||
OBS_TEXT: Final = r"\x80-\xff" | ||
ONLY_DIGIT_RE: Final[Pattern[str]] | ||
ONLY_HEXDIG_RE: Final[Pattern[str]] | ||
OWS: Final = r"[ \t]{0,}?" | ||
QDTEXT: Final = r"[\t !#-[\]-~\x80-\xff]" | ||
QUOTED_PAIR: Final = r"\\([\t \x21-\x7e\x80-\xff])" | ||
QUOTED_PAIR_RE: Final[Pattern[str]] | ||
QUOTED_STRING: Final[str] | ||
QUOTED_STRING_RE: Final[Pattern[str]] | ||
RWS: Final = r"[ \t]{1,}?" | ||
TCHAR: Final = r"[!#$%&'*+\-.^_`|~0-9A-Za-z]" | ||
TOKEN: Final = r"[!#$%&'*+\-.^_`|~0-9A-Za-z]{1,}" | ||
VCHAR: Final = r"\x21-\x7e" | ||
WS: Final = r"[ \t]" |
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,13 +1,14 @@ | ||
from _typeshed import Unused | ||
from collections.abc import Callable, Sequence | ||
from io import TextIOWrapper | ||
from re import Pattern | ||
from typing import Any | ||
from typing import Any, Final | ||
|
||
HELP: str | ||
RUNNER_PATTERN: Pattern[Any] | ||
HELP: Final[str] | ||
RUNNER_PATTERN: Final[Pattern[str]] | ||
|
||
def match(obj_name: str) -> tuple[str, str]: ... | ||
def resolve(module_name: str, object_name: str) -> Any: ... | ||
def resolve(module_name: str, object_name: str) -> Any: ... # Any module attribute | ||
def show_help(stream: TextIOWrapper, name: str, error: str | None = None) -> None: ... | ||
def show_exception(stream: TextIOWrapper) -> None: ... | ||
def run(argv: Sequence[str] = ..., _serve: Callable[..., object] = ...) -> None: ... | ||
def run(argv: Sequence[str] = ..., _serve: Callable[..., Unused] = ...) -> None: ... |
Oops, something went wrong.