ποΈ unreleased
- Disallow TODO comments (#410)
ποΈ 2024-09-20
- Fix the wakepy logo/text printed to CLI (#400)
ποΈ 2024-09-20
- 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.
- Change default
on_fail
action to be "warn" instead of "error" (in {func}keep.running <wakepy.keep.running>
and {func}keep.presenting <wakepy.keep.presenting>
modes). (#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)
- Add support for PyPy (#393, #396)
- 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-running
to be-r, --keep-running
and-p, --presentation
to 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
PlatformName
toPlatformType
and 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)
- Fixed GitHub Release pipeline: Creates releases only from tags. Added automatic titles. Cannot accidentally publish with "main" tag. (#328, #346)
- Fixed: Tests failing on Fedora 40 (#381)
- Update various development time dependencies (#389)
- Update Installing instructions. Wakepy is available in conda-forge starting from version 0.9.1. (#390 + Thanks to @thewchan for wakepy-feedstock)
- Add Roadmap and improve the Supported Platforms docs (#365)
- Add logos and banners (#370, #371)
ποΈ 2024-06-04
- 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
SetThreadExecutionState
wakepy.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 test
on Windows (#339, #341)
ποΈ 2024-06-01
- Update docs and README after 0.8.0 & 0.9.0 releases (#331)
ποΈ 2024-05-31
- 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)
- 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)
ποΈ 2024-05-26
- 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.
- Modes support on-fail actions ("error", "warn", "pass" or a callable). (#182)
- It is now possible to select the used wakepy.Methods with
methods
andomit
and 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)
- {class}
ActivationResult <wakepy.ActivationResult>
objects (#57, #258, #270) in {attr}Mode.activation_result <wakepy.Mode.activation_result>
which give more detailed information about the activation process. - Possibility to exit from a mode context manager early with {class}
ModeExit <wakepy.ModeExit>
(#72) - It's now possible to check the active and used method from the Mode instance using the {attr}
Mode.active_method <wakepy.Mode.active_method>
and {attr}Mode.used_method <wakepy.Mode.used_method>
(#268) - Added possibility to use any dbus python implementation through the {class}
DBusAdapter <wakepy.DBusAdapter>
. By default uses jeepney through {class}JeepneyDBusAdapter <wakepy.JeepneyDBusAdapter>
(See: #45)
- Removed
set_keepawake
andunset_keepawake functions
and thekeepawake
context manager. These were deprecated in 0.7.0 and are replaced with the new api: {func}keep.running() <wakepy.keep.running>
and {func}keep.presenting() <wakepy.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 {class}
ActivationError <wakepy.ActivationError>
by default. Previously there was no "on fail" action, but users needed to check theresult.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)
- 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)
- Rewritten the docs (#193, #194, #196, #197, #198, #200, #244, #271, #272, #285, #286)
- Remove /en/ from the URL and rename latest to stable (#250)
- 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
andwarn_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)
ποΈ 2023-09-27
ποΈ 2023-06-11
keep.running
andkeep.presenting
return an objectm
withsuccess
value ofTrue
.
ποΈ 2023-06-11
- 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.success
if changing the mode was successful. - Possibility to fake successful change of mode with
WAKEPY_FAKE_SUCCESS
(for CI / tests).
- No exceptions anymore on import-time. All exceptions should be handled now gracefully, and user is informed if switching to a
keep.running
orkeep.presenting
mode failed.
- Old Python API: The
keepawake()
,set_keepawake
andunset_keepwake
. These will be removed in a future version of wakepy. Usekeep.running()
orkeep.presenting()
, instead. - The
-s, --keep-screen-awake
option of thewakepy
CLI command. Use-p, --presentation
option, instead.
- Created Readthedocs pages
- Added manual CI tests
- Start using tox
- Enforce pass in isort, black, ruff and mypy in tests
ποΈ 2023-02-27
- 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.
ποΈ 2021-12-15
- 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 whenwakepy
is installed withpip
.
ποΈ 2021-08-30
- Keeping screen awake on Mac (#13). Fixed in PR #15. Thanks to mikeckennedy.
ποΈ 2021-08-28
- 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.
ποΈ 2021-08-10
- Raising
FileNotFoundError
if trying to use on MacOS. Previous implementation had a bug (#9). Thanks to matacoder for PR #10.
ποΈ 2021-06-15
- Raising
NotImplementedError
if trying to use on Linux withoutsystemctl
. Previous implementation had a bug. (#8)
ποΈ 2021-06-09
keepawake
context manager. (#6). Thanks to HoustonFortney.
ποΈ 2021-06-06
- Raising
NotImplementedError
if trying to use on Linux withoutsystemctl
. (#3)
ποΈ 2021-06-02
- The package in PyPI did not have any content
ποΈ 2021-05-05
- Linux & OSX support. Thanks for rileyyy.