#
2483:9d1e9b09cc6f |
| 27-May-2023 |
synodriver |
Python: Add ASGI lifespan state support.
Lifespan state is a special dict in asgi lifespan scope, which allow applications to persist data from the lifespan cycle to request/response handling. The s
Python: Add ASGI lifespan state support.
Lifespan state is a special dict in asgi lifespan scope, which allow applications to persist data from the lifespan cycle to request/response handling. The scope["state"] namespace provides a place to store these sorts of things. The server will ensure that a shallow copy of the namespace is passed into each subsequent request/response call into the application.
Some frameworks are already taking advantage of this feature, for example, starlette, and without this feature they wouldn't work properly.
Signed-off-by: synodriver <diguohuangjiajinweijun@gmail.com> Reviewed-by: Andrew Clayton <a.clayton@nginx.com> [ Minor code tweaks to avoid lines > 80 chars, static a function and re-work the PyMemberDef structure initialisation for Python <3.7 and -Wwrite-strings compatibility - Andrew ] Tested-by: <https://github.com/synodriver> Tested-by: <https://github.com/hawiliali> Closes: <https://github.com/nginx/unit/issues/864> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
show more ...
|
Revision tags: 1.30.0-1, 1.30.0, 1.29.1-1, 1.29.1, 1.29.0-1, 1.29.0, 1.28.0-1, 1.28.0, 1.27.0-1, 1.27.0, 1.26.1-1, 1.26.1, 1.26.0-1, 1.26.0, 1.25.0-1, 1.25.0, 1.24.0-1, 1.24.0, 1.23.0-1, 1.23.0, 1.22.0-1, 1.22.0, 1.21.0-1, 1.21.0 |
|
#
1681:542b5b8c0647 |
| 04-Nov-2020 |
Max Romanov |
Python: request processing in multiple threads.
This closes #459 issue on GitHub.
|
Revision tags: 1.20.0-1, 1.20.0 |
|
#
1624:e46b1b422545 |
| 01-Oct-2020 |
Max Romanov |
Python: ASGI server introduced.
This closes #461 issue on GitHub.
|