Skip to content

Releases: thiagokokada/i3pyblocks

2020.10.3

03 Oct 01:59
Compare
Choose a tag to compare
  • Breaking change: refactor i3pyblocks.blocks.base.ExecutorBlock. Now it is called i3pyblocks.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 and signal_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 in SyncBlock was renamed from run to start_sync, making SyncBlock API an effective counterpart of i3pyblocks.blocks.base.Block
  • Refactored i3pyblocks.blocks.pulse.PulseAudioBlock to use the new API from SyncBlock. This should fix some issues with freeze when clicking on it. Also it finally implements signal_handler_sync, so this block is updated when a signal is send to it
  • Add i3pyblocks.blocks.base.PollingSyncBlock. This is the synchronous counterpart of i3pyblocks.blocks.base.PollingBlock, and while it may seem unnecessary (we can use PollingBlock even on non-asyncio libraries like shown in i3pyblocks.blocks.ps blocks, for example), it have a good use case: when a library has functions that are (possible) slow, using PollingBlock would freeze the i3pyblocks, while with PollingSyncBlock i3pyblocks will continue to work even if the function call never returns. One example of this is in i3pyblocks.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 new PollingSyncBlock
  • Like said above, refactored i3pyblocks.blocks.x11.CaffeineBlock to use the new PollingSyncBlock. This fixed some issues in this block
  • Add sensor_regex and sensor_index params to i3pyblocks.blocks.ps.SensorsTemperatureBlock

2020.9.27

27 Sep 18:05
Compare
Choose a tag to compare
  • 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 to i3pyblocks.blocks.x11.CaffeineBlock, and also inverted format_on and format_off parameters. The reason for the rename is because the block also disables the screensaver when turned on, and the reason for the inversion of format_* 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's command parameter, and when used this will run the command without using a shell, making it more consistent with other blocks

2020.9.21

21 Sep 22:41
bd33e17
Compare
Choose a tag to compare
  • 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

20 Sep 01:57
Compare
Choose a tag to compare
  • 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

19 Sep 16:02
eefbb9f
Compare
Choose a tag to compare

Initial release.