Add an option to disable `realpath` when creating venv
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- PR 合并指标
- PR 指标待抓取
描述
These two lines of code sometimes make the executable path point somewhere unexpected:
https://github.com/python/cpython/blob/8b5ce31c2b44d9bf82e6119e90a52dd530bfd1db/Lib/venv/__init__.py#L210
https://github.com/python/cpython/blob/8b5ce31c2b44d9bf82e6119e90a52dd530bfd1db/Lib/venv/__init__.py#L240
Based on the following issue, realpath is necessary in some cases. However, there are situations where using "redirects, links or junctions" is intentional! For example, using subst to change drive letters or path for venv.
https://github.com/python/cpython/issues/89500
Would it be possible to add an option to disable the use of realpath during venv creation?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Lib/venv/init.py 中两个相关的 realpath 调用开始,然后阅读 issue 89500,以了解为什么在某些情况下需要 realpath。确定在创建 venv 时应将选择退出选项放在哪里,以及如何继续将现有行为作为默认行为。完成的标准是:有意设置的重定向、链接或 junction 可以得到保留,同时不会破坏现有行为所涵盖的情况。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100