🐛 Allow async class methods as dependencies not decorated#10250
🐛 Allow async class methods as dependencies not decorated#10250danielfcollier wants to merge 2 commits into
Conversation
7353741 to
5812a5c
Compare
13a22eb to
cc928d5
Compare
a0c2f0f to
d074265
Compare
|
I think there's an utility function in starlette.utils for this. |
|
I've checked Starlette, but the test cases for the Theses changes I've checked going down with the debugger, I've seen only issues in the FastAPI layer. But, later I could check more to see if there is any relation between Starlette and the Generators part. |
|
Thanks for the interest @danielfcollier! ☕ It seems that the discussion is about some code that is not really supported by Pydantic nor FastAPI (Pydantic models as attributes of another class). Let's wait to see if there's a reason why that code was like that, or what was the original intention. For now, I'll pass on this one, but thanks for the effort! 🍰 |
Found this problem: #10238
Which happens to be related with this issue: #10236
I could find the solution for async class methods in not decorated API routes.
Added tests to coverage the cases.
p.s.: still, missing to work with generators.