nadzoring.core.releases module

Cached release information and explicit, interpreter-scoped updates.

nadzoring.core.releases._changelog_section(text: str, version: str) → str[source]
nadzoring.core.releases._decode_changelog(data: dict[str, Any], version: str) → str[source]
nadzoring.core.releases._fetch_json(url: str, config: TimeoutConfig) → dict[str, Any][source]
nadzoring.core.releases._read_cache(path: Path) → dict[str, Any] | None[source]
nadzoring.core.releases._write_cache(path: Path, data: dict[str, Any]) → None[source]
nadzoring.core.releases.changelog(version: str | None = None, *, timeout_config: TimeoutConfig | None = None) → list[CheckResult][source]

Fetch GitHub release notes, falling back to the repository changelog section.

Parameters:
  • version – Release version, optionally prefixed with v; defaults to installed.

  • timeout_config – Connection, read and lifetime limits for GitHub requests.

Returns:

Release notes or an explicit failure observation.

nadzoring.core.releases.current_version() → str[source]

Return the installed distribution version (never a hard-coded release).

nadzoring.core.releases.update(*, installer: str = 'auto', dry_run: bool = False, timeout_config: TimeoutConfig | None = None) → list[CheckResult][source]

Upgrade only this interpreter’s installation without shell or elevation.

Parameters:
  • installer – auto (prefer uv), pip, or uv.

  • dry_run – Report the exact argument vector without spawning a process.

  • timeout_config – Subprocess and whole-operation time limit.

Returns:

Update result, including command and any subprocess failure.

nadzoring.core.releases.version_info(*, check: bool = False, timeout_config: TimeoutConfig | None = None) → list[CheckResult][source]

Show the installed version and optionally compare it with stable PyPI releases.

Parameters:
  • check – Query PyPI for its latest published version when true.

  • timeout_config – Connection, read and lifetime limits for the PyPI request.

Returns:

An installed-version, update-available or explicit failure observation.