Skip to content

Commit

Permalink
Bump waitress to 3.0.* (python#11803)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Apr 22, 2024
1 parent bd8843a commit 7858e60
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion stubs/waitress/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "2.1.*"
version = "3.0.*"
upstream_repository = "https://github.com/Pylons/waitress"

[tool.stubtest]
Expand Down
3 changes: 1 addition & 2 deletions stubs/waitress/waitress/adjustments.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def as_socket_list(sockets: Sequence[object]) -> list[socket]: ...

class _str_marker(str): ...
class _int_marker(int): ...
class _bool_marker: ...

class Adjustments:
host: _str_marker
Expand All @@ -32,7 +31,7 @@ class Adjustments:
trusted_proxy_count: int | None
trusted_proxy_headers: set[str]
log_untrusted_proxy_headers: bool
clear_untrusted_proxy_headers: type[_bool_marker] | bool
clear_untrusted_proxy_headers: bool
url_scheme: str
url_prefix: str
ident: str
Expand Down
8 changes: 4 additions & 4 deletions stubs/waitress/waitress/task.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from _typeshed import Unused
from _typeshed.wsgi import WSGIEnvironment
from collections import deque
from collections.abc import Callable, Mapping, Sequence
from logging import Logger
from threading import Condition, Lock
from typing import Any

from .channel import HTTPChannel
from .utilities import Error
Expand Down Expand Up @@ -47,6 +47,7 @@ class Task:
def service(self) -> None: ...
@property
def has_body(self) -> bool: ...
def set_close_on_finish(self) -> None: ...
def build_response_header(self) -> bytes: ...
def remove_content_length_header(self) -> None: ...
def start(self) -> None: ...
Expand All @@ -61,12 +62,11 @@ class ErrorTask(Task):
def execute(self) -> None: ...

class WSGITask(Task):
# Environment dict union too complex
environ: dict[str, Any] | None
environ: WSGIEnvironment | None
response_headers: Sequence[tuple[str, str]]
complete: bool
status: str
content_length: int | None
close_on_finish: bool
def execute(self) -> None: ...
def get_environment(self) -> dict[str, Any]: ...
def get_environment(self) -> WSGIEnvironment: ...
2 changes: 1 addition & 1 deletion stubs/waitress/waitress/utilities.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Error:
reason: str
body: str
def __init__(self, body: str) -> None: ...
def to_response(self) -> tuple[str, Sequence[tuple[str, str]], str]: ...
def to_response(self, ident: str | None = None) -> tuple[str, Sequence[tuple[str, str]], str]: ...
def wsgi_response(self, environ: Unused, start_response: StartResponse) -> Iterator[str]: ...

class BadRequest(Error):
Expand Down

0 comments on commit 7858e60

Please sign in to comment.