Skip to content

Commit 952f338

Browse files
karlwaldmanclaude
andcommitted
Merge origin/main into fix/ei-envelopes-107
Resolves the CHANGELOG conflict with #135 (streaming, #108), the only file that conflicted. Both PRs added an Unreleased entry; #135's landed in the stale mid-file `## [Unreleased]` block that this branch removes, so the streaming bullets move into the one canonical Unreleased section at the top of the file alongside the EI entries. Both entries are preserved verbatim and `## [Unreleased]` appears exactly once, as test_release_readiness.py requires. Code merged cleanly: async_resources.py auto-merged with #138's diesel `state_code` fallback, which touches a different resource class. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ao5paex73xXvuM424Libo
2 parents 5b47e04 + 4318dee commit 952f338

72 files changed

Lines changed: 2285 additions & 814 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ venv/
111111
ENV/
112112
env.bak/
113113
venv.bak/
114+
build-env/
115+
*/pyvenv.cfg
116+
pyvenv.cfg
114117

115118
# Spyder project settings
116119
.spyderproject

‎CHANGELOG.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,29 @@ All notable changes to the OilPriceAPI Python SDK will be documented in this fil
3232
- **Docstring examples across the EI resources now use the field names the API
3333
actually returns** (`region`/`count`, not the invented `name`/`rig_count`),
3434
verified live on 2026-09-13.
35+
- **The ActionCable handshake is bounded, and a failed setup no longer leaks the
36+
socket (#108).** `open_timeout` was passed to the WebSocket upgrade and
37+
nothing else: the waits for `welcome` and `confirm_subscription` that follow
38+
had no deadline at all, so a socket that upgraded and then went quiet hung the
39+
caller indefinitely, and cancelling out of that hang left the upgraded socket
40+
open. Connect, `welcome` and `confirm_subscription` are now one bounded setup
41+
lifecycle governed by a new `setup_timeout` (defaulting to `open_timeout`, so
42+
the timeout you already configure does cover protocol setup), and every socket
43+
the stream allocates is closed on any failure, timeout or cancellation --
44+
including a `__aenter__` that raises, where `__aexit__` never runs.
45+
- **A failed reconnect consumes the reconnect budget instead of escaping on the
46+
first attempt (#108).** An `OSError` raised while reconnecting inside the
47+
`ConnectionClosed` handler propagated straight out of the iterator, so a
48+
stream configured with `max_reconnect_attempts=10` gave up after one. Transient
49+
failures now spend the configured consecutive-attempt budget with backoff and
50+
end in `ConnectionError: Stream lost after N reconnect attempts`; a permanent
51+
refusal stops immediately with the new `StreamAuthError` (a `ConnectionError`
52+
subclass, so existing handlers are unaffected) rather than retrying a rejected
53+
key ten times.
54+
- **`close()` retires the stream.** It is idempotent, closes the socket under a
55+
bounded teardown timeout, and prevents any subsequent reconnect; `connect()`
56+
on a closed stream raises instead of quietly opening a new socket. Reconnects
57+
now close the socket they are replacing.
3558

3659
### Changed
3760

‎build-env/bin/Activate.ps1‎

Lines changed: 0 additions & 247 deletions
This file was deleted.

‎build-env/bin/activate‎

Lines changed: 0 additions & 70 deletions
This file was deleted.

‎build-env/bin/activate.csh‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)