Support _request_timeout in dynamic client watch()
@Polimixanos is already working on this.
Since Apr 23, 2026.
Assessment
This issue has not been assessed yet.
Description
Problem
When using the dynamic client’s watch() method:
api = self._client.resources.get(
api_version=self._api_version,
kind=self._kind
)
for event in api.watch(
timeout=server_timeout_seconds,
)
there is currently no way to configure a client-side request timeout (_request_timeout).
Current Workaround
To enforce a client-side timeout, we have to bypass Resource.watch() and directly use Watch().stream():
for raw_event in Watch().stream(
api.get,
serialize=False,
deserialize=False,
timeout_seconds=self._server_timeout_seconds,
_request_timeout=self._client_timeout_seconds,
)
Issue
The dynamic client’s watch() method internally relies on Watch().stream() but does not expose _request_timeout as a parameter: https://github.com/kubernetes-client/python/blob/master/kubernetes/base/dynamic/client.py#L203
This creates:
Inconsistent API ergonomics
Unnecessary duplication of logic for users needing client-side timeouts
Proposed Solution
Extend Resource.watch() to accept an optional _request_timeout parameter and pass it through to the underlying Watch().stream() call.
Example:
api.watch(
timeout=server_timeout_seconds,
_request_timeout=(connect_timeout, read_timeout),
)
- Dominant language
- Python
- Stars
- 7.7k
- Forks
- 3.5k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 18
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kubernetes-client/python
-
kind/bug
Difficulty 1/5 Under an hour Newbie friendliness 68/100
kubernetes-client/python#2280 · 16 comments · 9 reactions ·
-
Release 1.37 Open
kubernetes-client/python#2691 · 1 comment · 1 reaction · 1 assignee ·
-
Growing library size Openhelp wanted
Difficulty 5/5 Over a week Newbie friendliness 35/100
kubernetes-client/python#2677 · 13 comments · 1 reaction ·
-
help wanted kind/feature
kubernetes-client/python#2602 · 6 comments · 1 assignee ·
-
kind/bug
kubernetes-client/python#2596 · 12 comments · 2 reactions · 1 assignee ·
All issues in kubernetes-client/python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100