Skip to content

Conversation

@ivanovart
Copy link

I have the same problem as in #681: the resources are not closed in case functions are failing, and I have my exceptions handler on a higher level then functions I inject.
So I suggest the change to close the dependencies in any case.

Copy link
Contributor

@ZipFile ZipFile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contribution! Looks promising, but it needs additional work to do.



cdef bint _isawaitable(object instance):
cdef bint _is_awaitable(object instance):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks unrelated to the main topic of PR. Please revert to avoid diff noise.

result = fn(*args, **to_inject)
try:
return fn(*args, **to_inject)
finally:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a test case to verify that this code block now is always executed.

to_inject[injection] = provide
try:
return await fn(*args, **to_inject)
finally:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer store generated C files in source tree. Rebasing with latest master should no longer produce merge conflicts.

@ivanovart ivanovart closed this Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants