Skip to content

Optional and resilient last_edition extension#1724

Open
parulin wants to merge 4 commits into
QubesOS:mainfrom
parulin:keep-1636
Open

Optional and resilient last_edition extension#1724
parulin wants to merge 4 commits into
QubesOS:mainfrom
parulin:keep-1636

Conversation

@parulin

@parulin parulin commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Note: it's not my work but I would like to keep #1636 opened

This PR originally fixed a blocking issue in _ext/last_edition.py where a git log subprocess is executed without a timeout inside the html_page_context hook.

Now, the last_edition extension is only loaded when a QUBES_DOC_FULL_BUILD environment variable is set.

The use of environment variable is now documented (including the onion meta tag).

suhr25 and others added 4 commits June 20, 2026 14:04
Prevent sphinx-autobuild from hanging indefinitely when git is slow
or locked. Fall back to last_edition_datetime=None on timeout.

Signed-off-by: suhr25 <suhridmarwah07@gmail.com>
…r handling

- Reduce default subprocess timeout from 5s to 1s to avoid accumulating
  delay across ~190 pages; make it overridable via QUBES_LAST_EDITION_TIMEOUT
- Extend exception handling to also catch FileNotFoundError, PermissionError,
  and OSError so any git invocation failure is silently ignored
- Gate the extension in conf.py behind READTHEDOCS or QUBES_DOC_FULL_BUILD
  env vars to avoid running git on every plain local build
* add a section about building with environment variables
* rewrite part of the last_edition extension section
* use `QUBES_DOC_` prefix to be consistent
* minor typos in how-to-edit-the-rst-documentation
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.

2 participants