Changelog#

wakepy 0.9.0#

πŸ—“οΈ 2024-05-31

✨ Features#

  • Support keep.running mode in KDE Plasma 5.12.90 and newer through the org.freedesktop.PowerManagement method. It may also be used on other DEs which implement this older freedesktop.org D-Bus interface (but not Xcfe). (#324)

  • Cooler CLI spinner (#309, #323)

πŸ“– Documentation#

  • Document that the org.freedesktop.ScreenSaver method for keep.presenting mode also supports KDE Plasma. (#324)

  • Update dev docs (#308)

  • Mention that shell should be restarted for wakepy CLI tool (#321)

  • Fix: Supported Platforms table background does not support dark mode (#316)

wakepy 0.8.0#

πŸ—“οΈ 2024-05-26

πŸ† Highlights#

  • This is a basically a complete rewrite of wakepy. It adds support for keep.running mode on Gnome, on-fail action, possibility to control the used methods and their priority, more information about the used methods and the activation process and possibility to exit the mode early. In addition, testing and CI pipelines were updated to ease maintenance.

✨ Features#

🚨 Backwards incompatible#

  • Removed set_keepawake and unset_keepawake functions and the keepawake context manager. These were deprecated in 0.7.0 and are replaced with the new api: keep.running() and keep.presenting() context managers. (#85)

  • Renamed the CLI argument -s, --keep-screen-awake to -p, --presentation. The old ones were deprecated in 0.7.0. (#179)

  • If Mode activation fails, raise ActivationError by default. Previously there was no β€œon fail” action, but users needed to check the result.success to make sure the activation was successful.

  • The org.freedesktop.ScreenSaver based method is not used on keep.running mode. Systems supporting org.freedesktop.ScreenSaver which are not running Gnome will have no keep.running method until it gets implemented. By default wakepy will raise a wakepy.ActivationError if keep.running is used on such system. Either use keep.preseting mode, or wait or provide a PR.

  • The WAKEPY_FAKE_SUCCESS check is done before trying any wakepy Methods (previously, it was used when all the tried methods have failed)

🐞 Bug fixes#

  • The org.freedesktop.ScreenSaver based method is only used in keep.presenting mode. Previously, it was used on keep.running mode on Linux. (#46, #136)

  • Still going to sleep - running Fedora 36 (#18)

πŸ“– Documentation#

πŸ‘· Maintenance#

  • Made the CI tests mandatory for every PR (previously manual) (#191)

  • 100% test coverage + use branch coverage instead of line coverage + enforce 100% coverage (#221, #222)

  • Run black+isort+ruff also on tests (#224)

  • Run mypy also on tests + fix the new mypy issues (#227)

  • Add tests for Python 3.12 and 3.13. Now test all supported versions of python on linux, and oldest and newest supported versions on MacOS and Windows. (#160, #236, #273)

  • Pin docs and tests dependencies (#220)

  • Build docs in CI tests to prevent breaking docs (#211)

  • Run tox and pipeline tests against build wheel instead of the source tree (#231, #236)

  • Build both, sdist (tar.gz) and wheel (.whl). 0.7.x had just wheels and <=0.6.x just dist. Start using setuptools-scm and switch from flit to setuptools (#235).

  • Add invoke commands (#223)

  • Add automatic publishing GitHub workflow (#238)

  • Limit docstrings and comments to 79 characters (#207)

  • WakepyFakeSuccess Method (#152) instead of using some custom logic with WAKEPY_FAKE_SUCCESS.

  • Split package extras: dev, doc, test and check (was: doc, dev) (#213) and start using requirements-*.txt instead of misusing extras (#228)

  • Ruff: Update from 0.0.270 to 0.3.2 (#206), use --no-fix in tox (#208), Stricter ruff rules: W291 (#209)

  • Black: Update from 23.3.0 to 24.2.0 and reformat (#217)

  • Isort: Update from 5.12.0 to 5.13.2 (#218)

  • Mypy: Update from 1.3.0 to 1.9.0 (#219), stricter settings; disallow_untyped_defs = true (#242), disallow_any_unimported = true and warn_unused_ignores = true (#243)

  • Make wakepy statically typed: Add py.typed (PEP 561) to advertize that wakepy is a fully typed package (#232), add mypy checks on 3.7-3.12 (#265)

  • Other tox improvements (#233)

  • Convert from flat layout to src layout (#234)

  • Cleanup .gitignore (#237)

wakepy 0.7.2#

πŸ—“οΈ 2023-09-27

🐞 Bug fixes#

  • The CLI API on python 3.7 and python 3.8. Thanks to Aymane11 for PR #50

wakepy 0.7.1#

πŸ—“οΈ 2023-06-11

🐞 Bug fixes#

  • keep.running and keep.presenting return an object m with success value of True.

wakepy 0.7.0#

πŸ—“οΈ 2023-06-11

✨ Features#

  • New API: keep.running() and keep.presenting() context managers. These are currently simple wrappers of the old methods but the internals will be re-written in a future version.

  • The context managers now return the result of the action, m. Users may check with m.success if changing the mode was successful.

  • Possibility to fake successful change of mode with WAKEPY_FAKE_SUCCESS (for CI / tests).

🐞 Bug fixes#

  • No exceptions anymore on import-time. All exceptions should be handled now gracefully, and user is informed if switching to a keep.running or keep.presenting mode failed.

⚠️ Deprecations#

  • Old Python API: The keepawake(), set_keepawake and unset_keepwake. These will be removed in a future version of wakepy. Use keep.running()or keep.presenting(), instead.

  • The -s, --keep-screen-awake option of the wakepy CLI command. Use -p, --presentation option, instead.

πŸ“– Documentation#

  • Created Readthedocs pages

πŸ‘· Maintenance#

  • Added manual CI tests

  • Start using tox

  • Enforce pass in isort, black, ruff and mypy in tests

wakepy 0.6.0#

πŸ—“οΈ 2023-02-27

✨ Features#

  • Support for using wakepy without sudo on linux! There are now D-bus solutions (1) using jeepney and (2) using dbus-python (libdbus). Thanks to Stehlampe2020 for the dbus-python based solution (PR #22) and NicoWeio for raising Issue #17.

  • Linux+systemd approach has sudo check. The program won’t start without SUDO_UID environment variable set.

wakepy 0.5.0#

πŸ—“οΈ 2021-12-15

✨ Features#

  • wakepy ascii art text, version and options will be printed in console if wakepy launched with the CLI

  • The wakepy executable for CLI is installed when wakepy is installed with pip.

wakepy 0.4.4#

πŸ—“οΈ 2021-08-30

🐞 Bug fixes#

wakepy 0.4.3#

πŸ—“οΈ 2021-08-28

🐞 Bug fixes#

  • Raising TypeError: a bytes-like object is required, not 'str' if trying to use on MacOS (Python 3.9) (#11). Thanks to mikeckennedy for PR #12.

wakepy 0.4.2#

πŸ—“οΈ 2021-08-10

🐞 Bug fixes#

  • Raising FileNotFoundError if trying to use on MacOS. Previous implementation had a bug (#9). Thanks to matacoder for PR #10.

wakepy 0.4.1#

πŸ—“οΈ 2021-06-15

🐞 Bug fixes#

  • Raising NotImplementedError if trying to use on Linux without systemctl. Previous implementation had a bug. (#8)

wakepy 0.4.0#

πŸ—“οΈ 2021-06-09

✨ Features#

wakepy 0.3.2#

πŸ—“οΈ 2021-06-06

🐞 Bug fixes#

  • Raising NotImplementedError if trying to use on Linux without systemctl. (#3)

wakepy 0.3.1#

πŸ—“οΈ 2021-06-02

🐞 Bug fixes#

  • The package in PyPI did not have any content

wakepy 0.3.0#

πŸ—“οΈ 2021-05-05

✨ Features#

  • Linux & OSX support. Thanks for rileyyy.