mirror of
				https://github.com/ets-labs/python-dependency-injector.git
				synced 2025-11-04 01:47:36 +03:00 
			
		
		
		
	Merge branch 'release/4.8.3' into master
This commit is contained in:
		
						commit
						3e207a4f21
					
				| 
						 | 
				
			
			@ -7,6 +7,12 @@ that were made in every particular version.
 | 
			
		|||
From version 0.7.6 *Dependency Injector* framework strictly 
 | 
			
		||||
follows `Semantic versioning`_
 | 
			
		||||
 | 
			
		||||
4.8.3
 | 
			
		||||
-----
 | 
			
		||||
- Fix a bug in the ``Configuration`` provider to correctly handle overriding by ``None``.
 | 
			
		||||
  See issue `#358 <https://github.com/ets-labs/python-dependency-injector/issues/358>`_.
 | 
			
		||||
  Many thanks to `Stefano Frazzetto <https://github.com/StefanoFrazzetto>`_ for reporting the issue.
 | 
			
		||||
 | 
			
		||||
4.8.2
 | 
			
		||||
-----
 | 
			
		||||
- Fix ``Container`` provider to apply context overridings on root container initialization.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
"""Top-level package."""
 | 
			
		||||
 | 
			
		||||
__version__ = '4.8.2'
 | 
			
		||||
__version__ = '4.8.3'
 | 
			
		||||
"""Version number.
 | 
			
		||||
 | 
			
		||||
:type: str
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -1507,6 +1507,8 @@ cdef class Configuration(Object):
 | 
			
		|||
        :return: Overriding context.
 | 
			
		||||
        :rtype: :py:class:`OverridingContext`
 | 
			
		||||
        """
 | 
			
		||||
        if provider is None:
 | 
			
		||||
            provider = {}
 | 
			
		||||
        context = super().override(provider)
 | 
			
		||||
        self.reset_cache()
 | 
			
		||||
        return context
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -185,6 +185,13 @@ class ConfigTests(unittest.TestCase):
 | 
			
		|||
        with self.assertRaises(AttributeError):
 | 
			
		||||
            a.__name__
 | 
			
		||||
 | 
			
		||||
    def test_missing_key(self):
 | 
			
		||||
        # See: https://github.com/ets-labs/python-dependency-injector/issues/358
 | 
			
		||||
        self.config.override(None)
 | 
			
		||||
        value = self.config.key()
 | 
			
		||||
 | 
			
		||||
        self.assertIsNone(value)
 | 
			
		||||
 | 
			
		||||
    def test_deepcopy(self):
 | 
			
		||||
        provider = providers.Configuration('config')
 | 
			
		||||
        provider_copy = providers.deepcopy(provider)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user