question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

using a dependencies container as a dependency

See original GitHub issue

Here 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:closed
  • Created 3 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rmk135commented, Jan 13, 2021

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.

0reactions
rmk135commented, Jan 27, 2021

ezgif-7-0d11c34a9a3a

@approxit thanks for the heads-up. I’ll covert it into an issue and take a look asap.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found