asdf-community / asdf-community/asdf-python

asdf poetry gets confused after a python update

Aperta
#101 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
729
Fork
65
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I installed python 3.9.0 and poetry with asdf, then installed python 3.9.2 and made it the default in `~/.tool-versions`. Poetry was confused. I looked at the shim `/opt/asdf/current/shims/poetry`:

```bash
#!/usr/bin/env bash
# asdf-plugin: python 3.9.0
exec /opt/asdf/current/bin/asdf exec "poetry" "$@"
```
which I changed to 3.9.2 and added `poetry 1.1.6` to ~/.tool-versions. Then it works.

I suspect you have no control over the code in the shim. It looks generated. But if you do, it would be useful:

* to know if the script is generated and if so how to update it
* use ASDF_DIR in the exec line: `exec ${ASDF_DIR:-/opt/asdf/current}/bin/asdf exec "poetry" "$@"`

This is probably related to https://github.com/asdf-vm/asdf/issues/859.

I'm not sure this is an "issue" so much as an inconvenience. But I had to wander around a bit to figure out how to make the pieces work together. Which is umm suboptimal.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Riproduci la configurazione usando Python 3.9.0, Python 3.9.2, Poetry e ~/.tool-versions, quindi analizza /opt/asdf/current/shims/poetry e il modo in cui asdf exec lo risolve. Verifica se lo shim viene generato e se il suo interprete e il suo percorso asdf seguono le versioni selezionate. Il lavoro è completo quando il percorso di aggiornamento documentato è chiaro e lo shim funziona dopo aver modificato la versione Python predefinita.

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

Valutazione

Stack tecnologico
python, shell
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.