### Problem: ```python class MyClass: ... class Container(BaseContainer): p = providers.AsyncFactory(MyClass) await Container.p.resolve() # raises ``` Often, initiating `MyClass` might require an async dependency (in which case `Factory` cannot be used) ### Solution: - [x] Allow `AsyncFactory` to accept sync creators. - [x] Still only allow resolution of async Factory using `resolve()`
Problem:
Often, initiating
MyClassmight require an async dependency (in which caseFactorycannot be used)Solution:
AsyncFactoryto accept sync creators.resolve()