ivankorobkov / python-inject

Python dependency injection
Apache License 2.0
671 stars 77 forks source link

Add asyncio Paramter(s) Injection Support #66

Closed nikordaris closed 3 years ago

nikordaris commented 3 years ago

Fixes #67

This is a fix for inspect.iscoroutinefunction failing for decorated async functions. Currently @inject.param will return a synchronous function that returns an awaitable object. This interferes with other decorators that need to inspect the function and determine if it is a coroutine function prior to executing the function.

ivankorobkov commented 3 years ago

Hi,

Thanks for a PR. I'll take some time before merging it.

ivankorobkov commented 3 years ago

I'll make a new release later this week.