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.md
and classifiers inpyproject.toml
- refactor: move the common code for manipulating the signature of the wrapped functions in
WithStore
andAutorun
to a utility function - feat: support
with_state
to be applied to methods of classes, not just functions - feat: support
view
to be applied to methods of classes, not just functions, it works forautorun
too, but only when it is being called directly like a view - refactor: rename
_id
field of combine reducer state tocombine_reducers_id
- feat: allow customizing the async task creator of the
Autorun
instance by overriding its_create_task
method
v0.23.0
PyPI package: https://pypi.org/project/python-redux/0.23.0
Changes:
- refactor: remove
WithState
as it wasn't doing anything beyondfunctools.wraps
- refactor: autorun doesn't inform subscribers when the output value is not changed
- refactor: add
autorun_class
andside_effect_runner_class
to improve extensibility - refactor: setting
auto_await
for async autorun functions will make them returnNone
, setting it toFalse
will make them return the awaitable, the awaitable can beawait
ed 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_callback
of 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__
toAutorun
andWithStore
instances 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__
toWithStore
instances 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_event
in the store event loop whenFinishEvent
is dispatched, previously it used to be a normalsubscribe_event
, events registered insubscribe_event
run inSideEffectRunnerThread
and it runs them with thetask_runner
, and there is no guaranteetask_runner
runs tasks afterFinishEvent
is dispatched
v0.21.1
PyPI package: https://pypi.org/project/python-redux/0.21.1
Changes:
- refactor: add
WithState
class to be the return value of thestore.with_state
so 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
WithState
class to be the return value of thestore.with_state
so 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
ruff
to0.10.0
and fix linting issues, makestore.subscribe
private
v0.20.1
PyPI package: https://pypi.org/project/python-redux/0.20.1
Changes:
- fix: avoid using
asdict
in 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
memoization
option 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.