asdf-community / asdf-community/asdf-python

asdf poetry gets confused after a python update

Offen
#101 3 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
729
Forks
65
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Reproduziere das Setup mit Python 3.9.0, Python 3.9.2, Poetry und ~/.tool-versions und untersuche anschließend /opt/asdf/current/shims/poetry sowie, wie asdf exec es auflöst. Prüfe, ob der Shim generiert wird und ob sein Interpreter und sein asdf-Pfad den ausgewählten Versionen folgen. Als abgeschlossen gilt die Aufgabe, wenn der dokumentierte Aktualisierungsweg klar ist und der Shim nach dem Ändern der standardmäßigen Python-Version funktioniert.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python, shell
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.