ivankorobkov / python-inject

Python dependency injection
Apache License 2.0
694 stars 79 forks source link

inspect.iscoroutinefunction fails after inject wraps #67

Closed nikordaris closed 4 years ago

nikordaris commented 4 years ago

Decorating functions with param/params/autoparams returns a synchronous function instead of preserving the async function. The following inspect.iscoroutinefunction will fail. This causes problems when other decorators depend on inspecting the function prior to executing it.

@inject.param("val")
async def test_func(val):
    return val

assert inspect.iscoroutinefunction(test_func)
nikordaris commented 4 years ago

@ivankorobkov when do we expect to get a version cut with this fix?

ivankorobkov commented 4 years ago

Oh, I'm sorry. It just slipped my mind.

The next version https://pypi.org/project/Inject/4.3.0/

nikordaris commented 4 years ago

No worries! Thanks!!