Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Configure default timeout for all API calls

Offen
#1,961 30 Kommentare 8 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@yliaog arbeitet bereits daran.

Seit 05.12.2022.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

kind/feature lifecycle/stale

What is the feature and why do you need it:
All API calls done through this client today goes through urllib3, where the timeout is default to set to None, this means infinite timeout and is a well known pitfall with urllib3. Lost connection attempts can get stuck waiting forever, with no retries being done to reestablish the connection.

Quoting the requests-documentation which uses urllib3 under the hood:

Nearly all production code should use this parameter in nearly all requests. Failure to do so can cause your program to hang indefinitely:


There is a _request_timeout kwargs argument that can be set on each api-call, but that is both tedious, easy to forget and not type-checked due to use of kwargs-dictionarly.

Describe the solution you'd like to see:
Similar to how retries is configured, Configuration should accept a timeout-argument, this can be forwarded into urllib3s poolmanager where it uses this timeout for all operations where an explicit timeout is not provided.

Vorherrschende Sprache
Python
Sterne
7.7k
Forks
3.5k
Ø Merge
1 T. 5 Std.
Gemergte PRs (30 T.)
23

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus kubernetes-client/python

Alle Issues in kubernetes-client/python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.