Changelog#
wakepy 0.10.2#
ποΈ 2025-04-21
π Bug fixes#
Fix keep.running mode on KDE Plasma 6.x.x, when
plasmashell --versionoutput contained extra lines, such as βQThreadStorage: entry 3 destroyed before end of thread 0x61b4ee73d540β (#417). Thanks to @materemias for #415.
π· Maintenance#
π Documentation#
wakepy 0.10.1#
ποΈ 2024-09-20
π Bug fixes#
Fix the wakepy logo/text printed to CLI (#400)
wakepy 0.10.0#
ποΈ 2024-09-20
π Highlights#
Wakepy has been available in conda-forge since 0.9.1. Now itβs also documented.
Warn instead of raise Exception by default if activating a Mode fails.
β¨ Features#
Change default
on_failaction to be βwarnβ instead of βerrorβ (inkeep.runningandkeep.presentingmodes). (#388)Add support for BSD and other non-Linux Unix-like FOSS desktop systems. All systems running a supported Desktop Environment (currently: KDE, Gnome + other freedesktop compliant DEs) should be supported. (#379, #385)
When running on an unknown platform, do not fail any Methods in the platform check phase anymore, but try to use each Method. This means for example that any system running GNOME that is not Linux (or BSD) could still use wakepy with the org.gnome.SessionManager (#379)
π¨ CLI arguments: Change
-k, --keep-runningto be-r, --keep-runningand-p, --presentationto be-p, --keep-presenting; Be more consistent with the naming of the Modes. The old alternatives are deprecated and will be removed in a future release. (#356)π¨ Renamed
PlatformNametoPlatformTypeand added new types:ANY, which means βany platformβ,BSD, meaning βany BSD systemβ in the future, but currently just FreeBSD / GhostBSD, andUNIX_LIKE_FOSS, which means βUnix-like desktop environment, but FOSSβ. Includes: Linux and BSD. Excludes: Android (mobile), MacOS (non-FOSS), ChromeOS (non-FOSS). Only affects you if you have created custom Method subclasses. (#379)Improve warnings and errors if platform is not supported (#383)
π· Maintenance#
π Documentation#
wakepy 0.9.1#
ποΈ 2024-06-04
π Bug fixes#
The SetThreadExecutionState Method may now have multiple modes (same or different) activated within the same python thread without them interfering with each other on activation or deactivation, as wakepy creates a separate worker thread for the single purpose of setting and keeping the thread execution flag each time you activate a mode with the
SetThreadExecutionStatewakepy.Method. (#342)Importing wakepy (0.8.0 and 0.9.0) messed up logging. In particular, the logging level was changed to WARNING due to direct call to
logging.debug()instead oflogger.debug(). (#344). Thanks to @reidswanson for reporting it.π· Fixed running the dev command
inv teston Windows (#339, #341)
wakepy 0.9.0.post1#
ποΈ 2024-06-01
π Documentation#
Update docs and README after 0.8.0 & 0.9.0 releases (#331)
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)
π 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#
Modes support on-fail actions (βerrorβ, βwarnβ, βpassβ or a callable). (#182)
It is now possible to select the used wakepy.Methods with
methodsandomitand to change the priority order of methods withmethods_priority. (#75)Added org.gnome.SessionManager method which adds support for keep.running mode for users with Gnome Desktop Environment. (#51, #138, #278, #282)
ActivationResultobjects (#57, #258, #270) inMode.activation_resultwhich give more detailed information about the activation process.Possibility to exit from a mode context manager early with
ModeExit(#72)Itβs now possible to check the active and used method from the Mode instance using the
Mode.active_methodandMode.used_method(#268)Added possibility to use any dbus python implementation through the
DBusAdapter. By default uses jeepney throughJeepneyDBusAdapter(See: #45)
π¨ Backwards incompatible#
Removed
set_keepawakeandunset_keepawake functionsand thekeepawakecontext manager. These were deprecated in 0.7.0 and are replaced with the new api:keep.running()andkeep.presenting()context managers. (#85)Renamed the CLI argument
-s, --keep-screen-awaketo-p, --presentation. The old ones were deprecated in 0.7.0. (#179)If Mode activation fails, raise
ActivationErrorby default. Previously there was no βon failβ action, but users needed to check theresult.successto 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#
π 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-fixin 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 = trueandwarn_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#
wakepy 0.7.1#
ποΈ 2023-06-11
π Bug fixes#
keep.runningandkeep.presentingreturn an objectmwithsuccessvalue ofTrue.
wakepy 0.7.0#
ποΈ 2023-06-11
β¨ Features#
New API:
keep.running()andkeep.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 withm.successif 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.runningorkeep.presentingmode failed.
β οΈ Deprecations#
Old Python API: The
keepawake(),set_keepawakeandunset_keepwake. These will be removed in a future version of wakepy. Usekeep.running()orkeep.presenting(), instead.The
-s, --keep-screen-awakeoption of thewakepyCLI command. Use-p, --presentationoption, 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_UIDenvironment 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
wakepyexecutable for CLI is installed whenwakepyis installed withpip.
wakepy 0.4.4#
ποΈ 2021-08-30
π Bug fixes#
Keeping screen awake on Mac (#13). Fixed in PR #15. Thanks to mikeckennedy.
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#
wakepy 0.4.1#
ποΈ 2021-06-15
π Bug fixes#
Raising
NotImplementedErrorif trying to use on Linux withoutsystemctl. Previous implementation had a bug. (#8)
wakepy 0.4.0#
ποΈ 2021-06-09
β¨ Features#
keepawakecontext manager. (#6). Thanks to HoustonFortney.
wakepy 0.3.2#
ποΈ 2021-06-06
π Bug fixes#
Raising
NotImplementedErrorif trying to use on Linux withoutsystemctl. (#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.