uvicorn 0.30.1__py3-none-any.whl → 0.30.2__py3-none-any.whl
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/__init__.py +1 -1
- uvicorn/_types.py +1 -0
- uvicorn/protocols/websockets/websockets_impl.py +1 -1
- uvicorn/protocols/websockets/wsproto_impl.py +2 -2
- uvicorn/supervisors/multiprocess.py +3 -4
- {uvicorn-0.30.1.dist-info → uvicorn-0.30.2.dist-info}/METADATA +7 -2
- {uvicorn-0.30.1.dist-info → uvicorn-0.30.2.dist-info}/RECORD +10 -10
- {uvicorn-0.30.1.dist-info → uvicorn-0.30.2.dist-info}/WHEEL +1 -1
- {uvicorn-0.30.1.dist-info → uvicorn-0.30.2.dist-info}/entry_points.txt +0 -0
- {uvicorn-0.30.1.dist-info → uvicorn-0.30.2.dist-info}/licenses/LICENSE.md +0 -0
uvicorn/__init__.py
CHANGED
uvicorn/_types.py
CHANGED
@@ -382,7 +382,7 @@ class WebSocketProtocol(WebSocketServerProtocol):
|
|
382
382
|
self.closed_event.set()
|
383
383
|
if self.ws_server.closing:
|
384
384
|
return {"type": "websocket.disconnect", "code": 1012}
|
385
|
-
return {"type": "websocket.disconnect", "code": exc.code}
|
385
|
+
return {"type": "websocket.disconnect", "code": exc.code, "reason": exc.reason}
|
386
386
|
|
387
387
|
if isinstance(data, str):
|
388
388
|
return {"type": "websocket.receive", "text": data}
|
@@ -212,7 +212,7 @@ class WSProtocol(asyncio.Protocol):
|
|
212
212
|
def handle_close(self, event: events.CloseConnection) -> None:
|
213
213
|
if self.conn.state == ConnectionState.REMOTE_CLOSING:
|
214
214
|
self.transport.write(self.conn.send(event.response()))
|
215
|
-
self.queue.put_nowait({"type": "websocket.disconnect", "code": event.code})
|
215
|
+
self.queue.put_nowait({"type": "websocket.disconnect", "code": event.code, "reason": event.reason})
|
216
216
|
self.transport.close()
|
217
217
|
|
218
218
|
def handle_ping(self, event: events.Ping) -> None:
|
@@ -336,7 +336,7 @@ class WSProtocol(asyncio.Protocol):
|
|
336
336
|
self.close_sent = True
|
337
337
|
code = message.get("code", 1000)
|
338
338
|
reason = message.get("reason", "") or ""
|
339
|
-
self.queue.put_nowait({"type": "websocket.disconnect", "code": code})
|
339
|
+
self.queue.put_nowait({"type": "websocket.disconnect", "code": code, "reason": reason})
|
340
340
|
output = self.conn.send(wsproto.events.CloseConnection(code=code, reason=reason))
|
341
341
|
if not self.transport.is_closing():
|
342
342
|
self.transport.write(output)
|
@@ -134,7 +134,7 @@ class Multiprocess:
|
|
134
134
|
process.join()
|
135
135
|
|
136
136
|
def restart_all(self) -> None:
|
137
|
-
for idx, process in enumerate(
|
137
|
+
for idx, process in enumerate(self.processes):
|
138
138
|
process.terminate()
|
139
139
|
process.join()
|
140
140
|
new_process = Process(self.config, self.target, self.sockets)
|
@@ -163,7 +163,7 @@ class Multiprocess:
|
|
163
163
|
if self.should_exit.is_set():
|
164
164
|
return # parent process is exiting, no need to keep subprocess alive
|
165
165
|
|
166
|
-
for idx, process in enumerate(
|
166
|
+
for idx, process in enumerate(self.processes):
|
167
167
|
if process.is_alive():
|
168
168
|
continue
|
169
169
|
|
@@ -174,10 +174,9 @@ class Multiprocess:
|
|
174
174
|
return
|
175
175
|
|
176
176
|
logger.info(f"Child process [{process.pid}] died")
|
177
|
-
del self.processes[idx]
|
178
177
|
process = Process(self.config, self.target, self.sockets)
|
179
178
|
process.start()
|
180
|
-
self.processes
|
179
|
+
self.processes[idx] = process
|
181
180
|
|
182
181
|
def handle_signals(self) -> None:
|
183
182
|
for sig in tuple(self.signal_queue):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: uvicorn
|
3
|
-
Version: 0.30.
|
3
|
+
Version: 0.30.2
|
4
4
|
Summary: The lightning-fast ASGI server.
|
5
5
|
Project-URL: Changelog, https://github.com/encode/uvicorn/blob/master/CHANGELOG.md
|
6
6
|
Project-URL: Funding, https://github.com/sponsors/encode
|
@@ -170,6 +170,10 @@ $ hypercorn app:App
|
|
170
170
|
|
171
171
|
[Mangum][mangum] is an adapter for using ASGI applications with AWS Lambda & API Gateway.
|
172
172
|
|
173
|
+
### Granian
|
174
|
+
|
175
|
+
[Granian][granian] is an ASGI compatible Rust HTTP server which supports HTTP/2, TLS and WebSockets.
|
176
|
+
|
173
177
|
---
|
174
178
|
|
175
179
|
<p align="center"><i>Uvicorn is <a href="https://github.com/encode/uvicorn/blob/master/LICENSE.md">BSD licensed</a> code.<br/>Designed & crafted with care.</i><br/>— 🦄 —</p>
|
@@ -177,5 +181,6 @@ $ hypercorn app:App
|
|
177
181
|
[asgi]: https://asgi.readthedocs.io/en/latest/
|
178
182
|
[daphne]: https://github.com/django/daphne
|
179
183
|
[hypercorn]: https://github.com/pgjones/hypercorn
|
180
|
-
[mangum]: https://mangum.io
|
181
184
|
[trio]: https://trio.readthedocs.io
|
185
|
+
[mangum]: https://github.com/jordaneremieff/mangum
|
186
|
+
[granian]: https://github.com/emmett-framework/granian
|
@@ -1,7 +1,7 @@
|
|
1
|
-
uvicorn/__init__.py,sha256=
|
1
|
+
uvicorn/__init__.py,sha256=2ihzFcKnoMr_2nkHTi86zdLVYSdvmEdBvx5HIgz8tF8,147
|
2
2
|
uvicorn/__main__.py,sha256=DQizy6nKP0ywhPpnCHgmRDYIMfcqZKVEzNIWQZjqtVQ,62
|
3
3
|
uvicorn/_subprocess.py,sha256=wc7tS3hmHLX9RHBJchu0ZHjUeQEuXehi3xvQvK4uUTY,2741
|
4
|
-
uvicorn/_types.py,sha256=
|
4
|
+
uvicorn/_types.py,sha256=TcUzCyKNq90ZX2Hxa6ce0juF558zLO_AyBB1XijnD2Y,7814
|
5
5
|
uvicorn/config.py,sha256=gk9sg4XHc1FcUbx9mN56kAfKN4ERMKM_qc3V9qlVPOI,20671
|
6
6
|
uvicorn/importer.py,sha256=nRt0QQ3qpi264-n_mR0l55C2ddM8nowTNzT1jsWaam8,1128
|
7
7
|
uvicorn/logging.py,sha256=sg4D9lHaW_kKQj_kmP-bolbChjKfhBuihktlWp8RjSI,4236
|
@@ -30,16 +30,16 @@ uvicorn/protocols/http/h11_impl.py,sha256=TycBaEdfs74j2t-EqsOHpd1s0RNDx6wYpgIaQV
|
|
30
30
|
uvicorn/protocols/http/httptools_impl.py,sha256=ptIkbeTmmqz9yB1NHVFszp2nHeQxjU10ZYdzdo_i6CA,21300
|
31
31
|
uvicorn/protocols/websockets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
32
|
uvicorn/protocols/websockets/auto.py,sha256=kNP-h07ZzjA9dKRUd7MNO0J7xhRJ5xVBfit7wCbdB0A,574
|
33
|
-
uvicorn/protocols/websockets/websockets_impl.py,sha256=
|
34
|
-
uvicorn/protocols/websockets/wsproto_impl.py,sha256=
|
33
|
+
uvicorn/protocols/websockets/websockets_impl.py,sha256=oJMi-WfygYHHt_CK0MstaXwicfNnQ2NMCrjsL_NJzbw,15479
|
34
|
+
uvicorn/protocols/websockets/wsproto_impl.py,sha256=GuEtZcUFiPIGhXZHV9ZlIZq3Kva3izqv-58cVkPh-58,15241
|
35
35
|
uvicorn/supervisors/__init__.py,sha256=UVJYW3RVHMDSgUytToyAgGyd9NUQVqbNpVrQrvm4Tpc,700
|
36
36
|
uvicorn/supervisors/basereload.py,sha256=u83LepHT28QFH84wwsxJypwBKO1apG4c4WziPMfOqmE,3850
|
37
|
-
uvicorn/supervisors/multiprocess.py,sha256=
|
37
|
+
uvicorn/supervisors/multiprocess.py,sha256=lvaD0CYC8P5H8tABc0G3dmcWgw_WnUQLUfZYlmxHnkI,7457
|
38
38
|
uvicorn/supervisors/statreload.py,sha256=gc-HUB44f811PvxD_ZIEQYenM7mWmhQQjYg7KKQ1c5o,1542
|
39
39
|
uvicorn/supervisors/watchfilesreload.py,sha256=RMhWgInlOr0MJB0RvmW50RZY1ls9Kp9VT3eaLjdRTpw,2935
|
40
40
|
uvicorn/supervisors/watchgodreload.py,sha256=kd-gOvp14ArTNIc206Nt5CEjZZ4NP2UmMVYE7571yRQ,5486
|
41
|
-
uvicorn-0.30.
|
42
|
-
uvicorn-0.30.
|
43
|
-
uvicorn-0.30.
|
44
|
-
uvicorn-0.30.
|
45
|
-
uvicorn-0.30.
|
41
|
+
uvicorn-0.30.2.dist-info/METADATA,sha256=UDBfbAXOiHDZnqSivWt_EDhuBi1bvetAXusgzyhOSAc,6523
|
42
|
+
uvicorn-0.30.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
43
|
+
uvicorn-0.30.2.dist-info/entry_points.txt,sha256=FW1w-hkc9QgwaGoovMvm0ZY73w_NcycWdGAUfDsNGxw,46
|
44
|
+
uvicorn-0.30.2.dist-info/licenses/LICENSE.md,sha256=7-Gs8-YvuZwoiw7HPlp3O3Jo70Mg_nV-qZQhTktjw3E,1526
|
45
|
+
uvicorn-0.30.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|