1.14.6 release

This commit is contained in:
Roman Mogilatov 2016-02-27 00:07:32 +02:00
parent beb7bbd3d9
commit 9da9ef7153
3 changed files with 37 additions and 2 deletions

View File

@ -51,7 +51,7 @@ from .errors import UndefinedProviderError
from . import catalogs from . import catalogs
catalog = catalogs catalog = catalogs
VERSION = '1.14.5' VERSION = '1.14.6'
"""Version number that follows semantic versioning. """Version number that follows semantic versioning.
:type: str :type: str

View File

@ -401,6 +401,13 @@ class Factory(Callable):
:type: type | callable :type: type | callable
.. py:attribute:: cls
Class that provides object.
Alias for :py:attribute:`provides`.
:type: type
.. py:attribute:: args .. py:attribute:: args
Tuple of positional argument injections. Tuple of positional argument injections.
@ -428,7 +435,7 @@ class Factory(Callable):
provided_type = None provided_type = None
__slots__ = ('attributes', 'methods') __slots__ = ('cls', 'attributes', 'methods')
def __init__(self, provides, *args, **kwargs): def __init__(self, provides, *args, **kwargs):
"""Initializer. """Initializer.
@ -458,6 +465,8 @@ class Factory(Callable):
super(Factory, self).__init__(provides, *args, **kwargs) super(Factory, self).__init__(provides, *args, **kwargs)
self.cls = self.provides
@property @property
def injections(self): def injections(self):
"""Read-only tuple of all injections. """Read-only tuple of all injections.
@ -514,6 +523,13 @@ class DelegatedFactory(Factory):
:type: type | callable :type: type | callable
.. py:attribute:: cls
Class that provides object.
Alias for :py:attribute:`provides`.
:type: type
.. py:attribute:: args .. py:attribute:: args
Tuple of positional argument injections. Tuple of positional argument injections.
@ -582,6 +598,13 @@ class Singleton(Factory):
:type: type | callable :type: type | callable
.. py:attribute:: cls
Class that provides object.
Alias for :py:attribute:`provides`.
:type: type
.. py:attribute:: args .. py:attribute:: args
Tuple of positional argument injections. Tuple of positional argument injections.
@ -678,6 +701,13 @@ class DelegatedSingleton(Singleton):
:type: type | callable :type: type | callable
.. py:attribute:: cls
Class that provides object.
Alias for :py:attribute:`provides`.
:type: type
.. py:attribute:: args .. py:attribute:: args
Tuple of positional argument injections. Tuple of positional argument injections.

View File

@ -11,6 +11,11 @@ Development version
------------------- -------------------
- No features. - No features.
1.14.6
------
- Add ``cls`` alias for ``provides`` attributes of ``Factory``,
``DelegatedFactory``, ``Singleton`` and ``DelegatedSingleton`` providers.
1.14.5 1.14.5
------ ------
- Fix typo in provider's error message. - Fix typo in provider's error message.