Deprecation Cycle for `netcdf4` backend URL behavior

Aperta
#10,951 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia da xarray/backends/netCDF4_.py intorno alle righe 718-731 e rivedi le pull request e le discussioni delle issue collegate riguardo a guess_can_open. Determina se il progetto vuole una modifica più ampia del rilevamento o un ambito netcdf4 più ristretto, quindi definisci l’avviso di deprecazione e la release obiettivo. Il lavoro è completato quando lo stato finale e il ciclo di deprecazione sono concordati e documentati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs triage
What is your issue?

As discussed in https://github.com/pydata/xarray/pull/10931 and https://github.com/pydata/xarray/pull/10804 the netcdf4 backend currently claims all URLs via it's guess_can_open method.

https://github.com/pydata/xarray/blob/6e82a3afa8e47e7ed59441e77f812ceeaeaf5668/xarray/backends/netCDF4_.py#L718-L731

This is overeager and led to issues such as https://github.com/pydata/xarray/issues/10801. Therefore this behavior needs to be deprecated in favor of either more explicit options https://github.com/pydata/xarray/pull/10931#issuecomment-3560387850 or at a minimum a tighter scope for what URLs the backend claims in it's guess method.

However, some users and workflows currently rely on this behavior, which caused failures: https://github.com/pydata/xarray/pull/10804#discussion_r2542097630

Therefore, any changes will require a long deprecation cycle with a warning emitted when a user relies on the to-be-changed guessing behavior.

Questions

  1. What should the end state be?

Is this a wholesale change of guessing behavior for all backends - potentially removing guessing in favor of always explicit speccificaiton? Or is this a smaller descoping of what URLs the netcdf4 backend claims?

  1. What time frame?

I propose the 2026.01.0 release

Additional reading

The URL-pipeline syntax originally proposed in ZEP8, that now lives here: https://github.com/jbms/url-pipeline#url-pipeline-specification seems as though it would be able to solve the issues here (e.g. specifying if something is a dap url)

Lingua principale
Python
Stelle
4.2k
Fork
1.5k
Merge medio
2g 21h
PR unite (30g)
74

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pydata/xarray

Tutte le issue di pydata/xarray

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.