uvicorn 0.27.0__tar.gz → 0.27.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.
Files changed (45) hide show
  1. {uvicorn-0.27.0 → uvicorn-0.27.1}/PKG-INFO +2 -2
  2. {uvicorn-0.27.0 → uvicorn-0.27.1}/README.md +1 -1
  3. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/__init__.py +1 -1
  4. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/http/h11_impl.py +8 -0
  5. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/http/httptools_impl.py +6 -6
  6. {uvicorn-0.27.0 → uvicorn-0.27.1}/.gitignore +0 -0
  7. {uvicorn-0.27.0 → uvicorn-0.27.1}/LICENSE.md +0 -0
  8. {uvicorn-0.27.0 → uvicorn-0.27.1}/pyproject.toml +0 -0
  9. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/__main__.py +0 -0
  10. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/_subprocess.py +0 -0
  11. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/_types.py +0 -0
  12. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/config.py +0 -0
  13. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/importer.py +0 -0
  14. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/lifespan/__init__.py +0 -0
  15. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/lifespan/off.py +0 -0
  16. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/lifespan/on.py +0 -0
  17. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/logging.py +0 -0
  18. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/loops/__init__.py +0 -0
  19. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/loops/asyncio.py +0 -0
  20. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/loops/auto.py +0 -0
  21. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/loops/uvloop.py +0 -0
  22. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/main.py +0 -0
  23. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/middleware/__init__.py +0 -0
  24. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/middleware/asgi2.py +0 -0
  25. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/middleware/message_logger.py +0 -0
  26. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/middleware/proxy_headers.py +0 -0
  27. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/middleware/wsgi.py +0 -0
  28. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/__init__.py +0 -0
  29. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/http/__init__.py +0 -0
  30. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/http/auto.py +0 -0
  31. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/http/flow_control.py +0 -0
  32. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/utils.py +0 -0
  33. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/websockets/__init__.py +0 -0
  34. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/websockets/auto.py +0 -0
  35. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/websockets/websockets_impl.py +0 -0
  36. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/protocols/websockets/wsproto_impl.py +0 -0
  37. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/py.typed +0 -0
  38. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/server.py +0 -0
  39. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/supervisors/__init__.py +0 -0
  40. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/supervisors/basereload.py +0 -0
  41. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/supervisors/multiprocess.py +0 -0
  42. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/supervisors/statreload.py +0 -0
  43. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/supervisors/watchfilesreload.py +0 -0
  44. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/supervisors/watchgodreload.py +0 -0
  45. {uvicorn-0.27.0 → uvicorn-0.27.1}/uvicorn/workers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uvicorn
3
- Version: 0.27.0
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
- **Requirements**: Python 3.8+
56
+ ---
57
57
 
58
58
  Uvicorn is an ASGI web server implementation for Python.
59
59
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  **Documentation**: [https://www.uvicorn.org](https://www.uvicorn.org)
16
16
 
17
- **Requirements**: Python 3.8+
17
+ ---
18
18
 
19
19
  Uvicorn is an ASGI web server implementation for Python.
20
20
 
@@ -1,5 +1,5 @@
1
1
  from uvicorn.config import Config
2
2
  from uvicorn.main import Server, main, run
3
3
 
4
- __version__ = "0.27.0"
4
+ __version__ = "0.27.1"
5
5
  __all__ = ["main", "run", "Config", "Server"]
@@ -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
  """
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes