From bf1deeb8ac765005494b99efb4639bca64f6f161 Mon Sep 17 00:00:00 2001 From: Aldo Mateli Date: Sun, 27 Oct 2024 19:24:14 +0000 Subject: [PATCH] Fix py<310 --- wireup/ioc/dependency_container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wireup/ioc/dependency_container.py b/wireup/ioc/dependency_container.py index d793194..3d565c2 100644 --- a/wireup/ioc/dependency_container.py +++ b/wireup/ioc/dependency_container.py @@ -351,7 +351,7 @@ async def __async_create_instance(self, klass: type[T], qualifier: Qualifier | N instance = ( next(instance_or_generator) if factory_type == FactoryType.GENERATOR - else await anext(instance_or_generator) + else await instance_or_generator.__anext__() ) else: generator = None