using a dependencies container as a dependency
See original GitHub issueHere is another example causing a problem – using a dependenciesContainer as a dependency:
class D(containers.DeclarativeContainer):
foo = providers.Object("foo")
class A(containers.DeclarativeContainer):
d = providers.DependenciesContainer()
bar = providers.Callable(lambda f: f + "++", d.foo.provided)
class B(containers.DeclarativeContainer):
d = providers.DependenciesContainer()
a = providers.Container(A, d=d)
b = B(d = D())
b.a().bar() # gives Error: Dependency is not defined
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
ContainerDependency - Amazon Elastic Container Service
The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container ...
Read more >Docker container dependencies - IBM
Dependencies can be defined between containers in the same pod, where the dependencies are specified by container names.
Read more >How To Manage Docker Dependencies With Ease
Learn the best practices for Docker dependency management: how to enforce dependency maintainability, keep images small, keep images secure, ...
Read more >What is a Dependency Injection Container and why use one
Container as a dependency While it is technically correct, it is really a bad idea. Using a dependency injection container, you have...
Read more >Managing Dependencies Between Components Using the ...
Dependency injection containers reduce the dependency coupling between objects by providing a facility to instantiate instances of classes and manage their ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, WIP. Provider
Container
could be more lazier.I have a fix, but I’m not yet sure if it’s safe to apply it. I have an idea what I could do to make it safer, but it will take some more time. Plan to finish it later today.
@approxit thanks for the heads-up. I’ll covert it into an issue and take a look asap.