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

+1 -1
View File
@@ -7,7 +7,7 @@ import urllib.error
import urllib.parse
import urllib.request
from core.upstream import forge_headers, open_retrying
from core.forgehttp import forge_headers, open_retrying
from release.downloaderror import DownloadError
DEFAULT_API = "https://api.github.com"
+1 -1
View File
@@ -9,7 +9,7 @@ from pathlib import Path
from typing import TYPE_CHECKING, Protocol
from core.hashing import compute_hashes, parse_sha256sums
from core.upstream import open_retrying
from core.forgehttp import open_retrying
from release.downloaderror import DownloadError
from release.latest import checked_url
from release.transfer import TRANSFER_ERRORS, download_file
+2 -2
View File
@@ -7,7 +7,7 @@ import urllib.error
import urllib.request
from typing import TYPE_CHECKING
from core.upstream import UpstreamError, open_retrying
from core.forgehttp import UpstreamError, open_retrying
from release.downloaderror import DownloadError
from release.latest import checked_url
@@ -27,7 +27,7 @@ def download_file(
"""Write the asset at *url* to *dest* and return its byte count.
*progress* receives the bytes written so far and the announced total
after each block. core.upstream.open_retrying asks again after a dropped
after each block. core.forgehttp.open_retrying asks again after a dropped
connection, a stream cut midway or a 5xx, and waits out a rate limit:
each attempt writes `dest` from its first byte. A transfer that fails or
ends short of *expected_size* raises DownloadError.