mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 01:47:36 +03:00 
			
		
		
		
	Add container attribute to Container provider
This commit is contained in:
		
							parent
							
								
									afa450d8a5
								
							
						
					
					
						commit
						15cae0c3dc
					
				| 
						 | 
				
			
			@ -952,12 +952,12 @@ struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer {
 | 
			
		|||
 * 
 | 
			
		||||
 * 
 | 
			
		||||
 * cdef class Container(DependenciesContainer):             # <<<<<<<<<<<<<<
 | 
			
		||||
 *     cpdef object container
 | 
			
		||||
 *     cdef object __container
 | 
			
		||||
 * 
 | 
			
		||||
 */
 | 
			
		||||
struct __pyx_obj_19dependency_injector_9providers_Container {
 | 
			
		||||
  struct __pyx_obj_19dependency_injector_9providers_DependenciesContainer __pyx_base;
 | 
			
		||||
  PyObject *container;
 | 
			
		||||
  PyObject *__pyx___container;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1510,7 +1510,7 @@ static struct __pyx_vtabstruct_19dependency_injector_9providers_DependenciesCont
 | 
			
		|||
 * 
 | 
			
		||||
 * 
 | 
			
		||||
 * cdef class Container(DependenciesContainer):             # <<<<<<<<<<<<<<
 | 
			
		||||
 *     cpdef object container
 | 
			
		||||
 *     cdef object __container
 | 
			
		||||
 * 
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -42,7 +42,7 @@ cdef class DependenciesContainer(Object):
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
cdef class Container(DependenciesContainer):
 | 
			
		||||
    cpdef object container
 | 
			
		||||
    cdef object __container
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
cdef class OverridingContext(object):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -609,9 +609,13 @@ cdef class DependenciesContainer(Object):
 | 
			
		|||
cdef class Container(DependenciesContainer):
 | 
			
		||||
 | 
			
		||||
    def __init__(self, object container):
 | 
			
		||||
        self.container = container
 | 
			
		||||
        self.__container = container
 | 
			
		||||
        super().__init__()
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def container(self):
 | 
			
		||||
        return self.__container
 | 
			
		||||
 | 
			
		||||
    def __deepcopy__(self, memo):
 | 
			
		||||
        """Create and return full copy of provider."""
 | 
			
		||||
        cdef DependenciesContainer copied
 | 
			
		||||
| 
						 | 
				
			
			@ -620,7 +624,7 @@ cdef class Container(DependenciesContainer):
 | 
			
		|||
        if copied is not None:
 | 
			
		||||
            return copied
 | 
			
		||||
 | 
			
		||||
        copied = self.__class__(self.container)
 | 
			
		||||
        copied = self.__class__(self.__container)
 | 
			
		||||
        copied.__provides = deepcopy(self.__provides, memo)
 | 
			
		||||
        copied.__providers = deepcopy(self.__providers, memo)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user