🐛 Allow async class methods as dependencies not decorated#10250
Closed
danielfcollier wants to merge 2 commits intofastapi:masterfrom
Closed
🐛 Allow async class methods as dependencies not decorated#10250danielfcollier wants to merge 2 commits intofastapi:masterfrom
danielfcollier wants to merge 2 commits intofastapi:masterfrom
Conversation
7353741 to
5812a5c
Compare
13a22eb to
cc928d5
Compare
a0c2f0f to
d074265
Compare
Member
|
I think there's an utility function in starlette.utils for this. |
Author
|
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. |
Member
|
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! 🍰 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.