Esri / Esri/arcgis-python-api

No way to set a timeout on FeatureLayer.query()

Offen
#2,471 11 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
As-Designed
Vorherrschende Sprache
Python
Sterne
2.2k
Forks
1.2k
Ø Merge
2 Std. 40 Min.
Gemergte PRs (30 T.)
2

Beschreibung

**Describe the bug**
When calling FeatureLayer.query() with a timeout parameter, the value is accepted without error but has no effect on the underlying HTTP request. Large layers can hang indefinitely as a result.

Root cause: FeatureLayer.query() accepts **kwargs and passes them to internal methods, but the timeout kwarg is never forwarded to the underlying requests.Session call.

**To Reproduce**
Steps to reproduce the behavior:
```python
from arcgis.features import FeatureLayer
layer = FeatureLayer("https://example.com/arcgis/rest/services/.../FeatureServer/0")
# timeout is silently ignored — the request can hang indefinitely
features = layer.query(where="1=1", out_fields="*", return_geometry=True, timeout=10)
```

**Expected behavior**
The HTTP request should time out after 10 seconds.

**Actual behavior**
The request never times out regardless of the timeout value.

**Platform (please complete the following information):**
- Python API Version [`2.4.1`] (but I also saw that it is not fixed in 2.4.2 as well)`

**Additional context**
Add any other context about the problem here, attachments etc.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne bei FeatureLayer.query() und verfolge, wie seine kwargs den zugrunde liegenden requests.Session-Aufruf erreichen. Reproduziere das Problem mit timeout=10. Überprüfe anschließend, dass der HTTP-Request den Wert berücksichtigt, und ergänze oder aktualisiere die Testabdeckung für das Timeout-Verhalten. Erledigt ist die Aufgabe, wenn eine Abfrage das angegebene Timeout nicht mehr ignoriert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
api
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

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