New REPL exposes its internal imports/definitions to top-level environment
未关闭
还没有人认领这个 Issue。
3.13
3.14
topic-repl
type-bug
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- PR 合并指标
- PR 指标待抓取
描述
Bug report
Bug description:
Top-level scope now contains globals of _pyrepl.__main__:
Python 3.14.0a0 (heads/main:a895756aec, May 10 2024, 16:56:55) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> dir()
['CAN_USE_PYREPL', '__annotations__', '__builtins__', '__cached__', '__doc__', '__file__',
'__loader__', '__name__', '__package__', '__spec__', 'interactive_console', 'os', 'sys']
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
- gh-119547
- gh-120362
- gh-120370
- gh-120392
- gh-120408
- gh-120430
- gh-121054
- gh-121059
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 _pyrepl.main 入口点开始,在新的 REPL 中复现报告的 dir() 输出。调查为什么内部导入和定义会出现在顶层环境中;完成的标准是这些实现名称不再暴露,同时 REPL 仍能正常工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100