![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Tools in Python for keeping a computer display awake.
eugeroic : (adjective) keeping one awake. Of a wakefulness promoting agent.
Sometimes you need to perform a task without the screensaver kicking in, or the display being suspended entirely. This may be because you are capturing the screen, or because you are running presentation software, or because you are running a long-running task that you want to monitor without interaction. This module provides a context manager and a decorator that can be used to keep the display awake while the block or function is running.
$ pip install eugeroic
The wakefulness
context manager keeps the computer awake while the block is running:
# Keep the computer awake while capturing the screen.
from eugeroic import wakefulness
with wakefulness("Capture the screen"):
capture_screen(seconds=500)
The stay_awake
decorator keeps the computer awake while the decorated function is running:
# Keep the computer awake while capturing the screen.
from eugeroic import stay_awake
@stay_awake("Capture the screen")
def capture_screen(seconds):
...
On Windows calls to SetThreadExecutionState
are used.
On macOS IOKit Power Management functions are used.
On Linux, an attempt is made to communicate with the desktop environment through D-Bus messages.
Note that while every attempt is made to keep the computer and display awake, there is no guarantee that the display will not be suspended. For example, on macOS, the display will be suspended if the user locks the screen. On Linux, the display will be suspended if the user switches to a different virtual terminal. On Windows, the display will be suspended if the user locks the screen or switches to a different user account. In particular, on Linux, there is no guarantee that the required D-Bus messages will be handled by the desktop environment. In practice though, Eugeroic usually works.
MIT License
Copyright (c) 2023 Sixty North AS
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Prevent your computer from sleeping
We found that eugeroic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.