Skip to content

Commit 3014765

Browse files
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](python-websockets/websockets@13.1...14.2) Updates `a2wsgi` from 1.10.7 to 1.10.8 - [Commits](abersheeran/a2wsgi@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](pypa/twine@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](astral-sh/ruff@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](python-trio/trustme@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](squidfunk/mkdocs-material@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] <[email protected]> * lint the whole thing --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Trylesinski <[email protected]>
1 parent 3695737 commit 3014765

File tree

12 files changed

+33
-37
lines changed

12 files changed

+33
-37
lines changed

requirements.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
h11 @ git+https://github.com/python-hyper/h11.git@master
66

77
# Explicit optionals
8-
a2wsgi==1.10.7
8+
a2wsgi==1.10.8
99
wsproto==1.2.0
1010
websockets==13.1
1111

1212
# Packaging
1313
build==1.2.2.post1
14-
twine==6.0.1
14+
twine==6.1.0
1515

1616
# Testing
17-
ruff==0.8.4
17+
ruff==0.9.4
1818
pytest==8.3.4
1919
pytest-mock==3.14.0
2020
mypy==1.14.1
2121
types-click==7.1.8
2222
types-pyyaml==6.0.12.20241230
23-
trustme==1.2.0
23+
trustme==1.2.1
2424
cryptography==44.0.0
2525
coverage==7.6.10
2626
coverage-conditional-plugin==0.9.0
2727
httpx==0.28.1
2828

2929
# Documentation
3030
mkdocs==1.6.1
31-
mkdocs-material==9.5.49
31+
mkdocs-material==9.6.1

tests/protocols/test_http.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ def receive_all(sock: socket.socket):
914914
def send_fragmented_req(path: str):
915915
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
916916
sock.connect(("127.0.0.1", unused_tcp_port))
917-
d = (f"GET {path} HTTP/1.1\r\n" "Host: localhost\r\n" "Connection: close\r\n\r\n").encode()
917+
d = (f"GET {path} HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n").encode()
918918
split = len(path) // 2
919919
sock.sendall(d[:split])
920920
time.sleep(0.01)

tests/protocols/test_websocket.py

+9-12
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,14 @@ def app(scope: Scope):
109109
pass # ok, wsproto 0.13
110110
else:
111111
assert response.status_code == 400
112-
assert (
113-
response.text.lower().strip().rstrip(".")
114-
in [
115-
"missing sec-websocket-key header",
116-
"missing sec-websocket-version header", # websockets
117-
"missing or empty sec-websocket-key header", # wsproto
118-
"failed to open a websocket connection: missing " "sec-websocket-key header",
119-
"failed to open a websocket connection: missing or empty " "sec-websocket-key header",
120-
"failed to open a websocket connection: missing sec-websocket-key header; 'sec-websocket-key'",
121-
]
122-
)
112+
assert response.text.lower().strip().rstrip(".") in [
113+
"missing sec-websocket-key header",
114+
"missing sec-websocket-version header", # websockets
115+
"missing or empty sec-websocket-key header", # wsproto
116+
"failed to open a websocket connection: missing sec-websocket-key header",
117+
"failed to open a websocket connection: missing or empty sec-websocket-key header",
118+
"failed to open a websocket connection: missing sec-websocket-key header; 'sec-websocket-key'",
119+
]
123120

124121

125122
async def test_accept_connection(ws_protocol_cls: WSProtocol, http_protocol_cls: HTTPProtocol, unused_tcp_port: int):
@@ -1020,7 +1017,7 @@ async def websocket_session(url: str):
10201017
await websocket_session(f"ws://127.0.0.1:{unused_tcp_port}")
10211018

10221019
assert exception_message == (
1023-
"Expected ASGI message 'websocket.http.response.body' but got " "'websocket.http.response.start'."
1020+
"Expected ASGI message 'websocket.http.response.body' but got 'websocket.http.response.start'."
10241021
)
10251022

10261023

tests/test_cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_cli_incomplete_app_parameter() -> None:
131131
result = runner.invoke(cli, ["tests.test_cli"])
132132

133133
assert (
134-
'Error loading ASGI app. Import string "tests.test_cli" ' 'must be in format "<module>:<attribute>".'
134+
'Error loading ASGI app. Import string "tests.test_cli" must be in format "<module>:<attribute>".'
135135
) in result.output
136136
assert result.exit_code == 1
137137

tests/test_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def test_env_file(
409409
Test that one can load environment variables using an env file.
410410
"""
411411
fp = tmp_path / ".env"
412-
content = f"WEB_CONCURRENCY={web_concurrency}\n" f"FORWARDED_ALLOW_IPS={forwarded_allow_ips}\n"
412+
content = f"WEB_CONCURRENCY={web_concurrency}\nFORWARDED_ALLOW_IPS={forwarded_allow_ips}\n"
413413
fp.write_text(content)
414414
with caplog.at_level(logging.INFO):
415415
config = Config(app=asgi_app, env_file=fp)

tests/test_main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def test_run_invalid_app_config_combination(caplog: pytest.LogCaptureFixture) ->
7979
assert caplog.records[-1].name == "uvicorn.error"
8080
assert caplog.records[-1].levelno == WARNING
8181
assert caplog.records[-1].message == (
82-
"You must pass the application as an import string to enable " "'reload' or 'workers'."
82+
"You must pass the application as an import string to enable 'reload' or 'workers'."
8383
)
8484

8585

uvicorn/config.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def __init__(
280280

281281
if (reload_dirs or reload_includes or reload_excludes) and not self.should_reload:
282282
logger.warning(
283-
"Current configuration will not reload as not all conditions are met, " "please refer to documentation."
283+
"Current configuration will not reload as not all conditions are met, please refer to documentation."
284284
)
285285

286286
if self.should_reload:
@@ -446,7 +446,7 @@ def load(self) -> None:
446446
else:
447447
if not self.factory:
448448
logger.warning(
449-
"ASGI app factory detected. Using it, " "but please consider setting the --factory flag explicitly."
449+
"ASGI app factory detected. Using it, but please consider setting the --factory flag explicitly."
450450
)
451451

452452
if self.interface == "auto":

uvicorn/main.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
8181
"--reload-dir",
8282
"reload_dirs",
8383
multiple=True,
84-
help="Set reload directories explicitly, instead of using the current working" " directory.",
84+
help="Set reload directories explicitly, instead of using the current working directory.",
8585
type=click.Path(exists=True),
8686
)
8787
@click.option(
@@ -106,7 +106,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
106106
type=float,
107107
default=0.25,
108108
show_default=True,
109-
help="Delay between previous and next check if application needs to be." " Defaults to 0.25s.",
109+
help="Delay between previous and next check if application needs to be. Defaults to 0.25s.",
110110
)
111111
@click.option(
112112
"--workers",
@@ -222,7 +222,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
222222
"--proxy-headers/--no-proxy-headers",
223223
is_flag=True,
224224
default=True,
225-
help="Enable/Disable X-Forwarded-Proto, X-Forwarded-For, X-Forwarded-Port to " "populate remote address info.",
225+
help="Enable/Disable X-Forwarded-Proto, X-Forwarded-For, X-Forwarded-Port to populate remote address info.",
226226
)
227227
@click.option(
228228
"--server-header/--no-server-header",
@@ -255,7 +255,7 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
255255
"--limit-concurrency",
256256
type=int,
257257
default=None,
258-
help="Maximum number of concurrent connections or tasks to allow, before issuing" " HTTP 503 responses.",
258+
help="Maximum number of concurrent connections or tasks to allow, before issuing HTTP 503 responses.",
259259
)
260260
@click.option(
261261
"--backlog",
@@ -565,7 +565,7 @@ def run(
565565

566566
if (config.reload or config.workers > 1) and not isinstance(app, str):
567567
logger = logging.getLogger("uvicorn.error")
568-
logger.warning("You must pass the application as an import string to enable 'reload' or " "'workers'.")
568+
logger.warning("You must pass the application as an import string to enable 'reload' or 'workers'.")
569569
sys.exit(1)
570570

571571
try:

uvicorn/middleware/wsgi.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ def build_environ(scope: HTTPScope, message: ASGIReceiveEvent, body: io.BytesIO)
8282
class _WSGIMiddleware:
8383
def __init__(self, app: WSGIApp, workers: int = 10):
8484
warnings.warn(
85-
"Uvicorn's native WSGI implementation is deprecated, you "
86-
"should switch to a2wsgi (`pip install a2wsgi`).",
85+
"Uvicorn's native WSGI implementation is deprecated, you should switch to a2wsgi (`pip install a2wsgi`).",
8786
DeprecationWarning,
8887
)
8988
self.app = app

uvicorn/protocols/websockets/websockets_impl.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def process_subprotocol(
214214
def send_500_response(self) -> None:
215215
msg = b"Internal Server Error"
216216
content = [
217-
b"HTTP/1.1 500 Internal Server Error\r\n" b"content-type: text/plain; charset=utf-8\r\n",
217+
b"HTTP/1.1 500 Internal Server Error\r\ncontent-type: text/plain; charset=utf-8\r\n",
218218
b"content-length: " + str(len(msg)).encode("ascii") + b"\r\n",
219219
b"connection: close\r\n",
220220
b"\r\n",
@@ -338,7 +338,7 @@ async def asgi_send(self, message: ASGISendEvent) -> None:
338338
self.closed_event.set()
339339

340340
else:
341-
msg = "Expected ASGI message 'websocket.send' or 'websocket.close'," " but got '%s'."
341+
msg = "Expected ASGI message 'websocket.send' or 'websocket.close', but got '%s'."
342342
raise RuntimeError(msg % message_type)
343343
except ConnectionClosed as exc:
344344
raise ClientDisconnected from exc
@@ -351,11 +351,11 @@ async def asgi_send(self, message: ASGISendEvent) -> None:
351351
if not message.get("more_body", False):
352352
self.closed_event.set()
353353
else:
354-
msg = "Expected ASGI message 'websocket.http.response.body' " "but got '%s'."
354+
msg = "Expected ASGI message 'websocket.http.response.body' but got '%s'."
355355
raise RuntimeError(msg % message_type)
356356

357357
else:
358-
msg = "Unexpected ASGI message '%s', after sending 'websocket.close' " "or response already completed."
358+
msg = "Unexpected ASGI message '%s', after sending 'websocket.close' or response already completed."
359359
raise RuntimeError(msg % message_type)
360360

361361
async def asgi_receive(self) -> WebSocketDisconnectEvent | WebSocketConnectEvent | WebSocketReceiveEvent:

uvicorn/protocols/websockets/wsproto_impl.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ async def send(self, message: ASGISendEvent) -> None:
344344
self.transport.close()
345345

346346
else:
347-
msg = "Expected ASGI message 'websocket.send' or 'websocket.close'," " but got '%s'."
347+
msg = "Expected ASGI message 'websocket.send' or 'websocket.close', but got '%s'."
348348
raise RuntimeError(msg % message_type)
349349
except LocalProtocolError as exc:
350350
raise ClientDisconnected from exc
@@ -362,7 +362,7 @@ async def send(self, message: ASGISendEvent) -> None:
362362
self.transport.close()
363363

364364
else:
365-
msg = "Expected ASGI message 'websocket.http.response.body' " "but got '%s'."
365+
msg = "Expected ASGI message 'websocket.http.response.body' but got '%s'."
366366
raise RuntimeError(msg % message_type)
367367

368368
else:

uvicorn/supervisors/statreload.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(
2424
self.mtimes: dict[Path, float] = {}
2525

2626
if config.reload_excludes or config.reload_includes:
27-
logger.warning("--reload-include and --reload-exclude have no effect unless " "watchfiles is installed.")
27+
logger.warning("--reload-include and --reload-exclude have no effect unless watchfiles is installed.")
2828

2929
def should_restart(self) -> list[Path] | None:
3030
self.pause()

0 commit comments

Comments
 (0)