Releases: thiagokokada/i3pyblocks
Releases · thiagokokada/i3pyblocks
2020.10.3
- Breaking change: refactor
i3pyblocks.blocks.base.ExecutorBlock
. Now it is calledi3pyblocks.blocks.base.SyncBlock
, and it haves a much better API to create blocks that depend on non-async libraries. It has two new methods,click_handler_sync
andsignal_handler_sync
, that are normal functions and works as expected (running inside a executor so they don't block the main asyncio loop). Also, the main method inSyncBlock
was renamed fromrun
tostart_sync
, makingSyncBlock
API an effective counterpart ofi3pyblocks.blocks.base.Block
- Refactored
i3pyblocks.blocks.pulse.PulseAudioBlock
to use the new API fromSyncBlock
. This should fix some issues with freeze when clicking on it. Also it finally implementssignal_handler_sync
, so this block is updated when a signal is send to it - Add
i3pyblocks.blocks.base.PollingSyncBlock
. This is the synchronous counterpart ofi3pyblocks.blocks.base.PollingBlock
, and while it may seem unnecessary (we can usePollingBlock
even on non-asyncio libraries like shown ini3pyblocks.blocks.ps
blocks, for example), it have a good use case: when a library has functions that are (possible) slow, usingPollingBlock
would freeze the i3pyblocks, while withPollingSyncBlock
i3pyblocks will continue to work even if the function call never returns. One example of this is ini3pyblocks.blocks.x11.CaffeineBlock
, since X11 calls can takes multiple seconds to run over a network or when X server is busy. This block used to call its blocking functions inside a executor, but it is implemented much more easily with the newPollingSyncBlock
- Like said above, refactored
i3pyblocks.blocks.x11.CaffeineBlock
to use the newPollingSyncBlock
. This fixed some issues in this block - Add
sensor_regex
andsensor_index
params toi3pyblocks.blocks.ps.SensorsTemperatureBlock
2020.9.27
- Add
i3pyblocks.blocks.dbus.MediaPlayerBlock
. This is in a very early state, and most things doesn't work yet (for example, it doesn't disappear when the player quits, also it only works for one player at a time). Expect this to change in the future, but for now this serves as a preview - Add
i3pyblocks.blocks.base.Block.exception
method, making it easier to handle exceptions in blocks - Improve
i3pyblocks.blocks.ps.NetworkSpeedBlock
measurement, now it should be more accurate - Breaking change: rename
i3pyblocks.blocks.x11.DPMSBlock
toi3pyblocks.blocks.x11.CaffeineBlock
, and also invertedformat_on
andformat_off
parameters. The reason for the rename is because the block also disables the screensaver when turned on, and the reason for the inversion offormat_*
parameters is to match the behavior of Caffeine extension - Add
pyproject.toml
, making this project compatible with PEP-517/PEP-518. This makes our releases build in isolated environments - Allow tuple in
i3pyblocks.blocks.pulse.PulseAudioBlock
'scommand
parameter, and when used this will run the command without using a shell, making it more consistent with other blocks
2020.9.21
- Refactor
i3pyblocks.blocks.pulse.PulseAudioBlock
, should fix some issues - Make block tests stricter by using
autospec=True
in mocks. This should break the tests when there is API breakage in a dependency, contrary to before that everything was mocked, including function/method signatures
2020.9.20
- Fix development versions to be PEP440 compliant
- Refactor logging to be on its own namespace (
i3pyblocks.logger
) - Add logging to
PulseAudioBlock
- Update documentation and PyPI metadata
2020.9.19
Initial release.