-
-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken wiring of sync inject-decorated methods #672
Comments
@rmk135 Would it be possible to release a fix for this bug in an upcoming release? |
Any updates? |
Any updates? I have same issue, For now I just using dependency-injector==4.38.0 |
I have a similar issue. Is there a workaround? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
following use case seems broken in versions >= 4.39.0:
Output in version 4.38.0:
Output in versions >4.38.0
What seem to happen is that since the
_get_sync_patched
decorator has been moved to the cython part of the package, the signature of the@inject
-decorated func/methods are now cython (type(MyClass.__init__)
resolves tocython_function_or_method
), thereforeinspect.isfunction()
/inspect.ismethod()
resolve to False, and so those functions are never patched during container wiring.Might be related to #589.
Finally, I have successfully tested here using the same patch that was applied in 4.39.1 for
_get_async_patched
coroutine that wasn't properly signed from cython coroutine, so creating the_get_sync_patched
in wiring.py that calls _cwiring's_sync_inject
, which effectively conserves behavior when running wiring.The text was updated successfully, but these errors were encountered: