New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup Context type alias #5883
Labels
Comments
What's an example of when this would be used? |
Here is an example of how a user might use this: from typing import List
from aiohttp.web import Application
from server.contexts.database_client import database_client_context
from server.contexts.web_client import web_client_context
app = Application()
contexts: List[CleanupContext] = [database_client_context, web_client_context]
for context in contexts:
app.cleanup_ctx.append(context) |
It could also be used internally in |
Seems reasonable enough. I've added it to #4686. Feel free to make a PR (also, one for Middleware if you fancy closing out that issue). |
3 tasks
Will do. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem?
When typing an application, there is no type alias for a cleanup context available for users to use.
Describe the solution you'd like
Add a type alias
CleanupContext
toaiohttp.typedefs
:Describe alternatives you've considered
Related component
Server
Additional context
This is similar to #5842 which was addressed in #5847.
Code of Conduct
The text was updated successfully, but these errors were encountered: