Replace `pyvenv.cfg`'s `home` key with `base-prefix` and `base-exec-prefix`
オープン
まだ誰も着手していません。
interpreter-core
topic-venv
type-feature
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- PR マージ指標
- PR 指標を取得中
説明
Feature or enhancement
Proposal:
The home key in pyvenv.cfg is used to specify the directory where the base Python executable is. During the Path Initialization, this directory, and consecutively its parents, is searched for stdlib landmarks to determine sys.base_prefix and sys.base_exec_prefix. Naturally, this isn't ideal, it would be better if pyvenv.cfg contained these values directly.
Proposed plan:
- Update
venvto start setting thebase-prefixandbase-exec-prefixkeys inpyvenv.cfgwhen creating/updating environments - In
getpath, use thebase-prefixandbase-exec-prefixkeys to set the prefixes - Deprecate specifying
home, inpyvenv.cfg
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず venv 環境の作成および更新ロジックを読み、次に getpath の Path Initialization を追って、現在 pyvenv.cfg が sys.base_prefix と sys.base_exec_prefix をどのように決定しているかを確認します。新しい base-prefix キーと base-exec-prefix キーの書き込み方法と使用方法、home の非推奨化の方法を定義し、新しく作成された環境と更新された環境の両方を検証します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- operating-systems
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100