Releases: sassanh/python-redux
Releases · sassanh/python-redux
v0.24.0
PyPI package: https://pypi.org/project/python-redux/0.24.0
Changes:
- chore: add badges in
README.mdand classifiers inpyproject.toml - refactor: move the common code for manipulating the signature of the wrapped functions in
WithStoreandAutorunto a utility function - feat: support
with_stateto be applied to methods of classes, not just functions - feat: support
viewto be applied to methods of classes, not just functions, it works forautoruntoo, but only when it is being called directly like a view - refactor: rename
_idfield of combine reducer state tocombine_reducers_id - feat: allow customizing the async task creator of the
Autoruninstance by overriding its_create_taskmethod
v0.23.0
PyPI package: https://pypi.org/project/python-redux/0.23.0
Changes:
- refactor: remove
WithStateas it wasn't doing anything beyondfunctools.wraps - refactor: autorun doesn't inform subscribers when the output value is not changed
- refactor: add
autorun_classandside_effect_runner_classto improve extensibility - refactor: setting
auto_awaitfor async autorun functions will make them returnNone, setting it toFalsewill make them return the awaitable, the awaitable can beawaited multiple times, as it cashes the result if comparator is not changed, it can't be set for sync functions - refactor: housekeeping, remove unused callback of task creators, remove unused
_task_callbackof autoruns, clean up type hints, etc
v0.22.2
PyPI package: https://pypi.org/project/python-redux/0.22.2
Changes:
- fix: add
__qualname__,__annotations__,__module__,__defaults__and__kwdefaults__toAutorunandWithStoreinstances so that they play nice when passed as a function to something assuming they are normal function having these properties.
v0.22.1
PyPI package: https://pypi.org/project/python-redux/0.22.1
Changes:
- fix: add
__name__toWithStoreinstances so that they play nice when passed as a function to something assuming they are functions and have a__name__attribute - test: add/modify tests to bring back coverage to 100%
v0.22.0
PyPI package: https://pypi.org/project/python-redux/0.22.0
Changes:
- test: make sure pytest exits completely after running async tests
- refactor: in
_wait_for_store_to_finish, instead of waiting withasyncio.sleep, run the store event loop when conditions are not satisfied - refactor: directly run
_handle_finish_eventin the store event loop whenFinishEventis dispatched, previously it used to be a normalsubscribe_event, events registered insubscribe_eventrun inSideEffectRunnerThreadand it runs them with thetask_runner, and there is no guaranteetask_runnerruns tasks afterFinishEventis dispatched
v0.21.1
PyPI package: https://pypi.org/project/python-redux/0.21.1
Changes:
- refactor: add
WithStateclass to be the return value of thestore.with_stateso that it can report correct signature of its__call__method - chore(docs): add documentation strings for elements defined in
autorun.py
v0.21.0
PyPI package: https://pypi.org/project/python-redux/0.21.0
Changes:
- refactor: add
WithStateclass to be the return value of thestore.with_stateso that it can report correct signature of its__call__method - chore(docs): add documentation strings for elements defined in
autorun.py
v0.20.2
PyPI package: https://pypi.org/project/python-redux/0.20.2
Changes:
- chore(lint): update
ruffto0.10.0and fix linting issues, makestore.subscribeprivate
v0.20.1
PyPI package: https://pypi.org/project/python-redux/0.20.1
Changes:
- fix: avoid using
asdictin combine-reducers's reducer as it can get too costly for large dataclasses and may even run into errors
v0.20.0
PyPI package: https://pypi.org/project/python-redux/0.20.0
Changes:
- feat: add
memoizationoption toautorun, default isTrue, compatible with old behavior, if set toFalse, calling the function explicitly will always run it regardless of the selector's value - feat: add
with_selector, as a decorator to run functions with the result of a selector.