mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-01-31 03:36:41 +03:00
Merge branch 'release/4.1.8' into master
This commit is contained in:
commit
e615b9c48c
|
@ -7,6 +7,10 @@ that were made in every particular version.
|
||||||
From version 0.7.6 *Dependency Injector* framework strictly
|
From version 0.7.6 *Dependency Injector* framework strictly
|
||||||
follows `Semantic versioning`_
|
follows `Semantic versioning`_
|
||||||
|
|
||||||
|
4.1.8
|
||||||
|
-----
|
||||||
|
- Update asyncio daemon, single- and multi-container examples to use ``Resource`` provider.
|
||||||
|
|
||||||
4.1.7
|
4.1.7
|
||||||
-----
|
-----
|
||||||
- Add CI job to build and push documentation to S3 bucket.
|
- Add CI job to build and push documentation to S3 bucket.
|
||||||
|
|
|
@ -226,7 +226,7 @@ Put next lines into the ``containers.py`` file:
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration()
|
||||||
|
|
||||||
configure_logging = providers.Callable(
|
logging = providers.Resource(
|
||||||
logging.basicConfig,
|
logging.basicConfig,
|
||||||
stream=sys.stdout,
|
stream=sys.stdout,
|
||||||
level=config.log.level,
|
level=config.log.level,
|
||||||
|
@ -270,7 +270,7 @@ Put next lines into the ``__main__.py`` file:
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
container = Container()
|
container = Container()
|
||||||
container.config.from_yaml('config.yml')
|
container.config.from_yaml('config.yml')
|
||||||
container.configure_logging()
|
container.init_resources()
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ Edit ``containers.py``:
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration()
|
||||||
|
|
||||||
configure_logging = providers.Callable(
|
logging = providers.Resource(
|
||||||
logging.basicConfig,
|
logging.basicConfig,
|
||||||
stream=sys.stdout,
|
stream=sys.stdout,
|
||||||
level=config.log.level,
|
level=config.log.level,
|
||||||
|
@ -461,7 +461,7 @@ Edit ``__main__.py``:
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
container = Container()
|
container = Container()
|
||||||
container.config.from_yaml('config.yml')
|
container.config.from_yaml('config.yml')
|
||||||
container.configure_logging()
|
container.init_resources()
|
||||||
container.wire(modules=[sys.modules[__name__]])
|
container.wire(modules=[sys.modules[__name__]])
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
@ -562,7 +562,7 @@ Edit ``containers.py``:
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration()
|
||||||
|
|
||||||
configure_logging = providers.Callable(
|
logging = providers.Resource(
|
||||||
logging.basicConfig,
|
logging.basicConfig,
|
||||||
stream=sys.stdout,
|
stream=sys.stdout,
|
||||||
level=config.log.level,
|
level=config.log.level,
|
||||||
|
@ -667,7 +667,7 @@ Edit ``containers.py``:
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration()
|
||||||
|
|
||||||
configure_logging = providers.Callable(
|
logging = providers.Resource(
|
||||||
logging.basicConfig,
|
logging.basicConfig,
|
||||||
stream=sys.stdout,
|
stream=sys.stdout,
|
||||||
level=config.log.level,
|
level=config.log.level,
|
||||||
|
@ -766,7 +766,7 @@ Edit ``containers.py``:
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration()
|
||||||
|
|
||||||
configure_logging = providers.Callable(
|
logging = providers.Resource(
|
||||||
logging.basicConfig,
|
logging.basicConfig,
|
||||||
stream=sys.stdout,
|
stream=sys.stdout,
|
||||||
level=config.log.level,
|
level=config.log.level,
|
||||||
|
|
|
@ -24,7 +24,7 @@ def main(
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
application = Application()
|
application = Application()
|
||||||
application.config.from_yaml('config.yml')
|
application.config.from_yaml('config.yml')
|
||||||
application.core.configure_logging()
|
application.core.init_resources()
|
||||||
application.wire(modules=[sys.modules[__name__]])
|
application.wire(modules=[sys.modules[__name__]])
|
||||||
|
|
||||||
main(*sys.argv[1:])
|
main(*sys.argv[1:])
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Core(containers.DeclarativeContainer):
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration()
|
||||||
|
|
||||||
configure_logging = providers.Callable(
|
logging = providers.Resource(
|
||||||
logging.config.dictConfig,
|
logging.config.dictConfig,
|
||||||
config=config.logging,
|
config=config.logging,
|
||||||
)
|
)
|
||||||
|
|
|
@ -23,7 +23,7 @@ def main(
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
container = Container()
|
container = Container()
|
||||||
container.configure_logging()
|
container.init_resources()
|
||||||
container.config.from_ini('config.ini')
|
container.config.from_ini('config.ini')
|
||||||
container.wire(modules=[sys.modules[__name__]])
|
container.wire(modules=[sys.modules[__name__]])
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Container(containers.DeclarativeContainer):
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration()
|
||||||
|
|
||||||
configure_logging = providers.Callable(
|
logging = providers.Resource(
|
||||||
logging.config.fileConfig,
|
logging.config.fileConfig,
|
||||||
fname='logging.ini',
|
fname='logging.ini',
|
||||||
)
|
)
|
||||||
|
|
|
@ -15,7 +15,7 @@ def main(dispatcher: Dispatcher = Provide[Container.dispatcher]) -> None:
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
container = Container()
|
container = Container()
|
||||||
container.config.from_yaml('config.yml')
|
container.config.from_yaml('config.yml')
|
||||||
container.configure_logging()
|
container.init_resources()
|
||||||
container.wire(modules=[sys.modules[__name__]])
|
container.wire(modules=[sys.modules[__name__]])
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -12,7 +12,7 @@ class Container(containers.DeclarativeContainer):
|
||||||
|
|
||||||
config = providers.Configuration()
|
config = providers.Configuration()
|
||||||
|
|
||||||
configure_logging = providers.Callable(
|
logging = providers.Resource(
|
||||||
logging.basicConfig,
|
logging.basicConfig,
|
||||||
stream=sys.stdout,
|
stream=sys.stdout,
|
||||||
level=config.log.level,
|
level=config.log.level,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Top-level package."""
|
"""Top-level package."""
|
||||||
|
|
||||||
__version__ = '4.1.7'
|
__version__ = '4.1.8'
|
||||||
"""Version number.
|
"""Version number.
|
||||||
|
|
||||||
:type: str
|
:type: str
|
||||||
|
|
Loading…
Reference in New Issue
Block a user