Commit Graph

341 Commits

Author SHA1 Message Date
Roman Mogylatov
c9242e51f6 Refactor Dependency provider to use async mode api 2020-12-30 13:31:06 -05:00
Roman Mogylatov
8bf641dd36 Refactor Provider.__call__() to use async mode api 2020-12-30 13:31:01 -05:00
Roman Mogylatov
0a30efec5a Add typing stubs & tests for async mode API 2020-12-30 13:31:01 -05:00
Roman Mogylatov
e09b93c21b Add async mode API + tests 2020-12-30 13:31:01 -05:00
Roman Mogylatov
fb296788e3 Refactor abstract* providers __call__() 2020-12-30 13:30:58 -05:00
Roman Mogylatov
a89602e690 Add typing stubs for async resource 2020-12-30 13:30:58 -05:00
Roman Mogylatov
541641d36c Add overload for Factory typing 2020-12-30 13:30:58 -05:00
Roman Mogylatov
b446dab559 Add async mode for the provider 2020-12-30 13:30:58 -05:00
Roman Mogylatov
32c4c6e29a Implement async mode for Dependency provider 2020-12-30 13:30:54 -05:00
Roman Mogylatov
0c42ff9242 Update .provided + fix resource concurent initialization issue 2020-12-30 13:30:51 -05:00
Roman Mogylatov
90a6cb3c6d Implement injections in thread-local and thread-safe singleton providers 2020-12-30 13:30:50 -05:00
Roman Mogylatov
6020c6caf4 Add singleton implementation + tests for all singleton types 2020-12-30 13:30:48 -05:00
Roman Mogylatov
f07f3e4943 Implement attribute injections and add tests 2020-12-30 13:30:46 -05:00
Roman Mogylatov
53a5d07b3a Implement positional injections, add tests and make refactoring 2020-12-30 13:30:46 -05:00
Roman Mogylatov
af51779477 Refactor kwargs injections 2020-12-30 13:30:46 -05:00
Roman Mogylatov
aaacc07916 Turm asyncio import to conditional for safer Py2 usage 2020-12-30 13:30:45 -05:00
Roman Mogylatov
0015e4e50a Fix isawaitable error 2020-12-30 13:30:45 -05:00
Roman Mogylatov
caee7f6b41 Add first dirty async injections implementation 2020-12-30 13:30:45 -05:00
Roman Mogylatov
c51eb52053 Fix init async resources in container on Python 2 2020-12-30 13:30:44 -05:00
Roman Mogylatov
45cd887a37 Implement async resources initialization in container 2020-12-30 13:30:44 -05:00
Roman Mogylatov
3ab2b1f573 Rework async resources callbacks to .add_done_callback() style (fixes pypy3 issue) 2020-12-30 13:30:44 -05:00
Roman Mogylatov
31b03243a4 Add tests for async resources 2020-12-30 13:30:42 -05:00
Roman Mogylatov
c4825956f7 Fix tests 2020-12-30 13:30:41 -05:00
Roman Mogylatov
d50fbbd83b Add resource base class for async resources 2020-12-30 13:30:40 -05:00
Roman Mogylatov
fc2633faa3 Update resource provider typing stub for stutdown 2020-12-30 13:30:40 -05:00
Roman Mogylatov
4db931d38c Add support of async functions and async generators for resources 2020-12-30 13:30:40 -05:00
Roman Mogylatov
7ae8041f0a Add support of async injections into wiring 2020-12-30 13:30:39 -05:00
Fotis Koutoupas
aad84476d0
Fix flask ext warning message (#345) 2020-12-30 13:19:42 -05:00
Roman Mogylatov
468451d4c0 Bump version to 4.5.4 2020-12-10 18:28:29 -05:00
Roman Mogylatov
730baf87d8 Bump version to 4.5.3 2020-12-05 22:14:35 -05:00
Roman Mogylatov
b49f158583 Fix bug #331 2020-12-05 21:40:51 -05:00
Roman Mogylatov
de092023b8 Bump version to 4.5.2 2020-12-04 20:18:39 -05:00
Roman Mogylatov
afa39b148e Fix issue 330: FastAPI Depends directive does not work after patching with @inject 2020-12-04 20:11:21 -05:00
Roman Mogylatov
4ff1a6eb25 Bump version to 4.5.1 2020-11-20 18:16:29 -05:00
Roman Mogylatov
57faa5f93f Bump version to 4.5.0 2020-11-20 18:10:04 -05:00
Roman Mogylatov
034e4814da Add support of non-string keys for Dict provider 2020-11-20 17:30:42 -05:00
Roman Mogylatov
d581a28b6e Bump version to 4.4.1 2020-11-17 23:59:33 -05:00
Roman Mogylatov
d37ae8e7db Improve FastAPI integration 2020-11-17 23:44:32 -05:00
Roman Mogylatov
a2b09c57dc Bump version to 4.4.0 2020-11-15 18:19:34 -05:00
Roman Mogylatov
ae3024588c
Wiring reengineering (#324)
* Bump version to 4.3.9: FastAPI example

* Reengineer wiring

* Add @inject decorator

* Add .workspace dir to gitignore

* Add generic typing for @inject

* Add type cast for @inject

* Update movie lister example

* Update cli application tutorial

* Update demo example

* Update wiring docs and examples

* Update aiohttp example and tutorial

* Update multiple containers example

* Update single container example

* Update decoupled packages example

* Update django example

* Update asyncio daemon example and tutorial

* Update FastAPI example

* Update flask example and tutorial

* Update sanic example

* Add wiring registry

* Add new line to .gitignore

* Add @inject to the test samples

* Fix flake8 errors
2020-11-15 16:06:42 -05:00
Roman Mogylatov
cdce5247c8 Bump version to 4.3.8 2020-11-12 16:31:20 -05:00
Roman Mogylatov
97c33442e0 Add wiring hotfix for fastapi 2020-11-12 15:54:49 -05:00
Roman Mogylatov
ccf6ccad54 Bump version to 4.3.7 2020-11-10 17:02:42 -05:00
Roman Mogylatov
985be71a04 Regenerate C sources after PR#322 2020-11-10 17:02:21 -05:00
Dmitry Rassoshenko
fb0d99c1c9
Fix race in ThreadSafeSingleton (#322) 2020-11-10 14:57:10 -05:00
Roman Mogylatov
3ff5c8ce82 Bump version to 4.3.6 2020-11-05 12:37:25 -05:00
Roman Mogylatov
6b93c2e412 Bump version to 4.3.5 2020-11-05 12:23:47 -05:00
Roman Mogylatov
3c71ba4b2a Fix wiring multiple imports, issue #320 2020-11-05 12:20:09 -05:00
Roman Mogylatov
f3ec74a31f Bump version to 4.3.4 2020-11-05 10:20:23 -05:00
Roman Mogylatov
18ef566aae Fix issue #319 resulting in configuration.reset_override() not working properly 2020-11-05 10:16:39 -05:00