uvicorn 0.27.0.post1__py3-none-any.whl → 0.27.1__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/protocols/http/h11_impl.py +8 -0
- uvicorn/protocols/http/httptools_impl.py +6 -6
- {uvicorn-0.27.0.post1.dist-info → uvicorn-0.27.1.dist-info}/METADATA +2 -2
- {uvicorn-0.27.0.post1.dist-info → uvicorn-0.27.1.dist-info}/RECORD +8 -8
- {uvicorn-0.27.0.post1.dist-info → uvicorn-0.27.1.dist-info}/WHEEL +0 -0
- {uvicorn-0.27.0.post1.dist-info → uvicorn-0.27.1.dist-info}/entry_points.txt +0 -0
- {uvicorn-0.27.0.post1.dist-info → uvicorn-0.27.1.dist-info}/licenses/LICENSE.md +0 -0
uvicorn/__init__.py
CHANGED
@@ -236,6 +236,14 @@ class H11Protocol(asyncio.Protocol):
|
|
236
236
|
else:
|
237
237
|
app = self.app
|
238
238
|
|
239
|
+
# When starting to process a request, disable the keep-alive
|
240
|
+
# timeout. Normally we disable this when receiving data from
|
241
|
+
# client and set back when finishing processing its request.
|
242
|
+
# However, for pipelined requests processing finishes after
|
243
|
+
# already receiving the next request and thus the timer may
|
244
|
+
# be set here, which we don't want.
|
245
|
+
self._unset_keepalive_if_required()
|
246
|
+
|
239
247
|
self.cycle = RequestResponseCycle(
|
240
248
|
scope=self.scope,
|
241
249
|
conn=self.conn,
|
@@ -326,22 +326,22 @@ class HttpToolsProtocol(asyncio.Protocol):
|
|
326
326
|
if self.transport.is_closing():
|
327
327
|
return
|
328
328
|
|
329
|
-
# Set a short Keep-Alive timeout.
|
330
329
|
self._unset_keepalive_if_required()
|
331
330
|
|
332
|
-
self.timeout_keep_alive_task = self.loop.call_later(
|
333
|
-
self.timeout_keep_alive, self.timeout_keep_alive_handler
|
334
|
-
)
|
335
|
-
|
336
331
|
# Unpause data reads if needed.
|
337
332
|
self.flow.resume_reading()
|
338
333
|
|
339
|
-
# Unblock any pipelined events.
|
334
|
+
# Unblock any pipelined events. If there are none, arm the
|
335
|
+
# Keep-Alive timeout instead.
|
340
336
|
if self.pipeline:
|
341
337
|
cycle, app = self.pipeline.pop()
|
342
338
|
task = self.loop.create_task(cycle.run_asgi(app))
|
343
339
|
task.add_done_callback(self.tasks.discard)
|
344
340
|
self.tasks.add(task)
|
341
|
+
else:
|
342
|
+
self.timeout_keep_alive_task = self.loop.call_later(
|
343
|
+
self.timeout_keep_alive, self.timeout_keep_alive_handler
|
344
|
+
)
|
345
345
|
|
346
346
|
def shutdown(self) -> None:
|
347
347
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: uvicorn
|
3
|
-
Version: 0.27.
|
3
|
+
Version: 0.27.1
|
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
|
@@ -53,7 +53,7 @@ Description-Content-Type: text/markdown
|
|
53
53
|
|
54
54
|
**Documentation**: [https://www.uvicorn.org](https://www.uvicorn.org)
|
55
55
|
|
56
|
-
|
56
|
+
---
|
57
57
|
|
58
58
|
Uvicorn is an ASGI web server implementation for Python.
|
59
59
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
uvicorn/__init__.py,sha256=
|
1
|
+
uvicorn/__init__.py,sha256=yUFNyOURRd8gh7-5bAUAgvYVHlvGosTzD7QtO7fJXuk,147
|
2
2
|
uvicorn/__main__.py,sha256=DQizy6nKP0ywhPpnCHgmRDYIMfcqZKVEzNIWQZjqtVQ,62
|
3
3
|
uvicorn/_subprocess.py,sha256=qLk4nrhmOV6XgsFyxLSsY0IE1fh76-WmCv_hFyXpVYw,2430
|
4
4
|
uvicorn/_types.py,sha256=l-8V0u0ymt1bQ3P1C_YiExeYLeFgUXi0B7JJzPcbLqg,7965
|
@@ -26,8 +26,8 @@ uvicorn/protocols/utils.py,sha256=_LBUBuSiw9HesKilP1vv0-cuQRxZCmm7wHmTUUnp6e8,18
|
|
26
26
|
uvicorn/protocols/http/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
27
|
uvicorn/protocols/http/auto.py,sha256=YfXGyzWTaaE2p_jkTPWrJCXsxEaQnC3NK0-G7Wgmnls,403
|
28
28
|
uvicorn/protocols/http/flow_control.py,sha256=4ERvUKBa8Ocsmw-kpRmVkwbEnmuxPmKnOE-NV4mkE2M,1777
|
29
|
-
uvicorn/protocols/http/h11_impl.py,sha256
|
30
|
-
uvicorn/protocols/http/httptools_impl.py,sha256=
|
29
|
+
uvicorn/protocols/http/h11_impl.py,sha256=-h3B1PtnT5go_7fIYMa5JJ7FUBS66dwW5FL4cjDrEto,20468
|
30
|
+
uvicorn/protocols/http/httptools_impl.py,sha256=tOOFC2JJ6dMrBZdVl8W7nocWzqoK5Rqzl5wVkAnl9-A,21759
|
31
31
|
uvicorn/protocols/websockets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
32
32
|
uvicorn/protocols/websockets/auto.py,sha256=H7irPeGN2MdHE29hdPKwca9YTA7HaOuWdIxvRuOgRtM,548
|
33
33
|
uvicorn/protocols/websockets/websockets_impl.py,sha256=kWlqERmip64SW0OQTQNAb1JfI9q4WwtlF_wmd1zy4bE,15630
|
@@ -38,8 +38,8 @@ uvicorn/supervisors/multiprocess.py,sha256=EAF31mLkmFm-XHp1JwYZg9ghaCjkWkgD_Vbn_
|
|
38
38
|
uvicorn/supervisors/statreload.py,sha256=XmfYr1iC8XoMUrxxjQnrqQGmBShF0L1Q4n-OPxGVOh8,1588
|
39
39
|
uvicorn/supervisors/watchfilesreload.py,sha256=E62mIa-w_SxtuDj9KX4h8ziufRMsYU4PkdCO0asK2zQ,3027
|
40
40
|
uvicorn/supervisors/watchgodreload.py,sha256=5gSwqV8boxgrGE1j6uFm1utJaF7CuO0Aw5Q--mInIgY,5638
|
41
|
-
uvicorn-0.27.
|
42
|
-
uvicorn-0.27.
|
43
|
-
uvicorn-0.27.
|
44
|
-
uvicorn-0.27.
|
45
|
-
uvicorn-0.27.
|
41
|
+
uvicorn-0.27.1.dist-info/METADATA,sha256=XPnBSYwjoHVMAJHEFOEISoQsuHmfgwEQaWpFOdczFGg,6330
|
42
|
+
uvicorn-0.27.1.dist-info/WHEEL,sha256=TJPnKdtrSue7xZ_AVGkp9YXcvDrobsjBds1du3Nx6dc,87
|
43
|
+
uvicorn-0.27.1.dist-info/entry_points.txt,sha256=FW1w-hkc9QgwaGoovMvm0ZY73w_NcycWdGAUfDsNGxw,46
|
44
|
+
uvicorn-0.27.1.dist-info/licenses/LICENSE.md,sha256=7-Gs8-YvuZwoiw7HPlp3O3Jo70Mg_nV-qZQhTktjw3E,1526
|
45
|
+
uvicorn-0.27.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|