withcache 0.4.2__tar.gz → 0.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {withcache-0.4.2 → withcache-0.4.3}/PKG-INFO +1 -1
- {withcache-0.4.2 → withcache-0.4.3}/shim/build.zig.zon +1 -1
- {withcache-0.4.2 → withcache-0.4.3}/src/withcache/__init__.py +1 -1
- {withcache-0.4.2 → withcache-0.4.3}/src/withcache/server.py +12 -4
- {withcache-0.4.2 → withcache-0.4.3}/.gitignore +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/LICENSE +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/README.md +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/deploy/Containerfile +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/deploy/compose.yml +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/hatch_build.py +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/pyproject.toml +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/shim/build.zig +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/shim/shim.zig +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/src/withcache/_shim.py +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/src/withcache/client.py +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/src/withcache/curlwithcache.py +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/src/withcache/static/htmx.min.js +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/src/withcache/static/pico.min.css +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/src/withcache/wgetwithcache.py +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/tests/test_differential.py +0 -0
- {withcache-0.4.2 → withcache-0.4.3}/tests/test_withcache.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: withcache
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Operator-curated, URL-keyed artifact cache for a small lab (CUDA/ROCm/DOCA/firmware)
|
|
5
5
|
Project-URL: Homepage, https://github.com/safl/withcache
|
|
6
6
|
Author-email: "Simon A. F. Lund" <safl@safl.dk>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.name = .withcache_shim,
|
|
3
3
|
// Zig requires a literal here; keep it in lockstep with the project's
|
|
4
4
|
// single source (src/withcache/__init__.py) via `make bump` / `make version-check`.
|
|
5
|
-
.version = "0.4.
|
|
5
|
+
.version = "0.4.3",
|
|
6
6
|
.fingerprint = 0xd7d96c5ed212ccaa,
|
|
7
7
|
.minimum_zig_version = "0.16.0",
|
|
8
8
|
.paths = .{
|
|
@@ -41,8 +41,10 @@ import urllib.request
|
|
|
41
41
|
from dataclasses import dataclass, field
|
|
42
42
|
from datetime import datetime, timezone
|
|
43
43
|
|
|
44
|
+
from . import __version__
|
|
45
|
+
|
|
44
46
|
CHUNK = 64 * 1024
|
|
45
|
-
USER_AGENT = "withcache-cache/
|
|
47
|
+
USER_AGENT = f"withcache-cache/{__version__}"
|
|
46
48
|
# Resume budget for a single store_from_origin call. A truncated
|
|
47
49
|
# upstream stream re-fetches with ``Range: bytes=<got>-`` so the
|
|
48
50
|
# next attempt picks up where the cut happened. Five tries cover
|
|
@@ -566,7 +568,7 @@ def _set_progress(job: Job, done: int, total: int | None):
|
|
|
566
568
|
# HTTP handler
|
|
567
569
|
# --------------------------------------------------------------------------
|
|
568
570
|
class Handler(http.server.BaseHTTPRequestHandler):
|
|
569
|
-
server_version = "withcache/
|
|
571
|
+
server_version = f"withcache/{__version__}"
|
|
570
572
|
protocol_version = "HTTP/1.1"
|
|
571
573
|
|
|
572
574
|
@property
|
|
@@ -859,7 +861,10 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
|
|
859
861
|
return f"""{self._head("withcache — login")}
|
|
860
862
|
<body><main class="container">
|
|
861
863
|
<article style="max-width: 24rem; margin: 4rem auto;">
|
|
862
|
-
<hgroup
|
|
864
|
+
<hgroup>
|
|
865
|
+
<h2>withcache <small class="mono">v{html.escape(__version__)}</small></h2>
|
|
866
|
+
<p>operator login</p>
|
|
867
|
+
</hgroup>
|
|
863
868
|
{err}
|
|
864
869
|
<form method="post" action="/ui/login">
|
|
865
870
|
<input type="password" name="password" placeholder="Admin password" autofocus required>
|
|
@@ -879,7 +884,10 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
|
|
879
884
|
return f"""{self._head("withcache cache-host")}
|
|
880
885
|
<body><main class="container">
|
|
881
886
|
<nav>
|
|
882
|
-
<ul><li
|
|
887
|
+
<ul><li>
|
|
888
|
+
<strong>withcache</strong> <small>cache-host</small>
|
|
889
|
+
<small class="mono">v{html.escape(__version__)}</small>
|
|
890
|
+
</li></ul>
|
|
883
891
|
<ul>
|
|
884
892
|
<li><progress id="spin" class="htmx-indicator"></progress></li>
|
|
885
893
|
{logout}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|