Housekeeping - #102
Conversation
… it into two commits rather than one giant one — cleaner history and easier to review/revert independently:
Commit 1 — the SDK/test fixes:
fix: correct stale gateway hostname and stop File from fetching on GC
The Python SDK's service-call gateway still hardcoded the retired
proj-env-{env_id} hostname, causing every deployed cross-service call
(sibling agent, api, ui) to 421 against the ALB. Switch to the
canonical e{env_id} host, with TIMBAL_PROJECT_ENV_ORIGIN /
TIMBAL_DEPLOYMENTS_DOMAIN env overrides so a future scheme change
doesn't require another SDK release.
Also fixes File silently making real HTTP requests to production CDN
during garbage collection: io.IOBase's finalizer calls close(), which
was falling through File's attribute-proxying machinery and
triggering the lazy fetcher for files that were never read. close()
is now a no-op unless the file was actually materialized, and a
failed fetch is cached instead of retried on every attribute access.
Also fixes test_job_init using asyncio.Future()/Queue() in a sync
test, which raises RuntimeError on Python 3.14 now that the implicit
event-loop-on-demand fallback is gone.
Moves the CDN config default from the retired content.timbal.ai to
timbalusercontent.com (old host stays recognized for back-compat).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Commit 2 — the docs reorg:
docs(api-reference): split Alarms, Connectors, and Evals into top-level groups
Notifications (rules + channels) has been fully replaced by the new
Alarms/Channels/Metrics endpoints in openapi.json; removed the 9 now-
orphaned notification pages that pointed at REST operations that no
longer exist.
Added docs for all new Alarms, Channels, and Metrics endpoints, plus
3 previously-undocumented connector endpoints (local-config, revoke,
syncs/run). Moved Connectors and Evals out of Organizations/Projects
into their own top-level groups, with Channels and Metrics nested
under Alarms.
Final group order: Me, Organizations, Projects, Knowledge Bases,
Evals, ACE, Alarms, Connectors.
PR SummaryMedium Risk Overview Connectors docs expand with Python platform clients now build deployment URLs as Reviewed by Cursor Bugbot for commit 65dc521. Bugbot is set up for automated code reviews on this repo. Configure here. |
A File whose __init__ raised before _setup() (e.g. an invalid source) leaves an object with none of its internal slots set. On Windows/py3.13 CI such objects were finalized by io.IOBase.__del__ -> close(), which raised AttributeError reading the unset __fileobj__ slot; that became an unraisable exception, and pytest's hook then repr()'d the object, sending __str__ -> __getattr__ -> __wrapped__ (AttributeError) -> __getattr__ into infinite recursion (RecursionError). Three coordinated fixes: - __getattr__ raises AttributeError for any name starting with "__" (internal slots and CPython's __IOBase_closed finalizer probe) instead of routing it through the lazy fetcher/__wrapped__, which is what recursed. Proxied file attributes (read, name, seek, ...) never start with "__", so real proxying is unaffected. - close() no longer raises when __fileobj__ is unset, so finalizing a half-built File produces no unraisable exception. - __str__ falls back to "File(uninitialized)" when its slots are missing, keeping repr() safe on any finalization/unraisable-hook path. Adds regression tests covering repr/close of a half-constructed File and GC of many invalid-source Files.
No description provided.