mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-02-07 07:00:49 +03:00
1.14.6 release
This commit is contained in:
parent
beb7bbd3d9
commit
9da9ef7153
|
@ -51,7 +51,7 @@ from .errors import UndefinedProviderError
|
|||
from . import catalogs
|
||||
catalog = catalogs
|
||||
|
||||
VERSION = '1.14.5'
|
||||
VERSION = '1.14.6'
|
||||
"""Version number that follows semantic versioning.
|
||||
|
||||
:type: str
|
||||
|
|
|
@ -401,6 +401,13 @@ class Factory(Callable):
|
|||
|
||||
:type: type | callable
|
||||
|
||||
.. py:attribute:: cls
|
||||
|
||||
Class that provides object.
|
||||
Alias for :py:attribute:`provides`.
|
||||
|
||||
:type: type
|
||||
|
||||
.. py:attribute:: args
|
||||
|
||||
Tuple of positional argument injections.
|
||||
|
@ -428,7 +435,7 @@ class Factory(Callable):
|
|||
|
||||
provided_type = None
|
||||
|
||||
__slots__ = ('attributes', 'methods')
|
||||
__slots__ = ('cls', 'attributes', 'methods')
|
||||
|
||||
def __init__(self, provides, *args, **kwargs):
|
||||
"""Initializer.
|
||||
|
@ -458,6 +465,8 @@ class Factory(Callable):
|
|||
|
||||
super(Factory, self).__init__(provides, *args, **kwargs)
|
||||
|
||||
self.cls = self.provides
|
||||
|
||||
@property
|
||||
def injections(self):
|
||||
"""Read-only tuple of all injections.
|
||||
|
@ -514,6 +523,13 @@ class DelegatedFactory(Factory):
|
|||
|
||||
:type: type | callable
|
||||
|
||||
.. py:attribute:: cls
|
||||
|
||||
Class that provides object.
|
||||
Alias for :py:attribute:`provides`.
|
||||
|
||||
:type: type
|
||||
|
||||
.. py:attribute:: args
|
||||
|
||||
Tuple of positional argument injections.
|
||||
|
@ -582,6 +598,13 @@ class Singleton(Factory):
|
|||
|
||||
:type: type | callable
|
||||
|
||||
.. py:attribute:: cls
|
||||
|
||||
Class that provides object.
|
||||
Alias for :py:attribute:`provides`.
|
||||
|
||||
:type: type
|
||||
|
||||
.. py:attribute:: args
|
||||
|
||||
Tuple of positional argument injections.
|
||||
|
@ -678,6 +701,13 @@ class DelegatedSingleton(Singleton):
|
|||
|
||||
:type: type | callable
|
||||
|
||||
.. py:attribute:: cls
|
||||
|
||||
Class that provides object.
|
||||
Alias for :py:attribute:`provides`.
|
||||
|
||||
:type: type
|
||||
|
||||
.. py:attribute:: args
|
||||
|
||||
Tuple of positional argument injections.
|
||||
|
|
|
@ -11,6 +11,11 @@ Development version
|
|||
-------------------
|
||||
- No features.
|
||||
|
||||
1.14.6
|
||||
------
|
||||
- Add ``cls`` alias for ``provides`` attributes of ``Factory``,
|
||||
``DelegatedFactory``, ``Singleton`` and ``DelegatedSingleton`` providers.
|
||||
|
||||
1.14.5
|
||||
------
|
||||
- Fix typo in provider's error message.
|
||||
|
|
Loading…
Reference in New Issue
Block a user