Make anywidget an optional dependency?

Aperta
#558 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
44/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
build-system

Direzione di ricerca

Start in pyproject.toml at the dependency list and locate the anywidget entry, then grep the package for anywidget imports to see which module owns the notebook widget path. Confirm the static PNG/SVG rendering path never imports it, so an install without the extra still exports images. Done means anywidget moves to an optional extras group, the widget import fails with a clear message when absent, and the test suite passes both with and without the extra installed. Note the issue asks a design question, so a maintainer's answer on the intended policy comes first.

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

Descrizione

Thanks for creating XY I was looking for a lightweight alternative to Matplotlib for generating static plots, and XY caught my attention.

Currently, anywidget is listed as a mandatory dependency in pyproject.toml.

However, it seems to be primarily used for interactive notebook display, while static exports such as PNG and SVG use separate rendering paths.

For users who only use XY for static image generation (e.g. in batch processing or server-side scripts), installing anywidget and its dependencies seems unnecessary.

Would it be possible to make anywidget an optional dependency, required only when using the notebook widget functionality?

Or is there a reason why it needs to be a mandatory dependency?

Lingua principale
Python
Stelle
1.9k
Fork
81
Merge medio
7h 57m
PR unite (30g)
9

Preparare l'ambiente

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 reflex-dev/xy

Tutte le issue di reflex-dev/xy

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.