asdf-community / asdf-community/asdf-python

asdf poetry gets confused after a python update

オープン
#101 コメント 3 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
Shell
スター
729
フォーク
65
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Python 3.9.0、Python 3.9.2、Poetry、~/.tool-versions を使ってセットアップを再現し、その後 /opt/asdf/current/shims/poetry と、asdf exec がそれをどのように解決するかを調査します。shim が生成されるか、またそのインタープリターと asdf パスが選択したバージョンに従うかを確認します。ドキュメント化された更新手順が明確で、デフォルトの Python バージョンを変更した後も shim が動作すれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python, shell
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。