fastapi
fastapi copied to clipboard
🐛 Fix parameterless `Depends()` with generics
Previously, using parameterless Depends()
in a generic context would bind the dependency to the first encountered concrete type.
Fixes #9450.
📝 Docs preview for commit a8cb51402b016d85475a27666acd4558ef932a84 at: https://64515f2306603a0078b9209c--fastapi.netlify.app
Looking forward to this fix. I want to use code from #9450 as example to implement injection of contollers in my project
Hi @nzig, I've been watching this pr all month. And I'm already beginning to think that if it will be put in, it will not happen very soon. But it's a very cool fix, which will allow to write less monotonous code for your classes. Maybe it's possible to do something to get this pr accepted faster?
@9en9i That's up to @tiangolo. He's the only one that can merge PRs.
@tiangolo hi, is it possible that this bug fix request will ever be accepted?
@Kludex @JarroVGIT @jgould22 @ycd Perhaps one of you can somehow contribute to the promotion of this pull request? This request fixes a feature that was added a little less than a year ago, and it would be nice to get full functionality.
@tiangolo hi! This is a very cool feature that makes the code more readable and clean. Should we hope for its will be accepted?
Thanks @nzig! :rocket:
And thanks everyone for the discussion. :coffee:
This will be available in the next hours in FastAPI 0.110.1 :tada: