Deprecate (and eventually remove) `tp_is_gc`
未關閉
還沒有人認領這個 Issue。
interpreter-core
type-feature
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 35.9k
- PR 合併指標
- PR 指標待擷取
描述
Feature or enhancement
Proposal:
The existence of tp_is_gc slows down and complicates allocation, deallocation and garbage collection.
But there is no need for it, as statically allocated objects can be marked as immortal as will be ignored by the GC.
I doubt there is much third-party code that uses it, if any.
We should deprecate it, and then remove it.
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先定位 CPython 中 tp_is_gc 的定義及所有使用位置,然後檢查靜態配置的物件如何被標記為 immortal,以及垃圾回收器如何處理這些物件。確定棄用和最終移除的範圍,包括對第三方擴充功能相容性的影響。當提議的替代方案得到驗證,並且棄用或移除得到一致實作時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- backend
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100