dccd 3.8.0__tar.gz → 3.9.0__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.
- {dccd-3.8.0 → dccd-3.9.0}/CHANGELOG.md +24 -0
- {dccd-3.8.0 → dccd-3.9.0}/CLAUDE.md +10 -5
- {dccd-3.8.0 → dccd-3.9.0}/CONTRIBUTING.md +15 -0
- {dccd-3.8.0 → dccd-3.9.0}/PKG-INFO +1 -1
- dccd-3.9.0/dccd/interfaces/ui/static/apple-touch-icon.png +0 -0
- dccd-3.9.0/dccd/interfaces/ui/static/manifest.webmanifest +12 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/base.html +7 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/login.html +7 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_api.py +14 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_transport.py +38 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/transport/http.py +11 -1
- {dccd-3.8.0 → dccd-3.9.0}/dccd.egg-info/PKG-INFO +1 -1
- {dccd-3.8.0 → dccd-3.9.0}/dccd.egg-info/SOURCES.txt +2 -0
- {dccd-3.8.0 → dccd-3.9.0}/pyproject.toml +1 -1
- {dccd-3.8.0 → dccd-3.9.0}/LICENSE.txt +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/MANIFEST.in +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/README.md +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/config.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/events.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/jobs.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/monitor.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/operations.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/registry.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/scheduler.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/application/service_factory.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/capability.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/dataset.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/errors.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/records.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/symbol.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/timeutils.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/transforms.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/domain/types.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/api/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/api/app.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/cli/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/cli/main.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/static/favicon.svg +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/static/fonts/martian-mono-600.woff2 +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/static/fonts/martian-mono-700.woff2 +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/static/fonts/spline-sans-400.woff2 +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/static/fonts/spline-sans-500.woff2 +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/static/fonts/spline-sans-600.woff2 +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/static/fonts/spline-sans-700.woff2 +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/static/logo.svg +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/config.html +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/dashboard.html +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/data.html +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/historical.html +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/live.html +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/logs.html +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/interfaces/ui/templates/storage.html +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/base.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/binance.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/bitfinex.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/bitmex.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/bybit.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/coinbase.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/kraken.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/kraken_futures.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/okx.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/sources/registry.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/storage/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/storage/coverage_sqlite.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/storage/parquet.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/storage/purge.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/storage/remote.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/storage/runs_sqlite.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_adapter_parsing.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_application.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_backfill_lookback.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_cli.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_client.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_coverage.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_domain.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_domain_extended.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_monitor_webhook.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_network.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_orderbook_throttle.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_purge.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_ratelimit.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_remote_sync.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_restart.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_restore.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_scheduler_hygiene.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_sources.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_storage.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_storage_extended.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_stream_end_state.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_stream_flush.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_stream_nocapability.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/tests/v3/test_ws_subscription_honesty.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/transport/__init__.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/transport/paginate.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/transport/ratelimit.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd/transport/ws.py +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd.egg-info/dependency_links.txt +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd.egg-info/entry_points.txt +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd.egg-info/requires.txt +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/dccd.egg-info/top_level.txt +0 -0
- {dccd-3.8.0 → dccd-3.9.0}/setup.cfg +0 -0
|
@@ -16,6 +16,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
16
16
|
|
|
17
17
|
### Removed
|
|
18
18
|
|
|
19
|
+
## [3.9.0] - 2026-11-24
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- UI can be installed as a home-screen web app (iOS "Add to Home Screen"):
|
|
24
|
+
`static/manifest.webmanifest` (standalone display) and a 180×180
|
|
25
|
+
`static/apple-touch-icon.png`, linked from `base.html` and `login.html` (#207).
|
|
26
|
+
|
|
27
|
+
## [3.8.1] - 2026-09-01
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- `AsyncHTTPClient` retries `httpx.RemoteProtocolError` ("Server disconnected
|
|
32
|
+
without sending a response") like other transient network errors — some
|
|
33
|
+
exchanges (Kraken Futures charts API) shed long-lived keep-alive connections
|
|
34
|
+
under concurrent load, and the escaping exception killed entire deep
|
|
35
|
+
backfill runs that a single retry saves (observed: 21 killed runs during
|
|
36
|
+
the 2026-07-05 17-pair 1m expansion, all recovered by re-trigger).
|
|
37
|
+
`LocalProtocolError` stays fatal (a malformed request is our bug). (#200)
|
|
38
|
+
|
|
39
|
+
### Deprecated
|
|
40
|
+
|
|
41
|
+
### Removed
|
|
42
|
+
|
|
19
43
|
## [3.8.0] - 2026-07-05
|
|
20
44
|
|
|
21
45
|
### Added
|
|
@@ -11,6 +11,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
11
11
|
|
|
12
12
|
## Common conventions
|
|
13
13
|
|
|
14
|
+
<!-- mirror of ~/.claude/CLAUDE.md — synced 2026-07-04 -->
|
|
15
|
+
|
|
14
16
|
Shared across my repos, mirrored from `~/.claude/CLAUDE.md` (the single source of
|
|
15
17
|
truth — if they ever disagree, the global file wins). Restated here so the repo
|
|
16
18
|
stays self-contained:
|
|
@@ -22,8 +24,11 @@ stays self-contained:
|
|
|
22
24
|
`Co-Authored-By` trailers** (personal repo).
|
|
23
25
|
- **One PR = one concern**, small and disposable — a big plan ships as several small
|
|
24
26
|
atomic PRs, never one catch-all branch.
|
|
25
|
-
- **Model:
|
|
26
|
-
|
|
27
|
+
- **Model: session model for judgement, tiered execution** — sessions,
|
|
28
|
+
orchestration and the judgement skills run on the session model (set in
|
|
29
|
+
`~/.claude/settings.json`); plan-leaf execution runs at the tier derived from
|
|
30
|
+
the leaf's `complexity` (`low→haiku / medium→sonnet / high→session model`),
|
|
31
|
+
escalating one tier on failed tests/verification.
|
|
27
32
|
- **Before every commit** — `pytest` and `ruff check dccd/` must pass.
|
|
28
33
|
|
|
29
34
|
## Commands
|
|
@@ -77,9 +82,9 @@ truth:
|
|
|
77
82
|
`/plan` (decompose into a `doc/dev/plans/<epic>/` tree — adaptive depth: a single
|
|
78
83
|
leaf for a trivial task, a global `00-plan.md` + leaves otherwise — and open the
|
|
79
84
|
**plan PR** that lands the tree on `develop` first) →
|
|
80
|
-
`/execute-leaf <epic> next` (cut the leaf branch, **spawn an agent at the
|
|
81
|
-
derived from the leaf's `complexity
|
|
82
|
-
real data**, then reports) →
|
|
85
|
+
`/execute-leaf <epic> next` (cut the leaf branch, **spawn an agent at the tier
|
|
86
|
+
derived from the leaf's `complexity`, escalating a tier on failure**, which
|
|
87
|
+
implements + tests + **verifies on real data**, then reports) →
|
|
83
88
|
`/finish-task` (tests, ADR, CHANGELOG, leaf PR, archive the leaf, tick the global
|
|
84
89
|
checklist) → … per leaf … → last leaf removes the roadmap line → `/release`.
|
|
85
90
|
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Contributing to dccd
|
|
2
2
|
|
|
3
|
+
## Scope — new data sources
|
|
4
|
+
|
|
5
|
+
dccd collects from venues it queries **directly**: an adapter talks to the
|
|
6
|
+
exchange that produced the data, and the store records where every row came
|
|
7
|
+
from. Third-party data providers and archive re-publishers are out of scope as
|
|
8
|
+
sources, however good their data — provenance is the property the whole project
|
|
9
|
+
is built on (see [`doc/dev/03-decisions.md`](doc/dev/03-decisions.md)).
|
|
10
|
+
|
|
11
|
+
A new **direct** exchange adapter is welcome: one `dccd/sources/<venue>.py`
|
|
12
|
+
implementing the protocol mixins from `sources/base.py`, an honest
|
|
13
|
+
`capabilities()`, tests, and one line in `service_factory.build_registry()`.
|
|
14
|
+
For anything larger than a single adapter — a new data type, a new storage
|
|
15
|
+
shape, a new axis in the architecture — open an issue first; those need a design
|
|
16
|
+
discussion and an ADR before the code.
|
|
17
|
+
|
|
3
18
|
## Setup
|
|
4
19
|
|
|
5
20
|
```bash
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dccd",
|
|
3
|
+
"short_name": "dccd",
|
|
4
|
+
"start_url": "/",
|
|
5
|
+
"scope": "/",
|
|
6
|
+
"display": "standalone",
|
|
7
|
+
"background_color": "#0a0d13",
|
|
8
|
+
"theme_color": "#0a0d13",
|
|
9
|
+
"icons": [
|
|
10
|
+
{"src": "/static/apple-touch-icon.png", "sizes": "180x180", "type": "image/png"}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>{% block title %}dccd{% endblock %} — dccd UI</title>
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
|
8
|
+
{# Home-screen web app (iOS "Add to Home Screen" / installable PWA). #}
|
|
9
|
+
<link rel="manifest" href="/static/manifest.webmanifest">
|
|
10
|
+
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
|
|
11
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
12
|
+
<meta name="apple-mobile-web-app-title" content="dccd">
|
|
13
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
14
|
+
<meta name="theme-color" content="#0a0d13">
|
|
8
15
|
<style>
|
|
9
16
|
/* Self-hosted fonts (woff2, latin subset) — the daemon serves them from
|
|
10
17
|
/static itself, so the UI needs no external network and leaks nothing to
|
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<title>Sign in — dccd UI</title>
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
|
|
8
|
+
{# Same home-screen tags as base.html: iOS may install from the login page. #}
|
|
9
|
+
<link rel="manifest" href="/static/manifest.webmanifest">
|
|
10
|
+
<link rel="apple-touch-icon" href="/static/apple-touch-icon.png">
|
|
11
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
12
|
+
<meta name="apple-mobile-web-app-title" content="dccd">
|
|
13
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
14
|
+
<meta name="theme-color" content="#0a0d13">
|
|
8
15
|
<style>
|
|
9
16
|
:root { --bg:#0f1419; --fg:#e6e6e6; --muted:#8b98a5; --accent:#4a9eff;
|
|
10
17
|
--border:#2a3038; --card:#161b22; --ok:#3fb950; --err:#f85149; }
|
|
@@ -115,6 +115,20 @@ class TestAuthSession:
|
|
|
115
115
|
assert r.status_code == 200
|
|
116
116
|
assert "token" in r.text.lower()
|
|
117
117
|
|
|
118
|
+
def test_home_screen_assets_public_and_linked(self, auth_client):
|
|
119
|
+
# iOS fetches the icon/manifest without the session cookie, and the app
|
|
120
|
+
# may be installed from the login page itself.
|
|
121
|
+
page = auth_client.get("/login").text
|
|
122
|
+
assert 'href="/static/manifest.webmanifest"' in page
|
|
123
|
+
assert 'href="/static/apple-touch-icon.png"' in page
|
|
124
|
+
icon = auth_client.get("/static/apple-touch-icon.png")
|
|
125
|
+
assert icon.status_code == 200
|
|
126
|
+
assert icon.headers["content-type"] == "image/png"
|
|
127
|
+
manifest = auth_client.get("/static/manifest.webmanifest")
|
|
128
|
+
assert manifest.status_code == 200
|
|
129
|
+
assert manifest.json()["display"] == "standalone"
|
|
130
|
+
assert manifest.json()["start_url"] == "/"
|
|
131
|
+
|
|
118
132
|
def test_login_wrong_token_401(self, auth_client):
|
|
119
133
|
r = auth_client.post(
|
|
120
134
|
"/login", data={"token": "nope", "next": "/"}, follow_redirects=False
|
|
@@ -533,3 +533,41 @@ async def test_ws_stream_delegates_to_parse_message() -> None:
|
|
|
533
533
|
|
|
534
534
|
assert collected == ["parsed:msg1", "parsed:msg2"]
|
|
535
535
|
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
@pytest.mark.asyncio
|
|
539
|
+
async def test_get_retries_remote_disconnect(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
540
|
+
"""A server closing the connection mid-exchange is retried, not fatal.
|
|
541
|
+
|
|
542
|
+
Regression: Kraken Futures' charts API sheds long-lived keep-alive
|
|
543
|
+
connections under load; ``RemoteProtocolError`` ("Server disconnected
|
|
544
|
+
without sending a response") previously escaped the retry loop and killed
|
|
545
|
+
whole deep backfill runs that a single retry would have saved.
|
|
546
|
+
"""
|
|
547
|
+
calls = {"n": 0}
|
|
548
|
+
|
|
549
|
+
async def flaky_get(self: httpx.AsyncClient, url: str, **kwargs: Any) -> httpx.Response:
|
|
550
|
+
calls["n"] += 1
|
|
551
|
+
if calls["n"] <= 2:
|
|
552
|
+
raise httpx.RemoteProtocolError("Server disconnected without sending a response.")
|
|
553
|
+
return httpx.Response(200, json={"ok": True}, request=httpx.Request("GET", url))
|
|
554
|
+
|
|
555
|
+
monkeypatch.setattr(httpx.AsyncClient, "get", flaky_get)
|
|
556
|
+
http = AsyncHTTPClient(backoff_base=0.0)
|
|
557
|
+
async with http as client:
|
|
558
|
+
data = await client.get("https://example.test/x")
|
|
559
|
+
assert data == {"ok": True}
|
|
560
|
+
assert calls["n"] == 3
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
@pytest.mark.asyncio
|
|
564
|
+
async def test_get_remote_disconnect_exhausts_retries(monkeypatch: pytest.MonkeyPatch) -> None:
|
|
565
|
+
"""Persistent disconnects still fail after max_retries (no infinite loop)."""
|
|
566
|
+
async def always_dead(self: httpx.AsyncClient, url: str, **kwargs: Any) -> httpx.Response:
|
|
567
|
+
raise httpx.RemoteProtocolError("Server disconnected without sending a response.")
|
|
568
|
+
|
|
569
|
+
monkeypatch.setattr(httpx.AsyncClient, "get", always_dead)
|
|
570
|
+
http = AsyncHTTPClient(max_retries=3, backoff_base=0.0)
|
|
571
|
+
async with http as client:
|
|
572
|
+
with pytest.raises(httpx.RemoteProtocolError):
|
|
573
|
+
await client.get("https://example.test/x")
|
|
@@ -133,7 +133,17 @@ class AsyncHTTPClient:
|
|
|
133
133
|
if resp.status_code >= 400:
|
|
134
134
|
raise HTTPError(resp.status_code, url, resp.text)
|
|
135
135
|
return resp.json()
|
|
136
|
-
except (
|
|
136
|
+
except (
|
|
137
|
+
httpx.NetworkError,
|
|
138
|
+
httpx.TimeoutException,
|
|
139
|
+
# A server closing the connection mid-exchange ("Server
|
|
140
|
+
# disconnected without sending a response") is as transient as
|
|
141
|
+
# a network error — some exchanges (e.g. Kraken Futures charts)
|
|
142
|
+
# shed long-lived keep-alive connections under load. Its
|
|
143
|
+
# sibling LocalProtocolError is deliberately NOT retried: that
|
|
144
|
+
# one means *we* built a bad request.
|
|
145
|
+
httpx.RemoteProtocolError,
|
|
146
|
+
) as exc:
|
|
137
147
|
wait = self._backoff_base ** attempt
|
|
138
148
|
logger.warning("Network error %s (attempt %d), retry in %.1fs", exc, attempt + 1, wait)
|
|
139
149
|
await asyncio.sleep(wait)
|
|
@@ -36,8 +36,10 @@ dccd/interfaces/api/app.py
|
|
|
36
36
|
dccd/interfaces/cli/__init__.py
|
|
37
37
|
dccd/interfaces/cli/main.py
|
|
38
38
|
dccd/interfaces/ui/__init__.py
|
|
39
|
+
dccd/interfaces/ui/static/apple-touch-icon.png
|
|
39
40
|
dccd/interfaces/ui/static/favicon.svg
|
|
40
41
|
dccd/interfaces/ui/static/logo.svg
|
|
42
|
+
dccd/interfaces/ui/static/manifest.webmanifest
|
|
41
43
|
dccd/interfaces/ui/static/fonts/martian-mono-600.woff2
|
|
42
44
|
dccd/interfaces/ui/static/fonts/martian-mono-700.woff2
|
|
43
45
|
dccd/interfaces/ui/static/fonts/spline-sans-400.woff2
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|