uvicorn 0.31.0__tar.gz → 0.31.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {uvicorn-0.31.0 → uvicorn-0.31.1}/PKG-INFO +1 -1
- {uvicorn-0.31.0 → uvicorn-0.31.1}/pyproject.toml +1 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/requirements.txt +11 -11
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/middleware/test_proxy_headers.py +5 -1
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/protocols/test_utils.py +6 -3
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/protocols/test_websocket.py +143 -369
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/__init__.py +1 -1
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/config.py +1 -1
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/main.py +1 -1
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/middleware/proxy_headers.py +1 -1
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/websockets/websockets_impl.py +4 -8
- {uvicorn-0.31.0 → uvicorn-0.31.1}/.gitignore +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/LICENSE.md +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/README.md +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/conftest.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/importer/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/importer/circular_import_a.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/importer/circular_import_b.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/importer/raise_import_error.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/importer/test_importer.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/middleware/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/middleware/test_logging.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/middleware/test_message_logger.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/middleware/test_wsgi.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/protocols/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/protocols/test_http.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/response.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/supervisors/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/supervisors/test_multiprocess.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/supervisors/test_reload.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/supervisors/test_signal.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_auto_detection.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_cli.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_config.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_default_headers.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_lifespan.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_main.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_server.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_ssl.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/test_subprocess.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/tests/utils.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/__main__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/_subprocess.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/_types.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/importer.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/lifespan/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/lifespan/off.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/lifespan/on.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/logging.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/loops/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/loops/asyncio.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/loops/auto.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/loops/uvloop.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/middleware/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/middleware/asgi2.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/middleware/message_logger.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/middleware/wsgi.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/http/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/http/auto.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/http/flow_control.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/http/h11_impl.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/http/httptools_impl.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/utils.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/websockets/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/websockets/auto.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/protocols/websockets/wsproto_impl.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/py.typed +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/server.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/supervisors/__init__.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/supervisors/basereload.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/supervisors/multiprocess.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/supervisors/statreload.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/supervisors/watchfilesreload.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/supervisors/watchgodreload.py +0 -0
- {uvicorn-0.31.0 → uvicorn-0.31.1}/uvicorn/workers.py +0 -0
@@ -96,6 +96,7 @@ filterwarnings = [
|
|
96
96
|
'ignore: \"watchgod\" is deprecated\, you should switch to watchfiles \(`pip install watchfiles`\)\.:DeprecationWarning',
|
97
97
|
"ignore:Uvicorn's native WSGI implementation is deprecated.*:DeprecationWarning",
|
98
98
|
"ignore: 'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning",
|
99
|
+
"ignore: remove second argument of ws_handler:DeprecationWarning:websockets"
|
99
100
|
]
|
100
101
|
|
101
102
|
[tool.coverage.run]
|
@@ -5,28 +5,28 @@
|
|
5
5
|
h11 @ git+https://github.com/python-hyper/h11.git@master
|
6
6
|
|
7
7
|
# Explicit optionals
|
8
|
-
a2wsgi==1.10.
|
8
|
+
a2wsgi==1.10.7
|
9
9
|
wsproto==1.2.0
|
10
|
-
websockets==
|
10
|
+
websockets==13.1
|
11
11
|
|
12
12
|
# Packaging
|
13
|
-
build==1.2.
|
13
|
+
build==1.2.2
|
14
14
|
twine==5.1.1
|
15
15
|
|
16
16
|
# Testing
|
17
|
-
ruff==0.
|
18
|
-
pytest==8.
|
17
|
+
ruff==0.6.8
|
18
|
+
pytest==8.3.3
|
19
19
|
pytest-mock==3.14.0
|
20
|
-
mypy==1.
|
20
|
+
mypy==1.11.2
|
21
21
|
types-click==7.1.8
|
22
|
-
types-pyyaml==6.0.12.
|
22
|
+
types-pyyaml==6.0.12.20240917
|
23
23
|
trustme==1.1.0
|
24
24
|
cryptography==43.0.1
|
25
|
-
coverage==7.
|
25
|
+
coverage==7.6.1
|
26
26
|
coverage-conditional-plugin==0.9.0
|
27
|
-
httpx==0.27.
|
27
|
+
httpx==0.27.2
|
28
28
|
watchgod==0.8.2
|
29
29
|
|
30
30
|
# Documentation
|
31
|
-
mkdocs==1.6.
|
32
|
-
mkdocs-material==9.5.
|
31
|
+
mkdocs==1.6.1
|
32
|
+
mkdocs-material==9.5.39
|
@@ -56,6 +56,7 @@ def make_httpx_client(
|
|
56
56
|
# of the _TrustedHosts.__init__ method.
|
57
57
|
_TRUSTED_NOTHING: list[str] = []
|
58
58
|
_TRUSTED_EVERYTHING = "*"
|
59
|
+
_TRUSTED_EVERYTHING_LIST = ["*"]
|
59
60
|
_TRUSTED_IPv4_ADDRESSES = "127.0.0.1, 10.0.0.1"
|
60
61
|
_TRUSTED_IPv4_NETWORKS = ["127.0.0.0/8", "10.0.0.0/8"]
|
61
62
|
_TRUSTED_IPv6_ADDRESSES = [
|
@@ -65,7 +66,7 @@ _TRUSTED_IPv6_ADDRESSES = [
|
|
65
66
|
"::11.22.33.44", # This is a dual address
|
66
67
|
]
|
67
68
|
_TRUSTED_IPv6_NETWORKS = "2001:db8:abcd:0012::0/64"
|
68
|
-
_TRUSTED_LITERALS = "some-literal , unix:///foo/bar , /foo/bar"
|
69
|
+
_TRUSTED_LITERALS = "some-literal , unix:///foo/bar , /foo/bar, garba*gewith*"
|
69
70
|
|
70
71
|
|
71
72
|
@pytest.mark.parametrize(
|
@@ -122,6 +123,7 @@ _TRUSTED_LITERALS = "some-literal , unix:///foo/bar , /foo/bar"
|
|
122
123
|
(_TRUSTED_EVERYTHING, "192.168.0.0", True),
|
123
124
|
(_TRUSTED_EVERYTHING, "192.168.0.1", True),
|
124
125
|
(_TRUSTED_EVERYTHING, "1.1.1.1", True),
|
126
|
+
(_TRUSTED_EVERYTHING_LIST, "1.1.1.1", True),
|
125
127
|
# Test IPv6 Addresses
|
126
128
|
(_TRUSTED_EVERYTHING, "2001:db8::", True),
|
127
129
|
(_TRUSTED_EVERYTHING, "2001:db8:abcd:0012::0", True),
|
@@ -136,6 +138,7 @@ _TRUSTED_LITERALS = "some-literal , unix:///foo/bar , /foo/bar"
|
|
136
138
|
(_TRUSTED_EVERYTHING, "::b16:212c", True), # aka ::11.22.33.44
|
137
139
|
(_TRUSTED_EVERYTHING, "a:b:c:d::", True),
|
138
140
|
(_TRUSTED_EVERYTHING, "::a:b:c:d", True),
|
141
|
+
(_TRUSTED_EVERYTHING_LIST, "::a:b:c:d", True),
|
139
142
|
# Test Literals
|
140
143
|
(_TRUSTED_EVERYTHING, "some-literal", True),
|
141
144
|
(_TRUSTED_EVERYTHING, "unix:///foo/bar", True),
|
@@ -145,6 +148,7 @@ _TRUSTED_LITERALS = "some-literal , unix:///foo/bar , /foo/bar"
|
|
145
148
|
(_TRUSTED_EVERYTHING, "unix:///another/path", True),
|
146
149
|
(_TRUSTED_EVERYTHING, "/another/path", True),
|
147
150
|
(_TRUSTED_EVERYTHING, "", True),
|
151
|
+
(_TRUSTED_EVERYTHING_LIST, "", True),
|
148
152
|
## Trust IPv4 Addresses
|
149
153
|
## -----------------------------
|
150
154
|
# Test IPv4 Addresses
|
@@ -1,5 +1,8 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
1
3
|
import socket
|
2
4
|
from asyncio import Transport
|
5
|
+
from typing import Any
|
3
6
|
|
4
7
|
import pytest
|
5
8
|
|
@@ -20,11 +23,11 @@ class MockSocket:
|
|
20
23
|
|
21
24
|
|
22
25
|
class MockTransport(Transport):
|
23
|
-
def __init__(self, info):
|
26
|
+
def __init__(self, info: dict[str, Any]) -> None:
|
24
27
|
self.info = info
|
25
28
|
|
26
|
-
def get_extra_info(self,
|
27
|
-
return self.info.get(
|
29
|
+
def get_extra_info(self, name: str, default: Any = None) -> Any:
|
30
|
+
return self.info.get(name)
|
28
31
|
|
29
32
|
|
30
33
|
def test_get_local_addr_with_socket():
|