Skip to content

Releases: simonw/asyncinject

0.6

14 Apr 01:22
a480af9
Compare
Choose a tag to compare
  • Non-async functions can now be registered in addition to async functions. #15
  • .register(fn, name=) method for registering a function with a custom name. #14
  • Registry.from_dict({"name1": fn1, "name2": fn2}) constructor method for registering multiple functions with custom names. #17

0.5

22 Apr 18:48
fd5ef10
Compare
Choose a tag to compare
0.5
  • registry.resolve() can now be used to resolve functions that have not been registered. #13

    async def one():
        return 1
    
    async def two():
        return 2
    
    registry = Registry(one, two)
    
    async def three(one, two):
        return one + two
    
    result = await registry.resolve(three)
    # result is now 3

0.4

18 Apr 22:47
3be0be2
Compare
Choose a tag to compare
0.4
  • Adrian Garcia Badaracco addressed an issue where concurrent functions were not executing optimally. The code now starts a function running as soon as all of its dependent functions have completed. #10
  • Dropped support for Python 3.6.

0.3

16 Apr 23:51
69bdc0b
Compare
Choose a tag to compare
0.3

Extensive, backwards-compatibility breaking redesign.

  • This library no longer uses subclasses. Instead, a Registry() object is created and async def functions are registered with that registry. The registry.resolve(fn) method is then used to execute functions with their dependencies. #8
  • Registry(timer=callable) can now be used to register a function to record the times taken to execute each function. This callable will be passed three arguments - the function name, the start time and the end time. #7
  • The parallel=True argument to the Registry() constructor can be switched to False to disable parallel execution - useful for running benchmarks to understand the performance benefit of running functions in parallel. #6

0.2

21 Dec 17:18
fca87bf
Compare
Choose a tag to compare
0.2
  • New _log mechanism for debug logging. #5

0.2a1

03 Dec 18:48
28fb38f
Compare
Choose a tag to compare
0.2a1 Pre-release
Pre-release
  • Now uses __init_subclass__ in place of a metaclass. #2

0.2a0

17 Nov 03:54
Compare
Choose a tag to compare
0.2a0 Pre-release
Pre-release
  • Provided parameters are now forwarded on to dependent methods.
  • Parameters with default values specified in the method signature are no longer treated as dependency injection parameters. #1

0.1a0

17 Nov 01:36
Compare
Choose a tag to compare
0.1a0 Pre-release
Pre-release
  • Initial alpha.