Closed kolypto closed 3 years ago
Thanks @kolypto. I'll take a look.
I have fixed it, but can not publish to PyPI cause of CI issues.
Travis CI has changed the policy of OSS projects support recently. I asked them to support Dependency Injector. They provided some credits one-time. Seems like this amount is used, so I'm requesting them to replenish the credits again. I expect this to get resolved in a day or two. Otherwise I will publish source code tar ball from my laptop.
@kolypto
Fixed in 4.11.0
. It's already on PyPI.
My apologies it was there and it took so long to fix it. I had to make unplanned migrating to Github Actions. I also added extra tests and refactored async injections code. It will go smoothly now. Thanks for reporting the bug. If you find anything else or just need any other help - open an issue.
Best, Roman
@rmk135 thanks for fixing, it was actually quite responsive of you :)
It turns out that async providers currently cannot have async dependencies.
Example: in this container, both are
async
functions:Now, when in my code I request an instance of
service
:the expected result would be an instance of service. The actual result is its unawaited coroutine:
This behavior persists with Resource, Couroutine, and other providers.
Full source code to reproduce: