adriangb / di

Pythonic dependency injection
https://www.adriangb.com/di/
MIT License
303 stars 13 forks source link

remove sync_to_thread option #79

Closed adriangb closed 2 years ago

adriangb commented 2 years ago

managing threads is complicated and problematic, unless we figure out a really clean transperent way to do this it's probably best for users to decorarte their functions or otherwise take control of thread pools & co

codecov-commenter commented 2 years ago

Codecov Report

Merging #79 (5c9c670) into main (30cea33) will increase coverage by 0.19%. The diff coverage is 97.39%.

:exclamation: Current head 5c9c670 differs from pull request most recent head 152abdf. Consider uploading reports for the commit 152abdf to get more accurate results

@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
+ Coverage   97.10%   97.29%   +0.19%     
==========================================
  Files          71       70       -1     
  Lines        2178     2222      +44     
  Branches      406      415       +9     
==========================================
+ Hits         2115     2162      +47     
+ Misses         53       44       -9     
- Partials       10       16       +6     
Impacted Files Coverage Δ
tests/test_task.py 100.00% <ø> (ø)
tests/test_concurrency.py 94.73% <94.73%> (ø)
di/_utils/concurrency.py 100.00% <100.00%> (ø)
di/executors/_async.py 91.66% <100.00%> (-1.44%) :arrow_down:
tests/test_execute.py 93.71% <100.00%> (-1.03%) :arrow_down:
di/api/executor.py 90.47% <0.00%> (-9.53%) :arrow_down:
di/api/dependencies.py 92.00% <0.00%> (-8.00%) :arrow_down:
docs_src/bind_as_a_dep.py 93.10% <0.00%> (-6.90%) :arrow_down:
di/_utils/inspect.py 94.59% <0.00%> (-5.41%) :arrow_down:
di/container/_solving.py 97.82% <0.00%> (-2.18%) :arrow_down:
... and 4 more