-
- Notifications
You must be signed in to change notification settings - Fork 338
Closed
Labels
Description
I have this method router method wich resolve correctly the depency in version 4.51
import logging from typing import Any, List from dependency_injector.wiring import Provide, inject from fastapi.routing import APIRouter from app.core.containers import Containers from app.core.product.entities.product import ProductBase from app.core.product.services.product import ProductService router = APIRouter() @router.get('/', response_model=List[ProductBase]) @inject async def read_products( skip: int = 0, limit: int = 100, product_service: ProductService = Depends(Provide[Containers.product]), ) -> Any: products = await product_service.get_multi(skip=skip, limit=limit) return products
But when I upgraded it to 4.5.2 to fixe this behavior -> #330 the Provide dependency get unresolved a throw: AttributeError: 'Provide' object has no attribute 'get_multi'
and actually product_service
is an instance of Provide not a ProductService
as I need it.