Skip to content

New api alpha#41

Merged
fohrloop merged 24 commits intodevfrom
new-api-alpha
Jun 11, 2023
Merged

New api alpha#41
fohrloop merged 24 commits intodevfrom
new-api-alpha

Conversation

@fohrloop
Copy link
Copy Markdown
Member

[0.7.0]

Added

  • 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 succesful.
  • Possibility to fake succesful change of mode with WAKEPY_FAKE_SUCCESS (for CI / tests).

Fixed

  • 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.

Deprecated

  • 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.

@fohrloop fohrloop merged commit f6a42b6 into dev Jun 11, 2023
@fohrloop fohrloop deleted the new-api-alpha branch June 11, 2023 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant