Limitations of relative imports

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

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
tooling

Direzione di ricerca

L’issue cita gli import relativi, il file init del package e l’uso come Ansible module utils, ma non indica alcun file sorgente o test specifico. Esamina innanzitutto la struttura degli import del package e il requisito di spostamento; al momento, l’issue non definisce alcuna modifica richiesta né alcun criterio di completamento.

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

Descrizione

sev-minor type-enhancement

Relative imports can have various impacts when the package is used from an external script, since said script may execute in the right virtual env but maybe not the right python context module wise.

There is two solutions to this:

  • Expose symbols between modules in the main init file
  • Use fully qualified imports

Unfortunately, the fully qualified break the possibility to "relocate" the module, ie, making it a submodule of another, which is required here for it to be usable as Ansible module utils.

No action is specifically required, this issue is merely a reminder of previous work in case the question arise later on.

Lingua principale
Python
Stelle
44
Fork
29
Merge medio
3h 34m
PR unite (30g)
2

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 dataiku/dataiku-api-client-python

Tutte le issue di dataiku/dataiku-api-client-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.