mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 09:57:37 +03:00 
			
		
		
		
	Merge branch 'release/4.0.3' into master
This commit is contained in:
		
						commit
						4e5083693d
					
				| 
						 | 
				
			
			@ -7,6 +7,11 @@ that were made in every particular version.
 | 
			
		|||
From version 0.7.6 *Dependency Injector* framework strictly 
 | 
			
		||||
follows `Semantic versioning`_
 | 
			
		||||
 | 
			
		||||
4.0.3
 | 
			
		||||
-----
 | 
			
		||||
- Deprecate ``@containers.override()`` and ``@containers.copy()`` decorators.
 | 
			
		||||
- Update changelog of version ``4.0.0`` so it lists all deprecated features.
 | 
			
		||||
 | 
			
		||||
4.0.2
 | 
			
		||||
-----
 | 
			
		||||
- Fix typing stubs for ``@container.override()`` and ``@containers.copy()`` decorators (
 | 
			
		||||
| 
						 | 
				
			
			@ -33,6 +38,8 @@ Deprecations:
 | 
			
		|||
- Deprecate ``ext.aiohttp`` module in favor of ``wiring`` feature.
 | 
			
		||||
- Deprecate ``ext.flask`` module in favor of ``wiring`` feature.
 | 
			
		||||
- Deprecate ``.delegate()`` provider method in favor of ``.provider`` attribute.
 | 
			
		||||
- Deprecate ``@containers.override()`` decorator in favor of overriding container on instance level.
 | 
			
		||||
- Deprecate ``@containers.copy()`` decorator.
 | 
			
		||||
 | 
			
		||||
Removals:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
"""Top-level package."""
 | 
			
		||||
 | 
			
		||||
__version__ = '4.0.2'
 | 
			
		||||
__version__ = '4.0.3'
 | 
			
		||||
"""Version number.
 | 
			
		||||
 | 
			
		||||
:type: str
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
"""Containers module."""
 | 
			
		||||
 | 
			
		||||
import sys
 | 
			
		||||
import warnings
 | 
			
		||||
 | 
			
		||||
import six
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -427,6 +428,11 @@ def override(object container):
 | 
			
		|||
    :return: Declarative container's overriding decorator.
 | 
			
		||||
    :rtype: callable(:py:class:`DeclarativeContainer`)
 | 
			
		||||
    """
 | 
			
		||||
    warnings.warn(
 | 
			
		||||
        'Decorator "@override()" is deprecated since version 4.0.3. '
 | 
			
		||||
        'Use overriding on instance level instead "container.override(AnotherContainer())".',
 | 
			
		||||
        category=DeprecationWarning,
 | 
			
		||||
    )
 | 
			
		||||
    def _decorator(object overriding_container):
 | 
			
		||||
        """Overriding decorator."""
 | 
			
		||||
        container.override(overriding_container)
 | 
			
		||||
| 
						 | 
				
			
			@ -447,6 +453,10 @@ def copy(object container):
 | 
			
		|||
    :return: Declarative container's copying decorator.
 | 
			
		||||
    :rtype: callable(:py:class:`DeclarativeContainer`)
 | 
			
		||||
    """
 | 
			
		||||
    warnings.warn(
 | 
			
		||||
        'Decorator "@copy()" is deprecated since version 4.0.3.',
 | 
			
		||||
        category=DeprecationWarning,
 | 
			
		||||
    )
 | 
			
		||||
    def _decorator(copied_container):
 | 
			
		||||
        cdef dict memo = dict()
 | 
			
		||||
        for name, provider in six.iteritems(copied_container.cls_providers):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user