-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
enhancementNew feature or requestNew feature or requestintegrationsFramework integrations partFramework integrations part
Description
The docs instruct to use create_async_container but it won't work with sync endpoints.
You'll end up awaiting for sync function in https://github.com/reagento/dishka/blob/develop/src/dishka/integrations/base.py#L207
The lib hard-codes is_async=True in https://github.com/reagento/dishka/blob/develop/src/dishka/integrations/fastapi.py#L47
Are sync endpoints simply not supported?
In general, how can I use same container in both sync and async contexts? Consider creating an async container for FastAPI, but then tests are written as sync, and you want to access the same container from there - but can't call async AsyncContainer.get from sync method.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestintegrationsFramework integrations partFramework integrations part