python / python/cpython

Support efficient sharing of all immutable builtins in sub interpreters

未關閉
#157,047 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

interpreter-core topic-subinterpreters type-feature
主要語言
Python
星號
77.2k
分支
36k
PR 合併指標
PR 指標待擷取

描述

Feature or enhancement

Proposal:

The interpreters API already supports efficiently sharing of most immutable builtins.

I think it would be useful to extend support to the rest as well:

  • frozenset similar to how tuples are handled (#111628)
  • frozendict as proposed in #148234
  • complex #157051
  • maybe slice?
  • maybe range?
  • NotImplemented and Ellipsis as implemented in #118965 though might be less useful in practice
Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-157051

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 interpreters API 的 sharing-objects 文件以及 #111628、#148234、#157051 和 #118965 的相關討論開始。確定哪些不可變 builtin 仍不受支援,以及每項提案是否仍在範圍內;完成表示已達成共識的物件能夠在適當涵蓋範圍下有效率地共用,同時不重複已由相關 PR 處理的工作。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
backend
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
停滯
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。