Revert "Add overriding logic for Container provider"
This reverts commit b727be3f9a
.
This commit is contained in:
parent
b727be3f9a
commit
feab6b6814
File diff suppressed because it is too large
Load Diff
|
@ -2160,7 +2160,7 @@ cdef class Container(Provider):
|
|||
deepcopy(self.container, memo),
|
||||
**deepcopy(self.overriding_providers, memo),
|
||||
)
|
||||
self._copy_overridings(copied, memo)
|
||||
# self._copy_overridings(copied, memo)
|
||||
|
||||
return copied
|
||||
|
||||
|
@ -2175,18 +2175,7 @@ cdef class Container(Provider):
|
|||
|
||||
def override(self, provider):
|
||||
"""Override provider with another provider."""
|
||||
self.container.override(provider)
|
||||
return super(Container, self).override(provider)
|
||||
|
||||
def reset_last_overriding(self):
|
||||
"""Reset last overriding provider."""
|
||||
self.container.reset_last_overriding()
|
||||
return super(Container, self).reset_last_overriding()
|
||||
|
||||
def reset_override(self):
|
||||
"""Reset all overriding providers."""
|
||||
self.container.reset_override()
|
||||
return super(Container, self).reset_override()
|
||||
raise Error('Provider {0} can not be overridden'.format(self))
|
||||
|
||||
cpdef object _provide(self, tuple args, dict kwargs):
|
||||
"""Return single instance."""
|
||||
|
|
Loading…
Reference in New Issue