refactor: split core.upstream by subject

HTTP to the forges moves to core.forgehttp, comparisons, trees and
clone history to core.upstreamtree. core.upstream keeps repositories,
the cache and revisions.
This commit is contained in:
Abdessamad Derraz committed 2026-11-24 06:20:52 +01:00
1 parent ce92eff0aa
commit 263a64c0e0
65 files changed
+1417 -1337

No files matched your search

+3 -2
View File
@@ -18,6 +18,7 @@ from core.artifacts import write_if_changed
from core.paths import DB_FILE, REPO_ROOT
from core.sizes import size_text
from core import upstream
from core import forgehttp
from installer_build.module import installer_module
from model.guides import PACKAGE_COMMAND
from sitegen.guidedata import install_command
@@ -161,9 +162,9 @@ def fetch_contributors() -> list[dict]:
return []
url = f"https://api.github.com/repos/{REPO}/contributors"
try:
body = upstream.fetch_body(url, accept_json=True, timeout=10, user_agent="retrobios-readme/1.0")
body = forgehttp.fetch_body(url, accept_json=True, timeout=10, user_agent="retrobios-readme/1.0")
data = json.loads(body) if body is not None else []
except (upstream.UpstreamError, ValueError) as exc:
except (forgehttp.UpstreamError, ValueError) as exc:
print(f"contributors: {exc}", file=sys.stderr)
return []
owner = REPO.split("/")[0]