This repository was archived by the owner on Aug 22, 2026. It is now read-only.
Retry Wayland display on transient EAGAIN instead of restarting - #3
Open
jvasile wants to merge 4 commits into
Open
Retry Wayland display on transient EAGAIN instead of restarting#3jvasile wants to merge 4 commits into
jvasile wants to merge 4 commits into
Conversation
Adds a [tool.setuptools] section to pyproject.toml declaring py-modules = ["wm2"] so the single-file wm2 module is correctly discovered and included when building distributions, complementing the existing [project.scripts] entry for the wm2 console script and ensuring installability via setuptools without requiring a package directory. This makes `pip install .` work. Without it, .venv/bin/wm2 fails when it can't find the wm2 module. - Adds [tool.setuptools] with py-modules = ["wm2"] to pyproject.toml to include the top-level module in builds
Adds a [tool.setuptools.packages.find] section to pyproject.toml with include = ["protocols*"] so that any packages under the protocols namespace are discovered and included in built distributions. This complements the existing py-modules entry for wm2 and ensures the protocols code is packaged and installed rather than being excluded by default package discovery. - Adds [tool.setuptools.packages.find] with include = ["protocols*"] to pyproject.toml - Retains existing [tool.setuptools] py-modules configuration for wm2
Set pytest's pythonpath to the repository root so tests can import the top-level wm2 module when pytest is invoked directly. This makes local test discovery work consistently with the project's flat module layout.
Adds handling for transient Wayland display unavailability surfaced by pywayland as RuntimeError "Failed with error: 11" (errno.EAGAIN). Previously both RiverWM event loops treated any RuntimeError as fatal, setting crash_reason and breaking to trigger a restart which would log-loop on temporary unavailability. The new helper retries on this transient failure, backing off slowly to avoid spamming the logs or taking too much system attention. This code preserves the existing fatal path for EPIPE, EPROTOCOL and other errors. In addition, I've added some tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds handling for transient Wayland display unavailability surfaced by
pywayland as RuntimeError "Failed with error: 11" (errno.EAGAIN).
Previously both RiverWM event loops treated any RuntimeError as fatal,
setting crash_reason and breaking to trigger a restart which would
log-loop on temporary unavailability. The new helper retries on this
transient failure, backing off slowly to avoid spamming the logs or
taking too much system attention.
This code preserves the existing fatal path for EPIPE, EPROTOCOL and other errors.
In addition, I've added some tests.
This MR also has some commits related to making sure pip can find all the pieces. They're not substantive, but they are needed for this to work in my (and perhaps other's) system.