Josiah Kaviani
Josiah Kaviani
Autowire is bad.
You can inject: * dictionaries * functions * integers
Dependency injection is all about composition. Would you use **global** mocks in the **production** code? > it is not for mocking, it is for isolation with composition > DI is...
Include an explanation of this thesis in the FAQ. A quote from @asvetlov: > Dependency injection is a worse version of context-local variables, isn't it? > > Like in singleton...
Service locator needs massive changes in the code base. We can avoid it with `TestInjector` or `Mocker` which will need to define ones. So if we need to add injection...
We tried new approach in the `generics` library. Every documentation page is a standalone document. Every documentation page contains table of contents. Every item in the table of contents should...
```python class Container(Injector): app = App @value async def dep(): ... ``` ```python Container.app # error ``` We force `await Container` before any attribute access.
Value decorator can be applied to the coroutine functions. In this case, we should be able to await them before injection. Any attribute access on `Injector` should start dependency injection...