You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Seclai(timeout=...) is ignored by methods built on request() when an http_client is supplied #17
Seclai(timeout=...) is not applied consistently: about 164 public methods on Seclai (and their AsyncSeclai twins) ignore it when the client was given an http_client, while the typed methods honour it. Two methods on the same client can therefore time out differently, and which one a caller gets depends on how the method is implemented internally.
Reproduced on main (1.7.2) with a mock transport recording each request's timeout:
Client
list_sources() (typed)
a method built on Seclai.request(), e.g. add_email_domain()
Seclai.request() calls self._client.request(...) without a timeout, while the typed path's senders set timeout=self._options.explicit_timeout. The second row also contradicts the constructor docstring, which says a supplied http_client "keeps its own" timeout: the typed methods replace it with no limit.
Goal: one timeout rule for every public method, whichever internal path it uses, and a constructor docstring that states that rule. Whatever the rule is, a timeout passed to Seclai(...) should apply to every method.
Found while reviewing #16, where new methods built on request() inherit this.
Activity