No way to set a timeout on FeatureLayer.query()
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 1.2k
- Merge medio
- 2h 40m
- PR unite (30g)
- 2
Descrizione
**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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Parti da FeatureLayer.query() e traccia il percorso con cui i suoi kwargs arrivano alla chiamata sottostante di requests.Session. Riproduci il problema con timeout=10, quindi verifica che la richiesta HTTP rispetti il valore e aggiungi o aggiorna la copertura del comportamento del timeout. Il lavoro è completato quando una query non ignora più il timeout fornito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 68/100