Bump the python-packages group with 6 updates (#2569)
* Bump the python-packages group with 6 updates Bumps the python-packages group with 6 updates: | Package | From | To | | --- | --- | --- | | [websockets](https://github.com/python-websockets/websockets) | `13.1` | `14.2` | | [a2wsgi](https://github.com/abersheeran/a2wsgi) | `1.10.7` | `1.10.8` | | [twine](https://github.com/pypa/twine) | `6.0.1` | `6.1.0` | | [ruff](https://github.com/astral-sh/ruff) | `0.8.4` | `0.9.4` | | [trustme](https://github.com/python-trio/trustme) | `1.2.0` | `1.2.1` | | [mkdocs-material](https://github.com/squidfunk/mkdocs-material) | `9.5.49` | `9.6.1` | Updates `websockets` from 13.1 to 14.2 - [Release notes](https://github.com/python-websockets/websockets/releases) - [Commits](https://github.com/python-websockets/websockets/compare/13.1...14.2) Updates `a2wsgi` from 1.10.7 to 1.10.8 - [Commits](https://github.com/abersheeran/a2wsgi/compare/v1.10.7...v1.10.8) Updates `twine` from 6.0.1 to 6.1.0 - [Release notes](https://github.com/pypa/twine/releases) - [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst) - [Commits](https://github.com/pypa/twine/compare/6.0.1...6.1.0) Updates `ruff` from 0.8.4 to 0.9.4 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.8.4...0.9.4) Updates `trustme` from 1.2.0 to 1.2.1 - [Release notes](https://github.com/python-trio/trustme/releases) - [Commits](https://github.com/python-trio/trustme/compare/v1.2.0...v1.2.1) Updates `mkdocs-material` from 9.5.49 to 9.6.1 - [Release notes](https://github.com/squidfunk/mkdocs-material/releases) - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG) - [Commits](https://github.com/squidfunk/mkdocs-material/compare/9.5.49...9.6.1) --- updated-dependencies: - dependency-name: websockets dependency-type: direct:production update-type: version-update:semver-major dependency-group: python-packages - dependency-name: a2wsgi dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-packages - dependency-name: twine dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-packages - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-packages - dependency-name: trustme dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-packages - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-packages ... Signed-off-by: dependabot[bot] <support@github.com> * lint the whole thing --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
36957371b1
commit
3014765e73
@ -5,22 +5,22 @@
|
||||
h11 @ git+https://github.com/python-hyper/h11.git@master
|
||||
|
||||
# Explicit optionals
|
||||
a2wsgi==1.10.7
|
||||
a2wsgi==1.10.8
|
||||
wsproto==1.2.0
|
||||
websockets==13.1
|
||||
|
||||
# Packaging
|
||||
build==1.2.2.post1
|
||||
twine==6.0.1
|
||||
twine==6.1.0
|
||||
|
||||
# Testing
|
||||
ruff==0.8.4
|
||||
ruff==0.9.4
|
||||
pytest==8.3.4
|
||||
pytest-mock==3.14.0
|
||||
mypy==1.14.1
|
||||
types-click==7.1.8
|
||||
types-pyyaml==6.0.12.20241230
|
||||
trustme==1.2.0
|
||||
trustme==1.2.1
|
||||
cryptography==44.0.0
|
||||
coverage==7.6.10
|
||||
coverage-conditional-plugin==0.9.0
|
||||
@ -28,4 +28,4 @@ httpx==0.28.1
|
||||
|
||||
# Documentation
|
||||
mkdocs==1.6.1
|
||||
mkdocs-material==9.5.49
|
||||
mkdocs-material==9.6.1
|
||||
|
||||
@ -914,7 +914,7 @@ def test_fragmentation(unused_tcp_port: int):
|
||||
def send_fragmented_req(path: str):
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.connect(("127.0.0.1", unused_tcp_port))
|
||||
d = (f"GET {path} HTTP/1.1\r\n" "Host: localhost\r\n" "Connection: close\r\n\r\n").encode()
|
||||
d = (f"GET {path} HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n").encode()
|
||||
split = len(path) // 2
|
||||
sock.sendall(d[:split])
|
||||
time.sleep(0.01)
|
||||
|
||||
@ -109,17 +109,14 @@ async def test_invalid_upgrade(ws_protocol_cls: WSProtocol, http_protocol_cls: H
|
||||
pass # ok, wsproto 0.13
|
||||
else:
|
||||
assert response.status_code == 400
|
||||
assert (
|
||||
response.text.lower().strip().rstrip(".")
|
||||
in [
|
||||
"missing sec-websocket-key header",
|
||||
"missing sec-websocket-version header", # websockets
|
||||
"missing or empty sec-websocket-key header", # wsproto
|
||||
"failed to open a websocket connection: missing " "sec-websocket-key header",
|
||||
"failed to open a websocket connection: missing or empty " "sec-websocket-key header",
|
||||
"failed to open a websocket connection: missing sec-websocket-key header; 'sec-websocket-key'",
|
||||
]
|
||||
)
|
||||
assert response.text.lower().strip().rstrip(".") in [
|
||||
"missing sec-websocket-key header",
|
||||
"missing sec-websocket-version header", # websockets
|
||||
"missing or empty sec-websocket-key header", # wsproto
|
||||
"failed to open a websocket connection: missing sec-websocket-key header",
|
||||
"failed to open a websocket connection: missing or empty sec-websocket-key header",
|
||||
"failed to open a websocket connection: missing sec-websocket-key header; 'sec-websocket-key'",
|
||||
]
|
||||
|
||||
|
||||
async def test_accept_connection(ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int):
|
||||
@ -1020,7 +1017,7 @@ async def test_server_multiple_websocket_http_response_start_events(
|
||||
await websocket_session(f"ws://127.0.0.1:{unused_tcp_port}")
|
||||
|
||||
assert exception_message == (
|
||||
"Expected ASGI message 'websocket.http.response.body' but got " "'websocket.http.response.start'."
|
||||
"Expected ASGI message 'websocket.http.response.body' but got 'websocket.http.response.start'."
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ def test_cli_incomplete_app_parameter() -> None:
|
||||
result = runner.invoke(cli, ["tests.test_cli"])
|
||||
|
||||
assert (
|
||||
'Error loading ASGI app. Import string "tests.test_cli" ' 'must be in format "<module>:<attribute>".'
|
||||
'Error loading ASGI app. Import string "tests.test_cli" must be in format "<module>:<attribute>".'
|
||||
) in result.output
|
||||
assert result.exit_code == 1
|
||||
|
||||
|
||||
@ -409,7 +409,7 @@ def test_env_file(
|
||||
Test that one can load environment variables using an env file.
|
||||
"""
|
||||
fp = tmp_path / ".env"
|
||||
content = f"WEB_CONCURRENCY={web_concurrency}\n" f"FORWARDED_ALLOW_IPS={forwarded_allow_ips}\n"
|
||||
content = f"WEB_CONCURRENCY={web_concurrency}\nFORWARDED_ALLOW_IPS={forwarded_allow_ips}\n"
|
||||
fp.write_text(content)
|
||||
with caplog.at_level(logging.INFO):
|
||||
config = Config(app=asgi_app, env_file=fp)
|
||||
|
||||
@ -79,7 +79,7 @@ def test_run_invalid_app_config_combination(caplog: pytest.LogCaptureFixture) ->
|
||||
assert caplog.records[-1].name == "uvicorn.error"
|
||||
assert caplog.records[-1].levelno == WARNING
|
||||
assert caplog.records[-1].message == (
|
||||
"You must pass the application as an import string to enable " "'reload' or 'workers'."
|
||||
"You must pass the application as an import string to enable 'reload' or 'workers'."
|
||||
)
|
||||
|
||||
|
||||
|
||||
@ -280,7 +280,7 @@ class Config:
|
||||
|
||||
if (reload_dirs or reload_includes or reload_excludes) and not self.should_reload:
|
||||
logger.warning(
|
||||
"Current configuration will not reload as not all conditions are met, " "please refer to documentation."
|
||||
"Current configuration will not reload as not all conditions are met, please refer to documentation."
|
||||
)
|
||||
|
||||
if self.should_reload:
|
||||
@ -446,7 +446,7 @@ class Config:
|
||||
else:
|
||||
if not self.factory:
|
||||
logger.warning(
|
||||
"ASGI app factory detected. Using it, " "but please consider setting the --factory flag explicitly."
|
||||
"ASGI app factory detected. Using it, but please consider setting the --factory flag explicitly."
|
||||
)
|
||||
|
||||
if self.interface == "auto":
|
||||
|
||||
@ -81,7 +81,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
|
||||
"--reload-dir",
|
||||
"reload_dirs",
|
||||
multiple=True,
|
||||
help="Set reload directories explicitly, instead of using the current working" " directory.",
|
||||
help="Set reload directories explicitly, instead of using the current working directory.",
|
||||
type=click.Path(exists=True),
|
||||
)
|
||||
@click.option(
|
||||
@ -106,7 +106,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
|
||||
type=float,
|
||||
default=0.25,
|
||||
show_default=True,
|
||||
help="Delay between previous and next check if application needs to be." " Defaults to 0.25s.",
|
||||
help="Delay between previous and next check if application needs to be. Defaults to 0.25s.",
|
||||
)
|
||||
@click.option(
|
||||
"--workers",
|
||||
@ -222,7 +222,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
|
||||
"--proxy-headers/--no-proxy-headers",
|
||||
is_flag=True,
|
||||
default=True,
|
||||
help="Enable/Disable X-Forwarded-Proto, X-Forwarded-For, X-Forwarded-Port to " "populate remote address info.",
|
||||
help="Enable/Disable X-Forwarded-Proto, X-Forwarded-For, X-Forwarded-Port to populate remote address info.",
|
||||
)
|
||||
@click.option(
|
||||
"--server-header/--no-server-header",
|
||||
@ -255,7 +255,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
|
||||
"--limit-concurrency",
|
||||
type=int,
|
||||
default=None,
|
||||
help="Maximum number of concurrent connections or tasks to allow, before issuing" " HTTP 503 responses.",
|
||||
help="Maximum number of concurrent connections or tasks to allow, before issuing HTTP 503 responses.",
|
||||
)
|
||||
@click.option(
|
||||
"--backlog",
|
||||
@ -565,7 +565,7 @@ def run(
|
||||
|
||||
if (config.reload or config.workers > 1) and not isinstance(app, str):
|
||||
logger = logging.getLogger("uvicorn.error")
|
||||
logger.warning("You must pass the application as an import string to enable 'reload' or " "'workers'.")
|
||||
logger.warning("You must pass the application as an import string to enable 'reload' or 'workers'.")
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
|
||||
@ -82,8 +82,7 @@ def build_environ(scope: HTTPScope, message: ASGIReceiveEvent, body: io.BytesIO)
|
||||
class _WSGIMiddleware:
|
||||
def __init__(self, app: WSGIApp, workers: int = 10):
|
||||
warnings.warn(
|
||||
"Uvicorn's native WSGI implementation is deprecated, you "
|
||||
"should switch to a2wsgi (`pip install a2wsgi`).",
|
||||
"Uvicorn's native WSGI implementation is deprecated, you should switch to a2wsgi (`pip install a2wsgi`).",
|
||||
DeprecationWarning,
|
||||
)
|
||||
self.app = app
|
||||
|
||||
@ -214,7 +214,7 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
||||
def send_500_response(self) -> None:
|
||||
msg = b"Internal Server Error"
|
||||
content = [
|
||||
b"HTTP/1.1 500 Internal Server Error\r\n" b"content-type: text/plain; charset=utf-8\r\n",
|
||||
b"HTTP/1.1 500 Internal Server Error\r\ncontent-type: text/plain; charset=utf-8\r\n",
|
||||
b"content-length: " + str(len(msg)).encode("ascii") + b"\r\n",
|
||||
b"connection: close\r\n",
|
||||
b"\r\n",
|
||||
@ -338,7 +338,7 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
||||
self.closed_event.set()
|
||||
|
||||
else:
|
||||
msg = "Expected ASGI message 'websocket.send' or 'websocket.close'," " but got '%s'."
|
||||
msg = "Expected ASGI message 'websocket.send' or 'websocket.close', but got '%s'."
|
||||
raise RuntimeError(msg % message_type)
|
||||
except ConnectionClosed as exc:
|
||||
raise ClientDisconnected from exc
|
||||
@ -351,11 +351,11 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
||||
if not message.get("more_body", False):
|
||||
self.closed_event.set()
|
||||
else:
|
||||
msg = "Expected ASGI message 'websocket.http.response.body' " "but got '%s'."
|
||||
msg = "Expected ASGI message 'websocket.http.response.body' but got '%s'."
|
||||
raise RuntimeError(msg % message_type)
|
||||
|
||||
else:
|
||||
msg = "Unexpected ASGI message '%s', after sending 'websocket.close' " "or response already completed."
|
||||
msg = "Unexpected ASGI message '%s', after sending 'websocket.close' or response already completed."
|
||||
raise RuntimeError(msg % message_type)
|
||||
|
||||
async def asgi_receive(self) -> WebSocketDisconnectEvent | WebSocketConnectEvent | WebSocketReceiveEvent:
|
||||
|
||||
@ -344,7 +344,7 @@ class WSProtocol(asyncio.Protocol):
|
||||
self.transport.close()
|
||||
|
||||
else:
|
||||
msg = "Expected ASGI message 'websocket.send' or 'websocket.close'," " but got '%s'."
|
||||
msg = "Expected ASGI message 'websocket.send' or 'websocket.close', but got '%s'."
|
||||
raise RuntimeError(msg % message_type)
|
||||
except LocalProtocolError as exc:
|
||||
raise ClientDisconnected from exc
|
||||
@ -362,7 +362,7 @@ class WSProtocol(asyncio.Protocol):
|
||||
self.transport.close()
|
||||
|
||||
else:
|
||||
msg = "Expected ASGI message 'websocket.http.response.body' " "but got '%s'."
|
||||
msg = "Expected ASGI message 'websocket.http.response.body' but got '%s'."
|
||||
raise RuntimeError(msg % message_type)
|
||||
|
||||
else:
|
||||
|
||||
@ -24,7 +24,7 @@ class StatReload(BaseReload):
|
||||
self.mtimes: dict[Path, float] = {}
|
||||
|
||||
if config.reload_excludes or config.reload_includes:
|
||||
logger.warning("--reload-include and --reload-exclude have no effect unless " "watchfiles is installed.")
|
||||
logger.warning("--reload-include and --reload-exclude have no effect unless watchfiles is installed.")
|
||||
|
||||
def should_restart(self) -> list[Path] | None:
|
||||
self.pause()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user